Pablo Galindo Salgado
36fcde61ba
gh-94360: Fix a tokenizer crash when reading encoded files with syntax errors from stdin ( #94386 )
...
* gh-94360: Fix a tokenizer crash when reading encoded files with syntax errors from stdin
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
* nitty nit
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-07-05 17:39:21 +01:00
Carter Dodd
c8556bcf6c
gh-90355: Add isolated flag if currently isolated (GH-92857)
...
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-07-05 17:23:44 +02:00
Erik Montnemery
c60f125533
bpo-46755: Don't log stack info twice in QueueHandler (GH-31355)
2022-07-05 15:23:12 +01:00
Irit Katriel
324d01944d
gh-94485: Set line number of module's RESUME instruction to 0, as specified by PEP 626 (GH-94552)
...
Co-authored-by: Mark Shannon <mark@hotpy.org>
2022-07-05 14:38:44 +02:00
Łukasz Langa
a2a3f2c541
gh-84753: Clarify change made to inspect functions ( #94554 )
2022-07-05 13:14:19 +01:00
Victor Stinner
92bcb26d00
gh-94379: Remove zipimport find_loader() and find_module() methods ( #94380 )
...
zipimport: Remove find_loader() and find_module() methods, deprecated
in Python 3.10: use the find_spec() method instead. See PEP 451 for
the rationale.
2022-07-05 12:11:42 +02:00
Ned Batchelder
3440d197a5
Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551)
...
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
2022-07-05 11:16:10 +02:00
Erlend Egeberg Aasland
2b8ed4d3d4
gh-94538: Fix Argument Clinic output to custom file ( #94539 )
2022-07-05 11:06:04 +02:00
KotlinIsland
4791a8a835
gh-93626: Set the release for __future__.annotations to None (GH-93628)
...
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
2022-07-05 10:46:39 +02:00
Christian Heimes
7bd67d1d88
gh-93939: Add script to check extension modules ( #94545 )
...
Add script ``Tools/scripts/check_modules.py`` to check and validate builtin
and shared extension modules. The script also handles ``Modules/Setup`` and
will eventually replace ``setup.py``.
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-05 09:25:45 +02:00
Victor Stinner
fd76eb547d
gh-94383: Remove ElementTree.Element.copy() method ( #94384 )
...
xml.etree: Remove the ElementTree.Element.copy() method of the pure
Python implementation, deprecated in Python 3.10, use the copy.copy()
function instead. The C implementation of xml.etree has no copy()
method, only a __copy__() method.
2022-07-04 15:51:01 +02:00
Victor Stinner
fbcee570d1
gh-94352: shlex.split() no longer accepts None ( #94353 )
...
shlex.split(): Passing None for s argument now raises an exception,
rather than reading sys.stdin. The feature was deprecated in Python
3.9.
2022-07-04 15:29:19 +02:00
Jason R. Coombs
71848c9609
gh-93963: Officially deprecate abcs and warn about their usage. (GH-93965)
...
Fixes #93963
Automerge-Triggered-By: GH:jaraco
2022-07-03 12:17:27 -07:00
Thomas Perl
b296c7442b
gh-92869: ctypes: Add c_time_t ( #92870 )
...
Adds `ctypes.c_time_t` to represent the C `time_t` type accurately as its size varies.
Primarily-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
2022-07-03 11:58:02 -07:00
Oleg Iarygin
7db1d2eaf3
gh-93096: Remove python -m base64 -t (gh-94230)
2022-07-02 15:53:43 +09:00
Oleg Iarygin
1bc8a38d8b
gh-93096: Remove python -m codecs (gh-94233)
2022-07-02 14:45:31 +09:00
Christian Heimes
ec5e253556
gh-90005: Port _dbm module to PY_STDLIB_MOD (GH-94433)
2022-07-01 21:48:38 +02:00
Irit Katriel
c57aad777a
gh-94216: add pseudo instructions to the dis/opcodes modules (GH-94241)
2022-07-01 15:33:35 +01:00
Mark Shannon
be80db14c4
GH-94438: Account for NULLs on evaluation stack when jumping lines. (GH-94444)
2022-07-01 14:01:14 +01:00
Mark Shannon
544531de23
GH-94262: Don't create frame objects for frames that aren't yet complete. (GH-94371)
2022-07-01 11:08:20 +01:00
Christian Heimes
d6acdc1b60
gh-90005-ffi: Fix building _ctypes without pkg-config (GH-94451)
...
The fallback path did not set LIBFFI_LIBS variable to link with ``-lffi``.
2022-07-01 09:23:41 +02:00
Guido van Rossum
594c369949
GH-94398: TaskGroup: Fail create_task() during shutdown (GH-94400)
...
Once the task group is shutting down, it should not be possible to create a new task.
Here "shutting down" means `self._aborting` is set, indicating that at least one task
has failed and we have cancelled all others.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-06-30 19:10:46 +02:00
Mehdi ABAAKOUK
4261b6bffc
gh-84753: Make inspect.iscoroutinefunction() work with AsyncMock ( #94050 )
...
The inspect version was not working with unittest.mock.AsyncMock.
The fix introduces special-casing of AsyncMock in
`inspect.iscoroutinefunction` equivalent to the one
performed in `asyncio.iscoroutinefunction`.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-06-30 19:08:38 +02:00
neonene
ea39b77de9
gh-91719: Reload opcode on unknown error so that C can optimize the dispatching in ceval.c ( #94364 )
2022-06-30 08:38:29 -07:00
Mark Shannon
b152bf448b
GH-94329: Don't raise on excessive stack consumption (GH-94421)
2022-06-30 15:27:14 +01:00
Irit Katriel
21cbdae90f
gh-92336: linecache.getline should not raise exceptions on decoding errors (GH-94410)
2022-06-30 10:18:18 +01:00
Christian Heimes
6485c3c726
gh-94404: Use module CFLAGS before PY_STDMODULE_CFLAGS (GH-94413)
...
``PY_STDMODULE_CFLAGS`` may contain include directories with system
headers. This can break compiling with built-in libmpdec.
2022-06-29 15:44:14 +02:00
Christian Heimes
5150cbcd68
gh-94404: makesetup: use correct CFLAGS and macOS workaround (GH-94405)
...
``makesetup`` now works around an issue with sed on macOS and uses correct
CFLAGS for object files that end up in a shared extension.
2022-06-29 09:46:39 +02:00
Pablo Galindo Salgado
c485ec014c
gh-88116: Avoid undefined behavior when decoding varints in code objects ( #94375 )
2022-06-28 14:24:54 +01:00
Christian Heimes
44fa03d748
gh-93939: Create and install scripts in Makefile (GH-94324)
...
Scripts for 2to3, idle, and pydoc are now created and installed by make.
2022-06-28 14:56:06 +02:00
Robin Plumey
176fd5571f
gh-94018: Remove trailing spaces in _sanitize_windows_name (GH-94040)
...
Closes #94018 .
Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
2022-06-28 12:09:22 +02:00
Serhiy Storchaka
efdc9d68de
gh-87995: Make MappingProxyType hashable (GH-94252)
2022-06-28 11:54:58 +02:00
Victor Stinner
71d5299b73
gh-94199: Remove hashlib.pbkdf2_hmac() Python implementation (GH-94200)
...
Remove the pure Python implementation of hashlib.pbkdf2_hmac(),
deprecated in Python 3.10. Python 3.10 and newer requires OpenSSL
1.1.1 or newer (PEP 644), this OpenSSL version provides a C
implementation of pbkdf2_hmac() which is faster.
2022-06-28 11:51:13 +02:00
Christian Heimes
1bc86c2625
gh-94208: Add more TLS version/protocol checks for FreeBSD (GH-94347)
...
Three test cases were failing on FreeBSD with latest OpenSSL.
2022-06-28 09:33:06 +02:00
Kumar Aditya
01ef1f95da
GH-89988: Fix memory leak in pickle.Pickler dispatch_table lookup (GH-94298)
2022-06-28 10:01:43 +03:00
Shixian Li
acc6468f7e
gh-94280: Require Python 3.9 or higher to compile CPython on Windows (GH-94281)
2022-06-27 20:48:36 +01:00
Christian Heimes
7e0d98ecb3
gh-94315: Check for DAC override capability (GH-94316)
...
``os.geteuid() == 0`` is not a reliable check whether the current user
has the capability to bypass permission checks. Tests now probe for DAC
override.
2022-06-27 20:27:19 +02:00
Thomas B. Brunner
1172172453
gh-93858: Prevent error when activating venv in nested fish instances (GH-93931)
2022-06-27 16:26:02 +01:00
Mark Shannon
c0453a40fa
GH-94163: Add BINARY_SLICE and STORE_SLICE instructions. (GH-94168)
2022-06-27 12:24:23 +01:00
Serhiy Storchaka
33fc3b5e42
gh-94318: Strip trailing spaces in pydoc text output (GH-94319)
2022-06-27 13:33:34 +03:00
wookie184
8c237a7a71
gh-94192: Fix error for dictionary literals with invalid expression as value. ( #94304 )
...
* Fix error for dictionary literals with invalid expression as value.
* Remove trailing whitespace
2022-06-26 19:42:47 +01:00
Paul Moore
aedb5194d5
gh-94214: Add venv context.lib_path and document the context (GH-94221)
2022-06-26 17:49:03 +01:00
Christian Heimes
bb8b931385
gh-90005: Port _ctypes to PY_STDLIB_MOD (GH-32229)
...
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Automerge-Triggered-By: GH:tiran
2022-06-26 04:04:43 -07:00
Victor Stinner
cc0d5e568e
gh-94226: Remove the locale.format() function ( #94229 )
...
Remove the locale.format() function, deprecated in Python
3.7: use locale.format_string() instead.
Remove TestFormatPatternArg test case: it is irrelevant for
locale.format_string() which accepts complex formats.
2022-06-26 12:41:19 +02:00
Kumar Aditya
17ed560fcd
GH-94254: Make _struct module types immutable ( #94269 )
2022-06-26 12:12:01 +02:00
Serhiy Storchaka
d4792ce916
gh-83499: Fix closing file descriptors in tempfile (GH-93874)
2022-06-26 10:58:28 +03:00
Serhiy Storchaka
536985814a
gh-93820: Pickle enum.Flag by name (GH-93891)
2022-06-26 10:54:00 +03:00
Serhiy Storchaka
c834c02569
Revert "bpo-45162: Revert "Remove many old deprecated unittest features"" (GH-92556)
...
This reverts commit b50322d203 .
2022-06-26 10:18:06 +03:00
Jason R. Coombs
38612a05b5
gh-93259: Validate arg to `Distribution.from_name`. (GH-94270)
...
Syncs with importlib_metadata 4.12.0.
2022-06-25 21:04:28 -04:00
Mark Dickinson
6b865349aa
gh-94207: Fix struct module leak (GH-94239)
...
Make _struct.Struct a GC type
This fixes a memory leak in the _struct module, where as soon
as a Struct object is stored in the cache, there's a cycle from
the _struct module to the cache to Struct objects to the Struct
type back to the module. If _struct.Struct is not gc-tracked, that
cycle is never collected.
This PR makes _struct.Struct GC-tracked, and adds a regression test.
2022-06-25 15:11:58 +01:00