Commit Graph

28370 Commits

Author SHA1 Message Date
Erlend Egeberg Aasland 721aa96540
gh-89301: Fix regression with bound values in traced SQLite statements (#92053) 2022-05-02 08:14:35 -06:00
Victor Stinner 79886e7b62
gh-91321: Add _testcppext C++ extension (#32175)
Build a basic C++ test extension to check that the Python C API is
compatible with C++ and does not emit C++ compiler warnings.

* Add Modules/_testcppext.cpp: C++ extension
* Add Lib/test/test_cppext.py: test building the C++ extension.
2022-05-02 14:09:22 +02:00
Serhiy Storchaka 18b07d773e
bpo-36819: Fix crashes in built-in encoders with weird error handlers (GH-28593)
If the error handler returns position less or equal than the starting
position of non-encodable characters, most of built-in encoders didn't
properly re-size the output buffer. This led to out-of-bounds writes,
and segfaults.
2022-05-02 12:37:48 +03:00
Serhiy Storchaka 4d10f703d7
gh-92114: Improve error message for types with __class_getitem__ = None (GH-92115) 2022-05-02 08:29:49 +03:00
Antony Lee ad5e8520f3
bpo-39716: Raise on conflicting subparser names. (GH-18605)
Raise an ArgumentError when the same subparser name is added twice to an
ArgumentParser.  This is consistent with the (default) behavior when the
same option string is added twice to an ArgumentParser.

(Support for `conflict_handler="resolve"` could be considered as a
followup feature, although real use cases seem even rarer than
"resolve"ing option-strings.)

Automerge-Triggered-By: GH:rhettinger
2022-04-30 23:04:50 -07:00
Dennis Sweeney b9636180b3
gh-91954: Use shell=True in test_subprocess.test_encoding_warning (GH-92090) 2022-04-30 20:38:19 -04:00
Dennis Sweeney 868b1afa05
gh-92063: Enforce types in specialized PRECALL opcodes (GH-92068)
* Check the types of PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS

* fix PRECALL_NO_KW_METHOD_DESCRIPTOR_NOARGS as well

* fix PRECALL_NO_KW_METHOD_DESCRIPTOR_O

* fix PRECALL_NO_KW_METHOD_DESCRIPTOR_FAST
2022-04-30 12:35:33 -06:00
Erlend Egeberg Aasland 9ea9078ec7
gh-92019: Make sqlite3.Blob indexing conform with the norm (#92020)
- get index now returns an int
- set index now requires an int in range(0, 256)

Resolves #92019
2022-04-30 09:01:37 -06:00
Serhiy Storchaka e91dee87ed
bpo-43323: Fix UnicodeEncodeError in the email module (GH-32137)
It was raised if the charset itself contains characters not encodable
in UTF-8 (in particular \udcxx characters representing non-decodable
bytes in the source).
2022-04-30 13:17:23 +03:00
Serhiy Storchaka 3483299a24
gh-81548: Deprecate octal escape sequences with value larger than 0o377 (GH-91668) 2022-04-30 13:16:27 +03:00
Serhiy Storchaka 19dca04121
gh-91760: Deprecate group names and numbers which will be invalid in future (GH-91794)
Only sequence of ASCII digits will be accepted as a numerical reference.
The group name in bytes patterns and replacement strings could only
contain ASCII letters and digits and underscore.
2022-04-30 13:13:46 +03:00
Inada Naoki 354ace8b07
gh-91954: Emit EncodingWarning from locale and subprocess (GH-91977)
locale.getpreferredencoding() and subprocess.Popen() emit EncodingWarning
2022-04-30 15:53:29 +09:00
Serhiy Storchaka e8c2f72b94
bpo-43224: Implement substitution of unpacked TypeVarTuple in C (GH-31828)
Co-authored-by: Matthew Rahtz <mrahtz@gmail.com>
2022-04-30 08:22:46 +03:00
Dennis Sweeney a29aa76a3f
gh-92064: Fix global variable name collision in test_typing (#92067)
Fixes #92064
2022-04-29 21:18:38 -06:00
Brett Cannon c2b579741d
gh-91217: deprecate xdrlib (GH-92066)
Automerge-Triggered-By: GH:brettcannon
2022-04-29 18:22:10 -07:00
Serhiy Storchaka 81120b6754
bpo-44791: Accept ellipsis as the last argument of typing.Concatenate (#30969) 2022-04-29 15:01:40 -06:00
Matthew Rahtz f6656163de
gh-87390: Add tests demonstrating current type variable substitution behaviour (#32341) 2022-04-29 14:03:21 -06:00
Petr Viktorin 83bce8ef14
gh-91324: Convert the stable ABI manifest to TOML (GH-92026) 2022-04-29 16:18:08 +02:00
Eisuke Kawashima ea2f5bcda1
bpo-22276: Change pathlib.Path.glob not to ignore trailing path separator (GH-10349)
Now pathlib.Path.glob() **only** matches directories when the pattern ends in a path separator.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-04-28 12:45:03 -07:00
Yurii Karabas 0ef8d921f5
gh-91603: Speed up isinstance/issubclass on union types (GH-91631)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-04-28 23:24:19 +08:00
Abhigyan Bose 4ed3900041
gh-91832: Add 'required' attr to argparse.Action repr (GH-91841)
# Adding 'required' to names in Lib.argparse.Action

gh-91832: 
Added 'required' to the list `names` in `Lib.argparse.Action`. 
Changed constant strings that test the Action object.

Automerge-Triggered-By: GH:merwok
2022-04-28 07:50:27 -07:00
Petr Viktorin 6dcbc08c95
gh-91324: List feature macros in the stable ABI manifest, improve tests (GH-32415) 2022-04-28 16:30:28 +02:00
Abhigyan Bose 88dd227959
gh-91984: Fix trailing spaces in multiline test strings in test_argparse (GH-91986) 2022-04-28 14:29:24 +03:00
Dennis Sweeney 37c6db60f9
gh-91869: Fix tracing of specialized instructions with extended args (GH-91945) 2022-04-27 22:36:34 -06:00
Brett Cannon 407c3afe19
gh-91217: deprecate uu (GH-92009)
Automerge-Triggered-By: GH:brettcannon
2022-04-27 20:26:33 -07:00
Serhiy Storchaka 43a8bf1ea4
gh-87999: Change warning type for numeric literal followed by keyword (GH-91980)
The warning emitted by the Python parser for a numeric literal
immediately followed by keyword has been changed from deprecation
warning to syntax warning.
2022-04-27 20:15:14 +03:00
Serhiy Storchaka f60b4c3d74
gh-91810: Expand ElementTree.write() tests to use non-ASCII data (GH-91989) 2022-04-27 19:16:20 +03:00
Victor Stinner 80de0273c0
gh-68966: Deprecate the mailcap module (#91951) 2022-04-26 22:43:50 +02:00
Brett Cannon 1af871eeee
gh-91217: deprecate telnetlib (GH-91958) 2022-04-26 10:45:08 -07:00
Serhiy Storchaka 4153f2cbcb
gh-91917: Fix test_zipfile on non-UTF-8 locale (GH-91921)
Skip the extraction test if file names are not encodable.
2022-04-26 08:01:33 +03:00
Serhiy Storchaka a568585069
gh-91916: Fix test_runpy on non-UTF-8 locale (GH-91920)
If use a non-builtin codec, partially implemented in Python
(e.g. ISO-8859-15), a new RecursionError (with empty error message)
can be raised while handle a RecursionError.

Testing for error message was needed to distinguish
a recursion error from arbitrary RuntimeError. After introducing
RecursionError, it became unnecessary.
2022-04-26 08:00:47 +03:00
Serhiy Storchaka f41c16bf51
gh-91914: Fix test_curses on non-UTF-8 locale (GH-91919) 2022-04-26 07:59:56 +03:00
Serhiy Storchaka 36306cf786
gh-91915: Fix test_netrc on non-UTF-8 locale (GH-91918) 2022-04-26 07:58:41 +03:00
Jelle Zijlstra 5397b5afc1
gh-91860: Add typing.dataclass_transform (PEP 681) (#91861)
Copied from typing-extensions (python/typing#1054, python/typing#1120).

Documentation is intentionally omitted, so we can focus on getting the
runtime part in before the feature freeze.
2022-04-25 20:30:25 -07:00
Brett Cannon d174ebe91e
gh-91217: deprecate sunau (GH-91866) 2022-04-25 16:26:43 -07:00
Gregory P. Smith cd5726fe67
gh-91401: Add a failsafe way to disable vfork. (#91490)
Just in case there is ever an issue with _posixsubprocess's use of
vfork() due to the complexity of using it properly and potential
directions that Linux platforms where it defaults to on could take, this
adds a failsafe so that users can disable its use entirely by setting
a global flag.

No known reason to disable it exists. But it'd be a shame to encounter
one and not be able to use CPython without patching and rebuilding it.

See the linked issue for some discussion on reasoning.

Also documents the existing way to disable posix_spawn.
2022-04-25 16:19:39 -07:00
Victor Stinner 20cc695286
gh-64783: Fix signal.NSIG value on FreeBSD (#91929)
Fix signal.NSIG value on FreeBSD to accept signal numbers greater
than 32, like signal.SIGRTMIN and signal.SIGRTMAX.

* Add Py_NSIG constant.
* Add pycore_signal.h internal header file.
* _Py_Sigset_Converter() now includes the range of valid signals in
  the error message.
2022-04-26 00:13:31 +02:00
David Hewitt 1cd8c29dac
gh-91880: add try/except around `signal.signal` (#91881)
Fixes gh-91880.
2022-04-25 08:56:20 -07:00
Serhiy Storchaka 54d068adfb
gh-91904: Fix setting envvar PYTHONREGRTEST_UNICODE_GUARD (GH-91905)
It always failed on non-UTF-8 locale and prevented running regrtests.
2022-04-25 17:35:14 +03:00
Jelle Zijlstra 93d280141c
gh-90633: Improve error and docs for typing.assert_never (#91720)
Closes #90633

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-04-25 06:40:18 -07:00
Christian Heimes 9ff2f12c87
gh-84461: Include _emscripten_info in pythoninfo output (GH-91907) 2022-04-25 12:58:25 +02:00
Barry Warsaw 4403320727
Rewrite audio.py to jive with image.py (#91886)
Similar to the rewrite of email/mime/image.py and associated test after the
deprecation of imghdr.py, thisrewrites email/mime/audio.py and associated
tests after the deprecation of sndhdr.py.

Closes #91885
2022-04-24 15:50:07 -07:00
Jelle Zijlstra e93d2fbdda
gh-91821: Make decimal test succeed consistently (#91825)
The test relies on precision being set to 9, but some ways of
invoking this test leave it set to 28 instead. I don't know
exactly how it happens, but setting the precision directly should
make the behavior consistent.
2022-04-24 15:02:57 -07:00
Serhiy Storchaka 090721721b
Simplify testing the warning filename (GH-91868)
The context manager result has the "filename" attribute.
2022-04-24 10:23:59 +03:00
Zac Hatfield-Dodds b4e048411f
gh-91230: Concise catch_warnings with simplefilter (#91435) 2022-04-23 17:55:22 -07:00
Brett Cannon 692e9078a1
gh-91217: deprecate spwd (#91846)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-04-23 14:48:17 -07:00
Serhiy Storchaka 6b45076bd6
RE: Add more tests for inline flag "x" and re.VERBOSE (GH-91854) 2022-04-23 12:49:06 +03:00
Christian Heimes 9b5ca5405e
gh-84461: Add sys._emscripten_info, improve docs and build (gh-91781) 2022-04-23 09:52:16 +02:00
Pablo Galindo Salgado 0daa99f68b
gh-88116: Enhance the inspect frame APIs to use the extended position information (GH-91531) 2022-04-23 03:16:48 +01:00
Brett Cannon e7929cba16
gh-91217: deprecate-sndhdr (#91806)
Also inline necessary functionality from `sndhdr` into `email.mime.audio` for `MIMEAudio`.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-04-22 15:48:03 -07:00
Géry Ogam 5576ddbbbc
bpo-46720: Add support for path-like objects to multiprocessing.set_executable for Windows (GH-31279)
This bring the API to be on a par with Unix-like systems.
2022-04-22 15:47:09 -07:00
Serhiy Storchaka 48ec61a89a
gh-91700: Validate the group number in conditional expression in RE (GH-91702)
In expression (?(group)...) an appropriate re.error is now
raised if the group number refers to not defined group.

Previously it raised RuntimeError: invalid SRE code.
2022-04-22 19:53:10 +03:00
Serhiy Storchaka 6ccfa31421
gh-90568: Fix exception type for \N with a named sequence in RE (GH-91665)
re.error is now raised instead of TypeError.
2022-04-22 18:35:28 +03:00
Sam Ezeh bcf14ae433
gh-91291: Accept attributes as keyword arguments in decimal.localcontext (#32242)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-21 21:27:15 -07:00
Matthew Rahtz 5e130a8da4
bpo-43224: Implement pickling of TypeVarTuples (#32119)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-21 21:22:53 -07:00
Brett Cannon 2551a6c92f
gh-91217: deprecate-pipes (GH-91779) 2022-04-21 19:28:34 -07:00
Erlend Egeberg Aasland 29afb7d2ef
gh-69093: Add indexing and slicing support to sqlite3.Blob (#91599)
Authored-by: Aviv Palivoda <palaviv@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
2022-04-21 18:45:16 -07:00
Inada Naoki 1317b70f89
gh-91156: Use `locale.getencoding()` instead of getpreferredencoding (GH-91732)
Co-authored-by: Victor Stinner <vstinner@python.org>
2022-04-22 10:39:24 +09:00
Victor Stinner 364ed94092
gh-89373: _Py_Dealloc() checks tp_dealloc exception (#32357)
If Python is built in debug mode, _Py_Dealloc() now ensures that the
tp_dealloc function leaves the current exception unchanged.
2022-04-21 23:04:01 +02:00
Mark Shannon d44815cabc
GH-88116: Document that PyCodeNew is dangerous, and make PyCode_NewEmpty less dangerous. (GH-91790) 2022-04-21 19:08:36 +01:00
Mark Shannon 944fffee89
GH-88116: Use a compact format to represent end line and column offsets. (GH-91666)
* Stores all location info in linetable to conform to PEP 626.

* Remove column table from code objects.

* Remove end-line table from code objects.

* Document new location table format
2022-04-21 16:10:37 +01:00
Dennis Sweeney f2b4e458b3
gh-91636: Don't clear required fields of function objects (GH-91651) 2022-04-21 02:06:35 -04:00
Iman Kermani 615b24c80b
bpo-42066: CookieJar cookies should not be sorted (GH-22745) 2022-04-20 20:45:24 -05:00
Nick b6d5e3c3c9
bpo-46075: Store localhost cookies in CookieJar (#30108)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-19 13:08:06 -07:00
Ma Lin e4e8895ae3
gh-91616: re module, fix .fullmatch() mismatch when using Atomic Grouping or Possessive Quantifiers (GH-91681)
These jumps should use DO_JUMP0() instead of DO_JUMP():
- JUMP_POSS_REPEAT_1
- JUMP_POSS_REPEAT_2
- JUMP_ATOMIC_GROUP
2022-04-19 17:49:36 +03:00
Victor Stinner 061a8bf77c
gh-91231: Add shutdown_timeout to multiprocessing BaseManager (#32112)
Add an optional keyword 'shutdown_timeout' parameter to the
multiprocessing.BaseManager constructor. Kill the process if
terminate() takes longer than the timeout.

Multiprocessing tests pass test.support.SHORT_TIMEOUT
to BaseManager.shutdown_timeout.
2022-04-19 16:27:00 +02:00
Serhiy Storchaka 74070085da
Add more tests for group names and refs in RE (GH-91695) 2022-04-19 16:56:51 +03:00
penguin_wwy e590379197
gh-90997: bpo-46841: Disassembly of quickened code (GH-32099) 2022-04-19 09:45:08 +01:00
Inada Naoki 6fdb62b1fa
gh-91526: io: Remove device encoding support from TextIOWrapper (GH-91529)
`TextIOWrapper.__init__()` called `os.device_encoding(file.fileno())` if fileno is 0-2 and encoding=None.
But it is very rarely works, and never documented behavior.
2022-04-19 11:44:36 +09:00
Irit Katriel 39a54ba638
gh-74166: Add option to get all errors from socket.create_connection (GH-91586) 2022-04-18 23:15:41 +01:00
Bryan Weber 0860b26a4f
gh-91670: Removes `SO` config variable in `sysconfig.py` (#91671)
* Removes SO config variable in sysconfig

Per @warsaw in https://github.com/python/cpython/issues/63754, this was
deprecated in Python 3.4 and was suggested for removal in Python 3.5.

* Add NEWS

* Update Misc/NEWS.d/next/Library/2022-04-18-15-23-24.gh-issue-91670.6eyChw.rst

Co-authored-by: Éric <merwok@netwok.org>

Co-authored-by: Barry Warsaw <barry@python.org>
Co-authored-by: Éric <merwok@netwok.org>
2022-04-18 14:01:18 -07:00
Kumar Aditya 8c54c3dacc
gh-91576: Speed up iteration of strings (#91574) 2022-04-18 07:18:27 -07:00
Serhiy Storchaka 1c2fcebf3c
gh-91575: Update case-insensitive matching in re to the latest Unicode version (GH-91580) 2022-04-18 12:26:30 +03:00
Brett Cannon ceea0715df
gh-91217: deprecate ossaudiodev (GH-91641)
Automerge-Triggered-By: GH:brettcannon
2022-04-17 15:02:36 -07:00
Dennis Sweeney cec5d858f5
gh-91625: Don't ignore extended args of adaptive opcodes (GH-91626) 2022-04-17 14:04:29 -04:00
Jason R. Coombs 7659681556
gh-91298: Refine traversable (apply changes from importlib_resources 5.7.1) (#91623)
* bpo-47142: Refine traversable (apply changes from importlib_resources 5.7.1)

* Replace changelog referencing github issue.
2022-04-17 11:10:36 -04:00
Jason R. Coombs 67712e71b3
bpo-46126: Restore docstrings in importlib.metadata tests. (#32288) 2022-04-17 11:10:26 -04:00
Dennis Sweeney 37965d2fb4
gh-78607: Replace __ltrace__ with __lltrace__ (GH-91619) 2022-04-16 18:57:00 -04:00
Dennis Sweeney 8560f4a0f2
gh-91462: Make lltrace output human-readable. (GH-91463)
* Transform opcodes into opnames
* Print the whole stack at each opcode, and eliminate prtrace output at each (push/pop/stackadj)
* Display info about the function at each resume_frame
2022-04-16 17:36:29 -04:00
Brett Cannon 9f06ff96cc
gh-91217: deprecate nis (GH-91606)
Automerge-Triggered-By: GH:brettcannon
2022-04-16 13:17:30 -07:00
Irit Katriel d4c4a76ed1
gh-89770: Implement PEP-678 - Exception notes (GH-31317) 2022-04-16 19:59:52 +01:00
Gregory P. Smith 7fa3a5a219
gh-91607: Fix several test_concurrent_futures tests to actually test what they claim (#91600)
* Fix test_concurrent_futures to actually test what it says.

Many ProcessPoolExecutor based tests were ignoring the mp_context
and using the default instead.  This meant we lacked proper test
coverage of all of them.

Also removes the old _prime_executor() worker delay seeding code
as it appears to have no point and causes 20-30 seconds extra
latency on this already long test.  It also interfered with some
of the refactoring to fix the above to not needlessly create their
own executor when setUp has already created an appropriate one.

* Don't import the name from multiprocessing directly to avoid confusion.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2022-04-16 11:46:33 -07:00
Jelle Zijlstra 055760ed9e
gh-89263: Add typing.get_overloads (GH-31716)
Based on suggestions by Guido van Rossum, Spencer Brown, and Alex Waygood.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2022-04-16 09:01:43 -07:00
Matthew Rahtz f2bc12f0d5
bpo-43224: Add tests for TypeVarTuple substitution in Annotated (GH-31846) 2022-04-15 21:24:28 -07:00
Erlend Egeberg Aasland a861756675
gh-69093: Add context manager support to sqlite3.Blob (GH-91562) 2022-04-15 21:21:12 -07:00
Brett Cannon c9e231de85
gh-91217: deprecate nntplib (GH-91543) 2022-04-15 12:32:56 -07:00
Irit Katriel 5d421d7342
gh-90501: Add PyErr_GetHandledException and PyErr_SetHandledException (GH-30531) 2022-04-15 19:57:47 +01:00
Erlend Egeberg Aasland d104f4d21f
gh-69093: Don't allow instantiation of sqlite3.Blob objects (GH-91570) 2022-04-15 09:25:03 -07:00
Jelle Zijlstra b7f83bdd0e
gh-69093: Expose sqlite3.Blob as a class (GH-91550)
I noticed this was missing while writing typeshed stubs. It's
useful to expose it for use in annotations and for exploration.
2022-04-15 06:29:57 -07:00
Oleg Iarygin 6217864fe5
gh-79156: Add start_tls() method to streams API (#91453)
The existing event loop `start_tls()` method is not sufficient for
connections using the streams API. The existing StreamReader works
because the new transport passes received data to the original protocol.
The StreamWriter must then write data to the new transport, and the
StreamReaderProtocol must be updated to close the new transport
correctly.

The new StreamWriter `start_tls()` updates itself and the reader
protocol to the new SSL transport.

Co-authored-by: Ian Good <icgood@gmail.com>
2022-04-15 14:23:14 +02:00
Barry Warsaw 1fcb39ea64
gh-91520: Rewrite imghdr inlining for clarity and completeness (#91521)
* Rewrite imghdr inlining for clarity and completeness

* Move MIMEImage class back closer to the top of the file since it's the
  important thing.
* Use a decorate to mark a given rule function and simplify the rule function
  names for clarity.
* Copy over all the imghdr test data files into the email package's test data
  directory.  This way when imghdr is actually removed, it won't affect the
  MIMEImage guessing tests.
* Rewrite and extend the MIMEImage tests to test for all supported
  auto-detected MIME image subtypes.
* Remove the now redundant PyBanner048.gif data file.

* See https://github.com/python/cpython/pull/91461#discussion_r850313336

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
2022-04-14 17:48:59 -07:00
Erlend Egeberg Aasland ee475430d4
gh-69093: Support basic incremental I/O to blobs in `sqlite3` (GH-30680)
Authored-by: Aviv Palivoda <palaviv@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
Co-authored-by: palaviv <palaviv@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-14 17:02:56 -07:00
Brett Cannon 1b6cd872f4
gh-91217: deprecate msilib (GH-91515) 2022-04-14 12:50:11 -07:00
Inada Naoki 13b17e2a0a
gh-91156: Fix `encoding="locale"` in UTF-8 mode (GH-70056) 2022-04-14 16:00:35 +09:00
Alix Lourme 325d6f5035
gh-87497: Document that urllib.request sends headers in camel case (GH-24661)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-13 19:19:16 -07:00
Brett Cannon 3fc57e8f6f
gh-91217: deprecate imghdr (#91461)
* Deprecate imghdr

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* Update Doc/whatsnew/3.11.rst

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* Inline `imghdr` into `email.mime.image`

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Barry Warsaw <barry@python.org>
2022-04-13 10:47:41 -07:00
Dustin Rodrigues 54f67ad543
bpo-43218: Prevent venv creation when the target directory contains a PATH separator. (GH-24530) 2022-04-13 09:07:10 +01:00
Serhiy Storchaka 15537c51c1
bpo-43224: Forbid TypeVar substitution with Unpack (GH-32031) 2022-04-12 20:08:49 -07:00
Jelle Zijlstra ac6c3de03c
gh-91243: Add typing.Required and NotRequired (PEP 655) (GH-32419)
I talked to @davidfstr and I offered to implement the runtime part of PEP 655
to make sure we can get it in before the feature freeze. We're going to defer
the documentation to a separate PR, because it can wait until after the feature
freeze.

The runtime implementation conveniently already exists in typing-extensions,
so I largely copied that.

Co-authored-by: David Foster <david@dafoster.net>
2022-04-12 12:31:02 -07:00
Irit Katriel e44f988b26
gh-91276: make space for longer opcodes in dis output (GH-91444) 2022-04-12 14:35:56 +01:00