- 21 May, 2019 5 commits
-
-
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 16 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().
-
Zackery Spytz authored
-
Victor Stinner authored
Add new cpython/traceback.h and pycore_traceback.h header files to Makefile.pre.in and PCbuild/ project.
-
- 19 May, 2019 11 commits
-
-
Victor Stinner authored
Add new Include/cpython/traceback.h and Include/internal/traceback.h header files.
-
Lysandros Nikolaou authored
-
Xtreak authored
The sqlit3.Connection object doesn't call its close() method when it's used as a context manager.
-
Mark Dickinson authored
* Add math.isqrt function computing the integer square root. * Code cleanup: remove redundant comments, rename some variables. * Tighten up code a bit more; use Py_XDECREF to simplify error handling. * Update Modules/mathmodule.c Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> * Update Modules/mathmodule.c Use real argument clinic type instead of an alias Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> * Add proof sketch * Updates from review. * Correct and expand documentation. * Fix bad reference handling on error; make some variables block-local; other tidying. * Style and consistency fixes. * Add missing error check; don't try to DECREF a NULL a * Simplify some error returns. * Another two test cases: - clarify that floats are rejected even if they happen to be squares of small integers - TypeError beats ValueError for a negative float * Add fast path for small inputs. Needs tests. * Speed up isqrt for n >= 2**64 as well; add extra tests. * Reduce number of test-cases to avoid dominating the run-time of test_math. * Don't perform unnecessary extra iterations when computing c_bit_length. * Abstract common uint64_t code out into a separate function. * Cleanup. * Add a missing Py_DECREF in an error branch. More cleanup. * Update Modules/mathmodule.c Add missing `static` declaration to helper function. Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> * Add missing backtick.
-
Berker Peksag authored
-
Bar Harel authored
-
Xtreak authored
-
Serhiy Storchaka authored
-
Boštjan Mejak authored
Add a missing comma.
-
Ashwin Ramaswami authored
-
Jelle Zijlstra authored
-
- 18 May, 2019 8 commits
-
-
Pablo Galindo authored
-
Batuhan Taşkaya authored
-
Batuhan Taşkaya authored
-
Abhishek Kumar Singh authored
-
Anthony Sottile authored
This makes the parser consistent with the tokenize module (already the case in `pypy`). sample ------ ```python x = 5\ ``` before ------ ```console $ python3 t.py $ python3 -mtokenize t.py t.py:2:0: error: EOF in multi-line statement ``` after ----- ```console $ ./python t.py File "t.py", line 3 x = 5\ ^ SyntaxError: unexpected EOF while parsing $ ./python -m tokenize t.py t.py:2:0: error: EOF in multi-line statement ``` https://bugs.python.org/issue2180
-
Raymond Hettinger authored
-
Mark Dickinson authored
* Add math.isqrt function computing the integer square root. * Code cleanup: remove redundant comments, rename some variables. * Tighten up code a bit more; use Py_XDECREF to simplify error handling. * Update Modules/mathmodule.c Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> * Update Modules/mathmodule.c Use real argument clinic type instead of an alias Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> * Add proof sketch * Updates from review. * Correct and expand documentation. * Fix bad reference handling on error; make some variables block-local; other tidying. * Style and consistency fixes. * Add missing error check; don't try to DECREF a NULL a * Simplify some error returns. * Another two test cases: - clarify that floats are rejected even if they happen to be squares of small integers - TypeError beats ValueError for a negative float * Documentation and markup improvements; thanks Serhiy for the suggestions! * Cleaner Misc/NEWS entry wording. * Clean up (with one fix) to the algorithm explanation and proof.
-
Victor Stinner authored
-