- 23 May, 2019 2 commits
-
-
Batuhan Taşkaya authored
-
Alexey Izbyshev authored
…nctions with asserts The actual overflow can never happen because of the following: * The size of a list can't be greater than PY_SSIZE_T_MAX / sizeof(PyObject*). * The size of a pointer on all supported plaftorms is at least 4 bytes. * ofs is positive and less than the list size at the beginning of each iteration. https://bugs.python.org/issue35091
-
- 22 May, 2019 18 commits
-
-
Victor Stinner authored
PyErr_WriteUnraisable() now creates a traceback object if there is no current traceback. Moreover, call PyErr_NormalizeException() and PyException_SetTraceback() to normalize the exception value. Ignore silently any error.
-
Victor Stinner authored
* Rename private C functions: * _Py_Initialize_ReconfigureCore => pyinit_core_reconfigure * _Py_InitializeCore_impl => pyinit_core_config * _Py_InitializeCore = > pyinit_core * _Py_InitializeMainInterpreter => pyinit_main * init_python => pyinit_python * Rename _testembed.c commands: add "test_" prefix.
-
Paul Monson authored
-
Victor Stinner authored
* _PyPreConfig_GetGlobalConfig() and _PyCoreConfig_GetGlobalConfig() now do nothing if the configuration was not initialized with _PyPreConfig_InitCompatConfig() and _PyCoreConfig_InitCompatConfig() * Remove utf8_mode=-2 special case: use utf8_mode=-1 instead. * Fix _PyPreConfig_InitPythonConfig(): * isolated = 0 instead of -1 * use_environment = 1 instead of -1 * Rename _PyConfig_INIT to _PyConfig_INIT_COMPAT * Rename _PyPreConfig_Init() to _PyPreConfig_InitCompatConfig() * Rename _PyCoreConfig_Init() to _PyCoreConfig_InitCompatConfig() * PyInterpreterState_New() now uses _PyCoreConfig_InitPythonConfig() as default configuration, but it's very quickly overriden anyway. * _freeze_importlib.c uses _PyCoreConfig_SetString() to set program_name. * Cleanup preconfig_init_utf8_mode(): cmdline is always non-NULL.
-
Victor Stinner authored
* Copy test_exceptions.test_unraisable() to test_sys.UnraisableHookTest(). * Use catch_unraisable_exception() in test_coroutines, test_exceptions, test_generators.
-
Sean authored
* Fixes issue 24882 * Add news file entry for change. * Change test_concurrent_futures.ThreadPoolShutdownTest Adjust the shutdown test so that, after submitting three jobs to the executor, the test checks for less than three threads, instead of looking for exactly three threads. If idle threads are being recycled properly, then we should have less than three threads. * Switched idle count to semaphor, Updated tests As suggested by reviewer tomMoral, swapped lock-protected counter with a semaphore to track the number of unused threads. Adjusted test_threads_terminate to wait for completiton of the previous future before submitting a new one (and checking the number of threads used). Also added a new test to confirm the thread pool can be saturated. * Updates tests as requested by pitrou. * Correct minor whitespace error. * Make test_saturation faster
-
Sam Martin authored
bpo-33110: Catch errors raised when running add_done_callback on already completed futures (GH-13141) Wrap the callback call within the `add_done_callback` function within concurrent.futures, in order to behave in an identical manner to callbacks added to a running future are triggered once it has completed.
-
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 5 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
-