Victor Stinner
ea1a54506b
bpo-46303: Move fileutils.h private functions to internal C API (GH-30484)
...
Move almost all private functions of Include/cpython/fileutils.h to
the internal C API Include/internal/pycore_fileutils.h.
Only keep _Py_fopen_obj() in Include/cpython/fileutils.h, since it's
used by _testcapi which must not use the internal C API.
Move EncodeLocaleEx() and DecodeLocaleEx() functions from _testcapi
to _testinternalcapi, since the C API moved to the internal C API.
2022-01-11 11:56:16 +01:00
Sam Gross
e13cdca0f5
bpo-46205: exit if no workers are alive in runtest_mp (GH-30470)
2022-01-11 12:03:09 +09:00
Nikita Sobolev
13e4659276
bpo-46327: [Enum] remove skipped tests (GH-30512)
2022-01-10 11:12:34 -08:00
Nikita Sobolev
582286d71c
bpo-46301: [Enum] fix refleak tests (GH30510)
2022-01-10 11:09:00 -08:00
Mark Shannon
ec0c392f34
bpo-46314: Remove extra RESUME when compiling a lamdba. (GH-30513)
2022-01-10 12:29:02 +00:00
Serhiy Storchaka
2d787971c6
bpo-37295: Use constant-time comb() and perm() for larger n depending on k (GH-30305)
2022-01-09 15:32:25 +02:00
Nikita Sobolev
8d59d2563b
bpo-46301: [Enum] test uncomparable values in `_convert_` (GH-30472)
...
add tests that cover different types, and same non-comparable types
2022-01-08 11:43:42 -08:00
Dong-hee Na
45d44b950f
bpo-46299: Improve test_descr (GH-30475)
2022-01-08 17:14:40 +09:00
Nikita Sobolev
e63066cfed
bpo-46299: improve `test_descr.py` with stricter error handling (GH-30471)
2022-01-08 12:51:51 +09:00
Pablo Galindo Salgado
6fa8b2ceee
bpo-46237: Fix the line number of tokenizer errors inside f-strings (GH-30463)
2022-01-08 00:23:40 +00:00
Daniel
c9dc1f491e
bpo-46297: Fix interpreter crash on startup with multiple PythonPaths set in registry (GH-30466)
2022-01-07 22:26:00 +00:00
Nikita Sobolev
74d1663580
bpo-46296: [Enum] add a test for missing `value` recovery (GH-30458)
...
In `__set_name__` there is a check for the `_value_` attribute and an attempt to add it if missing; this adds a test to cover the case for simple enums with a custom `__new__` method.
2022-01-07 13:44:21 -08:00
andrei kulakov
f4e325c21d
bpo-41011: venv -- add more variables to pyvenv.cfg (GH-30382)
2022-01-07 06:50:30 +00:00
Christian Heimes
c9137d4b63
bpo-46263: Fix second location that needs MALLOC_CONF on FreeBSD (GH-30440)
...
Automerge-Triggered-By: GH:tiran
2022-01-06 11:49:03 -08:00
neonene
9c5fa9c97c
bpo-46208: Fix normalization of relative paths in _Py_normpath()/os.path.normpath (GH-30362)
2022-01-06 19:13:10 +00:00
Eric Snow
68c76d9766
bpo-46263: Do not ever expect "use_frozen_modules" to be -1. (gh-30438)
...
The condition is no longer valid. This should resolve the buildbot failure on FreeBSD.
https://bugs.python.org/issue46263
2022-01-06 11:56:13 -07:00
Christian Heimes
a4aa52dc28
bpo-46263: FreeBSD 14.0 jemalloc workaround for junk bytes of freed memory (GH-30434)
...
Automerge-Triggered-By: GH:tiran
2022-01-06 07:14:49 -08:00
Mark Shannon
e028ae99ec
bpo-45923: Handle call events in bytecode (GH-30364)
...
* Add a RESUME instruction to handle "call" events.
2022-01-06 13:09:25 +00:00
Nikita Sobolev
e5894ca8fd
bpo-46266: Add calendar day of week constants to __all__ (GH-30412)
2022-01-05 14:21:04 -06:00
Brandt Bucher
332e6b9725
bpo-45256: Don't track the exact depth of each `InterpreterFrame` (GH-30372)
2022-01-05 11:30:26 +00:00
Nikita Sobolev
91bc6f9615
bpo-46262: [Enum] test error path in `Flag._missing_` (GH-30408)
...
add tests that exercise the `_missing_` error path for `Flag` and `IntFlag`
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2022-01-04 16:11:06 -08:00
Kumar Aditya
7d7817cf0f
bpo-20369: concurrent.futures.wait() now deduplicates futures given a… (GH-30168)
...
* bpo-20369: concurrent.futures.wait() now deduplicates futures given as arg.
* 📜 🤖 Added by blurb_it.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2022-01-04 13:36:13 +00:00
Pablo Galindo Salgado
70f415fb8b
bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished (GH-30378)
2022-01-04 10:41:22 +00:00
Irit Katriel
a94461d718
bpo-46202: Remove opcode POP_EXCEPT_AND_RERAISE (GH-30302)
...
* bpo-46202: remove opcode POP_EXCEPT_AND_RERAISE
* do not assume that an exception group is truthy
2022-01-04 10:37:12 +00:00
Tim Peters
3aa5242b54
bpo-46233: Minor speedup for bigint squaring (GH-30345)
...
x_mul()'s squaring code can do some redundant and/or useless
work at the end of each digit pass. A more careful analysis
of worst-case carries at various digit positions allows
making that code leaner.
2022-01-03 20:41:16 -06:00
Pablo Galindo Salgado
dd6c35761a
bpo-46110: Restore commit e9898bf153
...
This restores commit e9898bf153
.
2022-01-03 19:54:06 +00:00
Erlend Egeberg Aasland
9d6a239a34
bpo-44092: Don't reset statements/cursors before rollback (GH-26026)
...
In SQLite versions pre 3.7.11, pending statements would block a rollback. This is no longer the case, so remove the workaround.
2022-01-03 19:02:39 +00:00
Pablo Galindo Salgado
9d35dedc5e
Revert "bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser (GH-30177)" (GH-30363)
...
This reverts commit e9898bf153
temporarily as we want to confirm if this commit is the cause of a slowdown at startup time.
2022-01-03 18:29:18 +00:00
Irit Katriel
65e7c1f90e
bpo-46219, 46221: simplify except* implementation following exc_info changes. Move helpers to exceptions.c. Do not assume that exception groups are truthy. (GH-30289)
2022-01-02 23:22:42 +00:00
Tim Peters
863729e9c6
bpo-46218: Change long_pow() to sliding window algorithm (GH-30319)
...
* bpo-46218: Change long_pow() to sliding window algorithm
The primary motivation is to eliminate long_pow's reliance on that the number of bits in a long "digit" is a multiple of 5. Now it no longer cares how many bits are in a digit.
But the sliding window approach also allows cutting the precomputed table of small powers in half, which reduces initialization overhead enough that the approach pays off for smaller exponents too. Depending on exponent bit patterns, a sliding window may also be able to save some bigint multiplies (sometimes when at least 5 consecutive exponent bits are 0, regardless of their starting bit position modulo 5).
Note: boosting the window width to 6 didn't work well overall. It give marginal speed improvements for huge exponents, but the increased overhead (the small-power table needs twice as many entries) made it a loss for smaller exponents.
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
2022-01-02 13:18:20 -06:00
Irit Katriel
a82baed0e9
bpo-45615: Add missing test for printing traceback for non-exception. Fix traceback.py (GH-30091)
2022-01-02 09:34:03 +00:00
Jason R. Coombs
e712a5b277
bpo-46118: Move importlib.resources to its own package. ( #30176 )
...
* bpo-46118: Move importlib.resources to its own package.
* Expand compatibility shims with documentation and explicit imports.
2021-12-30 21:00:48 -05:00
Hugo van Kemenade
2cf7d02b99
bpo-46178: Remove/rename redundant Travis CI code ( #30309 )
2021-12-30 16:16:27 -08:00
Nikita Sobolev
d12bec6993
bpo-43424: Deprecate `webbrowser.MacOSXOSAScript._name` attribute (GH-30241)
2021-12-30 10:30:13 +09:00
Xinhang Xu
3581c7abbe
bpo-46055: Speed up binary shifting operators (GH-30044)
...
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2021-12-27 18:36:55 +00:00
Serhiy Storchaka
ad4857884b
bpo-43413: Revert changes in set.__init__ (GH-28403)
...
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-12-26 13:27:01 +02:00
Kumar Aditya
a23ab7b6d8
bpo-23819: Fix asyncio tests on python optimized mode (GH-30195)
2021-12-26 13:13:14 +02:00
Serhiy Storchaka
078abb676c
bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050)
...
The registry() method of functools.singledispatch() functions checks now
the first argument or the first parameter annotation and raises a TypeError if it is
not supported. Previously unsupported "types" were ignored (e.g. typing.List[int])
or caused an error at calling time (e.g. list[int]).
2021-12-25 14:16:14 +02:00
Nikita Sobolev
b8de8b7039
bpo-46150: ensure `fakeuser` does not exist in `PosixPathTest.test_expanduser` (GH-30240)
...
Ensure `fakeuser` does not exist in `PosixPathTest.test_expanduser`
2021-12-24 00:07:50 -08:00
Gregory P. Smith
d8880677a7
Allow test_pathlib to pass on systems where fakeuser exists. (GH-30244)
2021-12-23 19:17:40 -08:00
Irit Katriel
c66fc0fb53
bpo-46107: ExceptionGroup.subgroup()/split() should copy __note__ to the parts (GH-30159)
2021-12-21 10:12:26 +00:00
Pablo Galindo Salgado
e9898bf153
bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser (GH-30177)
...
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2021-12-20 15:43:26 +00:00
Serhiy Storchaka
6ca78affc8
bpo-23819: Get rid of assert statements in test_asyncio (GH-30212)
...
To keep checks even if run tests with optimized Python.
Either use special assertion methods like assertEqual() or
raise an AssertionError explicitly.
2021-12-20 12:23:05 +02:00
Andrew Svetlov
9c06fd8951
bpo-46129: Rewrite asyncio.locks tests with IsolatedAsyncioTestCase (GH-30198)
...
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2021-12-19 16:35:56 +02:00
Jason R. Coombs
9b52920173
bpo-46125: Refactor tests to test traversable API directly. Includes changes from importlib_resources 5.4.0. (GH-30189)
2021-12-18 21:28:49 -05:00
andrei kulakov
ae36cd1e79
bpo-37578: glob.glob -- added include_hidden parameter (GH-30153)
...
Automerge-Triggered-By: GH:asvetlov
2021-12-18 06:23:34 -08:00
Jakub Kulík
427a490c49
bpo-46099: Fix pthread_getcpuclockid test on Solaris (GH-30140)
...
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2021-12-18 15:26:24 +02:00
Christian Heimes
2985feac4e
bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170)
2021-12-17 16:17:32 +01:00
Mark Shannon
efd6236d36
bpo-46072: Add top level stats struct (GH-30169)
2021-12-17 14:48:01 +00:00
Irit Katriel
396b58345f
bpo-45711: Remove type and traceback from exc_info (GH-30122)
...
* Do not PUSH/POP traceback or type to the stack as part of exc_info
* Remove exc_traceback and exc_type from _PyErr_StackItem
* Add to what's new, because this change breaks things like Cython
2021-12-17 14:46:22 +00:00