- 22 May, 2019 11 commits
-
-
Michael J. Sullivan authored
This disallows things like `# type: ignoreé`, which seems wrong. Also switch to using Py_ISALNUM for the alnum check, for consistency with other code (and maybe correctness re: locale issues?). https://bugs.python.org/issue36878
-
Victor Stinner authored
CVE-2019-9948: Avoid file reading as disallowing the unnecessary URL scheme in URLopener().open() and URLopener().retrieve() of urllib.request. Co-Authored-By: SH <push0ebp@gmail.com>
-
-
Jake Tesler authored
Add native thread ID (TID) to threading.Thread objects (supported platforms: Windows, FreeBSD, Linux, macOS).
-
Jelle Zijlstra authored
A very simple fix. I found this while writing typeshed stubs for StreamRecoder. https://bugs.python.org/issue33482
-
Michael J. Sullivan authored
GH-13238 made extra text after a # type: ignore accepted by the parser. This finishes the job and actually plumbs the extra text through the parser and makes it available in the AST.
-
Paul Dagnelie authored
In order to support typing checks calling hex(), oct() and bin() on user-defined classes, a SupportIndex protocol is required. The ability to check these at runtime would be good to add for completeness sake. This is pretty much just a copy of SupportsInt with the names tweaked.
-
Marcel Plch authored
-
Jeroen Demeyer authored
-
Jeroen Demeyer authored
It adds a missing testcase for bpo-34125. This is testing code which is affected by PEP 590, so missing this test might accidentally break CPython if we screw up with implementing PEP 590.
-
Victor Stinner authored
Add new sys.unraisablehook() function which can be overridden to control how "unraisable exceptions" are handled. It is called when an exception has occurred but there is no way for Python to handle it. For example, when a destructor raises an exception or during garbage collection (gc.collect()). Changes: * Add an internal UnraisableHookArgs type used to pass arguments to sys.unraisablehook. * Add _PyErr_WriteUnraisableDefaultHook(). * The default hook now ignores exception on writing the traceback. * test_sys now uses unittest.main() to automatically discover tests: remove test_main(). * Add _PyErr_Init(). * Fix PyErr_WriteUnraisable(): hold a strong reference to sys.stderr while using it
-
- 21 May, 2019 15 commits
-
-
Berker Peksag authored
-
Yury Selivanov authored
See also PR GH-13148.
-
Batuhan Taşkaya authored
The ``__rmod__`` method of ``collections.UserString`` class had a bug that made it unusable. https://bugs.python.org/issue25652
-
Matthias Bussonnier authored
Co-Authored-By: Yury Selivanov <yury@magic.io>
-
Batuhan Taşkaya authored
Add an extend action to argparse https://bugs.python.org/issue23378
-
Jörg Stucke authored
Links creating an infinite symlink loop would raise an exception.
-
Max Bernstein authored
* bpo-36929: Modify io/re tests to allow for missing mod name For a vanishingly small number of internal types, CPython sets the tp_name slot to mod_name.type_name, either in the PyTypeObject or the PyType_Spec. There are a few minor places where this surfaces: * Custom repr functions for those types (some of which ignore the tp_name in favor of using a string literal, such as _io.TextIOWrapper) * Pickling error messages The test suite only tests the former. This commit modifies the test suite to allow Python implementations to omit the module prefix. https://bugs.python.org/issue36929
-
Chris Angelico authored
-
Lihua Zhao authored
The mmap module set MAP_SHARED flag when map anonymous memory, however VxWorks only support MAP_PRIVATE when map anonymous memory, this commit clear MAP_SHARED and set MAP_PRIVATE.
-
pxinwr authored
-
Victor Stinner authored
This reverts commit 4959c33d.
-
Erik Janssens authored
Include windows.h rather than crtdbg.h to get STATUS_CONTROL_C_EXIT constant. Moreover, include windows.h on Windows, not only when MSC is used.
-
Xtreak authored
* This PR fixes the `RuntimeWarning` in `inspect.isawaitable(mock())` where `mock()` was not awaited. * Fix typo in asynctest project.
-
Matthias Bussonnier authored
.. And update some deprecation warnings with version numbers. https://bugs.python.org/issue36932
-
Andre Delfino authored
-
- 20 May, 2019 14 commits
-
-
Cheryl Sabella authored
-
Rémi Lapeyre authored
-
Matthias Bussonnier authored
This parameter is marked as deprecated since 3.6 and for removal in 3.8. It already had no effects.
-
-
Thomas Moreau authored
-
Batuhan Taşkaya authored
-
Lisa Roach authored
-
Victor Stinner authored
_PyRuntime.preconfig.coerce_c_locale can now be used to check if the C locale has been coerced. * Fix _Py_LegacyLocaleDetected(): don't attempt to coerce the C locale if LC_ALL environment variable is set. Add 'warn' parameter: emit_stderr_warning_for_legacy_locale() must not the LC_ALL env var. * _PyPreConfig_Write() sets coerce_c_locale to 0 if _Py_CoerceLegacyLocale() fails.
-
Geoff Shannon authored
-
Andrew Svetlov authored
-
Victor Stinner authored
* Fix encoding and locale tests in test_embed.InitConfigTests. * InitConfigTests now only computes EXPECTED_CONFIG once. * Add tests for PYTHONWARNINGS and PYTHONPATH env vars
-
Niklas Fiekas authored
This slightly expands an existing test case `test_popen_error` to trigger a `ResourceWarning` and fixes it. https://bugs.python.org/issue35721
-
Victor Stinner authored
* Add _PyPreConfig.parse_argv * Add _PyCoreConfig._config_init field and _PyCoreConfigInitEnum enum type * Initialization functions: reject preconfig=NULL and config=NULL * Add config parameter to _PyCoreConfig_DecodeLocaleErr(): pass config->argv to _Py_PreInitializeFromPyArgv(), to parse config command line arguments in preinitialization. * Add config parameter to _PyCoreConfig_SetString(). It now preinitializes Python. * _PyCoreConfig_SetPyArgv() now also preinitializes Python for wide argv * Fix _Py_PreInitializeFromCoreConfig(): don't pass args to _Py_PreInitializeFromPyArgv() if config.parse_argv=0. * Use "char * const *" and "wchar_t * const *" types for 'argv' parameters and _PyArgv.argv. * Add unit test on preinitialization from argv. * _PyPreConfig.allocator type becomes int * Add _PyPreConfig_InitFromPreConfig() and _PyPreConfig_InitFromCoreConfig() helper functions
-
Terry Jan Reedy authored
Print any argument other than None or int passed to SystemExit or sys.exit().
-