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
Humbled Drugman
117836f123
bpo-26792: Improve docstrings of runpy module run_functions ( #30729 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-04-29 12:22:46 -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
Simon de Vlieger
c6b84a727c
Correct method name typo ( #91970 )
2022-04-27 15:28:56 -06: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
Alexander Shadchin
f882d33778
Fix missing `f` prefix on f-strings (GH-91910)
2022-04-27 09:30:54 +03:00
Victor Stinner
80de0273c0
gh-68966: Deprecate the mailcap module ( #91951 )
2022-04-26 22:43:50 +02:00
Serhiy Storchaka
f703c96cf0
gh-91870: Remove unsupported SRE opcode CALL (GH-91872)
...
It was initially added to support atomic groups, but that
support was never fully implemented, and CALL was only left
in the compiler, but not interpreter and parser.
ATOMIC_GROUP is now used to support atomic groups.
2022-04-26 21:07:25 +03: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
28890427c5
RE: Pre-split the list of opcode names (GH-91859)
...
1. It makes them interned.
2. It allows to add comments to individual opcodes.
2022-04-23 18:49:23 +03:00
Serhiy Storchaka
130a8c386b
gh-91308: Simplify parsing inline flag "x" (verbose) (GH-91855)
2022-04-23 12:50:42 +03: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
f912cc0e41
gh-91575: Add a script for generating data for case-insensitive matching in re (GH-91660)
...
Also test that all extra cases are in BMP.
2022-04-22 21:37:46 +03: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
Victor Stinner
c77953b23e
Revert "gh-85567: Register a cleanup function to close files for FileType objects in argparse ( #32257 )" ( #91771 )
...
This reverts commit 328dbc051f
.
2022-04-21 03:10:51 +02: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
Irit Katriel
3c43806513
gh-74166: make all_errors keyword-only (GH-91704)
2022-04-19 18:16:20 +01: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
Irit Katriel
5b37b49ebc
gh-74166: break cycle by clearing the list instead of dropping its reference (GH-91685)
2022-04-19 10:09:10 +01:00
penguin_wwy
e590379197
gh-90997: bpo-46841: Disassembly of quickened code (GH-32099)
2022-04-19 09:45:08 +01:00
Oleg Iarygin
7fbc7f6128
gh-91098: Use Argument Clinic for Object/classobject.c to fix docstrings ( #31711 )
...
Closes GH-91098.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-18 19:56:53 -07: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
Oleg Iarygin
804ea2da97
gh-91265: Make old ctypes.macholib tests runned by `python -m test` (gh-32094)
...
* Move tests from ctypes.macholib.dy* to ctypes.test
2022-04-18 09:27:09 +02:00
Aditya Aggarwal
d7d4a0583f
Update: usage doc for heappushpop (GH-91451)
2022-04-17 23:12:33 -05:00
achhina
328dbc051f
gh-85567: Register a cleanup function to close files for FileType objects in argparse ( #32257 )
...
* bpo-41395: Register a cleanup function to close files for FileType objects in argparse
* Added import as top level import, and renamed file as fh.
2022-04-17 22:53:37 -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
Sebastian Rittau
25af5ea40f
gh-86178: wsgiref.types: Add missing TypeAlias annotations (GH-91608)
2022-04-16 13:37:02 -07: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
Sebastian Rittau
0ddc63b240
gh-86178: Add wsgiref.types (GH-32335)
2022-04-16 10:37:58 -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
msoxzw
42fabc3ea7
gh-91487: Optimize asyncio UDP speed (GH-91488)
...
Fix #91487
When transferring a small file, e.g. 256 KiB, the speed of this PR is comparable. However, if a large file, e.g. 65536 KiB, is transferred, asyncio UDP will be over 100 times faster than the original. The speed is presumably significantly faster if a larger file is transferred, e.g. 1048576 KiB.
Automerge-Triggered-By: GH:gpshead
2022-04-15 12:59:01 -07:00
Brett Cannon
c9e231de85
gh-91217: deprecate nntplib (GH-91543)
2022-04-15 12:32:56 -07:00
Irit Katriel
ea2ae02607
gh-91276: Make JUMP_IF_TRUE_OR_POP/JUMP_IF_FALSE_OR_POP relative (GH-32215)
2022-04-15 20:19:24 +01: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
slateny
0fc3517cf4
gh-90879: Fix missing parameter for put_nowait() (GH-91514)
2022-04-14 17:23:57 +09: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
Nikita Sobolev
63a032270e
gh-90971: suppress deprecation warning in `test_lib2to3`(GH-31464)
...
Fixes GH-90971
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
2022-04-13 07:42:25 -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
Serhiy Storchaka
474fdbe9e4
bpo-47152: Automatically regenerate sre_constants.h (GH-91439)
...
* Move the code for generating Modules/_sre/sre_constants.h from
Lib/re/_constants.py into a separate script
Tools/scripts/generate_sre_constants.py.
* Add target `regen-sre` in the makefile.
* Make target `regen-all` depending on `regen-sre`.
2022-04-12 18:34:06 +03:00
Ilya Leoshkevich
943ca5e1d6
gh-90839: Forward gzip.compress() compresslevel to zlib (gh-31215)
2022-04-12 22:46:40 +09:00
Irit Katriel
e44f988b26
gh-91276: make space for longer opcodes in dis output (GH-91444)
2022-04-12 14:35:56 +01:00
Jack DeVries
f33e2c87a8
gh-88513: clarify shutil.copytree's dirs_exist_ok arg (GH-91434)
...
* add a paragraph to document this kwarg in detail
* update docstring in the source accordingly
2022-04-11 17:57:52 -07:00
Erlend Egeberg Aasland
9ebcece82f
gh-79097: Add support for aggregate window functions in sqlite3 (GH-20903)
2022-04-11 17:55:59 -07:00
Brett Cannon
f45aa8f304
gh-91217: deprecate crypt (GH-91459)
2022-04-11 17:02:19 -07:00
Brett Cannon
3869a839d5
gh-47061: Deprecate `chunk` (GH-91419)
2022-04-11 15:02:41 -07:00
Dennis Sweeney
8be8949116
gh-91117: Ensure integer mod and pow operations use cached small ints (GH-31843)
2022-04-11 16:07:09 -04:00
Adrian Garcia Badaracco
5f2abae61e
bpo-44807: Allow Protocol classes to define __init__ (GH-31628)
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-11 07:51:25 -07:00
John Belmonte
b0b836b20c
bpo-45995: add "z" format specifer to coerce negative 0 to zero (GH-30049)
...
Add "z" format specifier to coerce negative 0 to zero.
See https://github.com/python/cpython/issues/90153 (originally https://bugs.python.org/issue45995 ) for discussion.
This covers `str.format()` and f-strings. Old-style string interpolation is not supported.
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2022-04-11 15:34:18 +01:00
Irit Katriel
dd207a6ac5
bpo-47120: make POP_JUMP_IF_TRUE/FALSE/NONE/NOT_NONE relative (GH-32400)
2022-04-11 10:40:24 +01:00
Inada Naoki
6773203487
bpo-47000: Add `locale.getencoding()` (GH-32068)
2022-04-09 09:54:54 +09:00
Brett Cannon
cd29bd13ef
bpo-47061: deprecate cgi and cgitb (GH-32410)
...
Part of PEP 594.
2022-04-08 17:15:35 -07:00
Petr Viktorin
1c2fddddae
Add feature macro PY_HAVE_THREAD_NATIVE_ID to the stable ABI definition (GH-32365)
2022-04-08 14:35:11 +02:00
Mark Shannon
5b4a4b6f09
Add new PyFrame_GetLasti C-API function (GH-32413)
2022-04-08 12:18:57 +01:00
Brett Cannon
87eec70d97
Deprecate audioop (GH-32392)
2022-04-07 12:27:35 -07:00
Christian Heimes
2b16a08bc7
bpo-40280: Detect missing threading on WASM platforms (GH-32352)
...
Co-authored-by: Brett Cannon <brett@python.org>
2022-04-07 09:22:47 +02:00
Steve Dower
2390b2236d
bpo-47239: Fixes py.exe output when run in a virtual environment. (GH-32364)
2022-04-07 00:09:54 +01:00
Jeremy Kloth
612e422c6e
bpo-46576: Speed up test_peg_generator by using a static library for shared sources (GH-32338)
...
Speed up test_peg_generator by using a static library for shared sources to avoid recompiling as much code.
2022-04-06 14:55:58 -07:00
Brett Cannon
32b33879c2
bpo-47061: use `warnings._deprecated()` with asynchat, asyncore, and smtpd (GH-32350)
2022-04-06 11:22:39 -07:00
Géry Ogam
59a99ae277
Minor code nit: Move an unrelated statement out of a try clause in Sequence.index (GH-32330)
2022-04-06 13:03:36 -05:00
Serhiy Storchaka
884eba3c76
bpo-26579: Add object.__getstate__(). (GH-2821)
...
Copying and pickling instances of subclasses of builtin types
bytearray, set, frozenset, collections.OrderedDict, collections.deque,
weakref.WeakSet, and datetime.tzinfo now copies and pickles instance attributes
implemented as slots.
2022-04-06 20:00:14 +03:00
Serhiy Storchaka
50872dbadc
bpo-47227: Suppress expression chaining for more RE parsing errors (GH-32333)
2022-04-06 19:54:44 +03:00
Serhiy Storchaka
b09184bf05
bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)
...
They were undocumented and never working.
2022-04-06 19:53:50 +03:00
Ken Jin
da922409ac
Fix whitespace/indentation issues in test_sys (GH-32369)
2022-04-06 23:40:51 +08:00
Victor Stinner
14a9b4895b
bpo-40421: test_capi uses assertEqual(), not assertEquals() (GH-32361)
...
unittest.TestCase.assertEquals() alias is depracated. Fix the
warning:
Lib/test/test_capi.py:1100: DeprecationWarning: Please use assertEqual instead.
self.assertEquals(frame.f_locals, _testcapi.frame_getlocals(frame))
2022-04-06 15:12:38 +02:00
Steve Dower
074da78802
bpo-47103: Copy pgort140.dll into output directory when building PGInstrument on Windows (GH-32083)
2022-04-06 11:56:31 +01:00
Pablo Galindo
2e49bd06c5
Python 3.11.0a7
2022-04-05 20:54:03 +01:00
Brett Cannon
c1d93b6411
bpo-47061: deprecate the `aifc` module (GH-32134)
...
Co-authored-by: Christian Heimes <christian@python.org>
2022-04-05 12:05:48 -07:00
Sam Ezeh
050a8f94c6
bpo-4833: Add ZipFile.mkdir (GH-32160)
2022-04-05 11:41:38 -07:00
Hugo van Kemenade
75280944e5
bpo-46607: Add DeprecationWarning for LegacyInterpolation, deprecated in docs since 3.2 (GH-30927)
2022-04-05 08:15:11 -07:00
Jelle Zijlstra
cfb849a326
bpo-47088: Add typing.LiteralString (PEP 675) (GH-32064)
...
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-04-05 07:21:03 -07:00
Erlend Egeberg Aasland
a7551247e7
bpo-41930: Add support for SQLite serialise/deserialise API (GH-26728)
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-04-05 07:15:25 -07:00
Matthieu Dartiailh
aa0f056a00
bpo-47212: Improve error messages for un-parenthesized generator expressions (GH-32302)
2022-04-05 14:47:13 +01:00
Irit Katriel
0aa8d5cbd8
bpo-47120: make JUMP_NO_INTERRUPT relative (GH-32221)
2022-04-05 12:49:08 +01:00
Irit Katriel
32091df41c
bpo-47186: Replace JUMP_IF_NOT_EG_MATCH by CHECK_EG_MATCH + jump (GH-32309)
2022-04-05 12:06:22 +01:00
Ronald Oussoren
6aaf4cd866
bpo-46890: Fix setting of sys._base_executable with framework builds on macOS (GH-31958)
...
The side effect of this bug was that venv environments directly
used the main interpreter instead of the intermediate stub executable,
which can cause problems when a script uses system APIs that
require the use of an application bundle.
2022-04-05 02:05:36 -04:00
Matthew Rahtz
772d8080c9
bpo-43224: typing: Add tests for pickling and copying of unpacked native tuple (GH-32159)
2022-04-04 19:52:42 -07:00
Shantanu
5a4973e29f
bpo-46998: Allow subclassing Any at runtime (GH-31841)
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-04 19:35:29 -07:00
180909
48269ea9fd
bpo-46484:Add test for Calendar.iterweekdays (GH-30825)
2022-04-04 18:16:56 +01:00
Christian Heimes
d1b1c885d8
bpo-47208: Allow vendors to override CTYPES_MAX_ARGCOUNT (GH-32297)
2022-04-04 19:13:42 +02:00
Serhiy Storchaka
ff2cf1d7d5
bpo-47152: Remove unused import in re (GH-32298)
2022-04-04 12:00:53 +03:00
Serhiy Storchaka
1578f06c1c
bpo-47152: Move sources of the _sre module into a subdirectory (GH-32290)
2022-04-04 10:53:26 +03:00
Inada Naoki
4216dce04b
bpo-47000: Make `io.text_encoding()` respects UTF-8 mode (GH-32003)
...
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2022-04-04 11:46:57 +09:00
Jason R. Coombs
84acb5cad1
bpo-46126: Restore 'descriptions' when running tests internally. (GH-32128)
...
This reverts commit a941e5927f
(GH-30194).
Automerge-Triggered-By: GH:jaraco
2022-04-03 12:33:28 -07:00
Ma Lin
6e3eee5c11
bpo-23689: re module, fix memory leak when a match is terminated by a signal or memory allocation failure (GH-32283)
2022-04-03 19:16:20 +03:00
Christian Heimes
b82cdd1dac
bpo-47205: Skip error check of sched_get/setaffinity on FreeBSD (GH-32285)
2022-04-03 17:03:49 +02:00
Serhiy Storchaka
1be3260a90
bpo-47152: Convert the re module into a package (GH-32177)
...
The sre_* modules are now deprecated.
2022-04-02 11:35:13 +03:00
Christian Heimes
4ed8a9a589
bpo-40280: Enable most file-at() and nanosleep APIs again (GH-32238)
2022-04-02 10:13:44 +02:00
Christian Heimes
59be9cd748
bpo-40280: Detect if WASM platform supports threading (GH-32243)
...
Automerge-Triggered-By: GH:tiran
2022-04-02 01:12:44 -07:00
Jeremy Kloth
0f68c208fa
bpo-47131: Speedup AST comparisons in test_unparse by using node traversal (GH-32132)
2022-04-02 02:54:04 +01:00
Christian Heimes
082d3495d0
bpo-40280: Emscripten fork_exec now fails early (GH-32224)
2022-04-01 21:20:56 +02:00
Jeremy Kloth
76b8a075b8
bpo-47089: Avoid test_compileall failures on Windows (GH-32037)
2022-04-01 20:13:01 +02:00
Irit Katriel
04e07c258f
bpo-47186: Replace JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH + jump (GH-32231)
2022-04-01 13:59:38 +01:00
Andrew Svetlov
d4bb38f82b
bpo-47167: Allow overriding a future compliance check in asyncio.Task (GH-32197)
2022-04-01 04:25:15 +03:00
Mark Shannon
74b95d86e0
bpo-40421: Add missing getters for frame object attributes to C-API. (GH-32114)
2022-03-31 17:13:25 +01:00
Christian Heimes
44e915028d
bpo-47182: Fix crash by named unicode characters after interpreter reinitialization (GH-32212)
...
Automerge-Triggered-By: GH:tiran
2022-03-31 08:14:50 -07:00
Géry Ogam
5458b7e39e
Remove unnecessary registration of weakref.WeakSet to _collections_abc.Set (GH-32211)
2022-03-31 09:11:35 -05:00
Irit Katriel
a00518d9ad
bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD (GH-32115)
2022-03-31 14:14:15 +01:00
Steve Dower
f3d5715492
bpo-46566: Make test_launcher more robust to a variety of installs (GH-32204)
2022-03-30 22:18:40 +01:00
Oleg Iarygin
a03a09e068
Replace with_traceback() with exception chaining and reraising (GH-32074)
2022-03-30 15:28:20 +03:00
Andrew Svetlov
f08a191882
bpo-39622: Interrupt the main asyncio task on Ctrl+C (GH-32105)
...
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-03-30 15:15:06 +03:00
Daniël van Noord
75eee1d57e
bpo-34861: Make cumtime the default sorting key for cProfile (GH-31929)
2022-03-30 12:10:10 +01:00
Hugo van Kemenade
6881ea936e
bpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124)
2022-03-30 12:00:27 +01:00
Irit Katriel
63f32fae79
bpo-26120: do not exclude __future__ import in pydoc of the __future__ module itself (GH-32180)
2022-03-29 23:07:15 +01:00
Dave Goncalves
dc2d8404a3
bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes (GH-25480)
...
* bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes
* GH-25480: remove trailing whitespace in ctypes doc
* GH-25480: add news entry blurb
* GH-25480: corrected formatting error in news blurb
* GH-25480: simplified, corrected formatting in news blurb
* GH-25480: remove trailing whitespace in news blurb
* GH-25480: fixed class markup in news blurb
* GH-25480: fixed unsupported type tests and naming per review comments
* GH-25480: fixed whitepace errors
* condensed base class selection for unsupported byte order tests
* added versionadded tags for new EndianUnion classes
2022-03-29 14:26:27 -07:00
Sam Ezeh
755be9b150
bpo-14265: Adds fully qualified test name to unittest output (GH-32138)
...
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-03-29 18:02:09 +03:00
Ma Lin
356997cccc
bpo-35859: Fix a few long-standing bugs in re engine (GH-12427)
...
In rare cases, capturing group could get wrong result.
Regular expression engines in Perl and Java have similar bugs.
The new behavior now matches the behavior of more modern
RE engines: in the regex module and in PHP, Ruby and Node.js.
2022-03-29 17:31:01 +03:00
Steve Dower
bad86a621a
bpo-46566: Add new py.exe launcher implementation (GH-32062)
2022-03-29 00:21:08 +01:00
Vincent Bernat
5c30388f3c
bpo-27929: resolve names only for AF_INET/AF_INET6 with asyncio (GH-32131)
...
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-03-29 00:50:26 +03:00
Maciej Górski
7b44ade018
bpo-47129: Add more informative messages to f-string syntax errors (32127)
...
* Add more informative messages to f-string syntax errors
* 📜 🤖 Added by blurb_it.
* Fix whitespaces
* Change error message
* Remove the 'else' statement (as sugested in review)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2022-03-28 17:08:36 -04:00
Irit Katriel
15ba8167d7
bpo-26120: make pydoc exclude __future__ imports from the data block of the module (GH-30888)
2022-03-28 22:02:57 +01:00
Jonathan
66584c890d
Fix typo in the sqlite3 docs (GH-31915)
...
Co-authored-by: Jonathan <89750679+AHypnotoad@users.noreply.github.com>
2022-03-28 11:44:41 -07:00
Kumar Aditya
58448cbd96
bpo-47127: Specialize calls for fastcall c methods with keywords (GH-32125)
...
* add PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS
2022-03-28 03:53:25 +08:00
Jouke Witteveen
c12ba6b2ff
bpo-45171: Remove tests of deprecated logger.warn(). (GH-32139)
2022-03-27 19:22:05 +01:00
Jouke Witteveen
5ca6d7469b
bpo-45171: Fix stacklevel handling in logging. (GH-28287)
2022-03-27 14:49:28 +01:00
Matthew Rahtz
e8e737bcf6
bpo-43224: Implement PEP 646 grammar changes (GH-31018)
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-26 09:55:35 -07:00
Andrew Svetlov
bad6ffaa64
bpo-47062: Rename factory argument to loop_factory (GH-32113)
2022-03-26 00:26:23 +02:00
Duprat
d03acd7270
bpo-43352: Add a Barrier object in asyncio lib (GH-24903)
...
Co-authored-by: Yury Selivanov <yury@edgedb.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-03-26 00:01:21 +02:00
Andrew Svetlov
20e6e5636a
bpo-47118: Fix asyncio.Runner tests error (32117)
2022-03-25 19:59:29 +02:00
Andrew Svetlov
4119d2d7c9
bpo-47062: Implement asyncio.Runner context manager (GH-31799)
...
Co-authored-by: Zachary Ware <zach@python.org>
2022-03-24 21:51:16 +02:00
Shantanu
3354245daf
bpo-46480: rephrase typing.assert_type docs (GH-32069)
...
The goal here is to reduce potential confusion between
`assert_type(val, type)` and `assert isinstance(val, typ)`.
The former is meant to ask a type checker to confirm a fact, the latter
is meant to tell a type checker a fact. The behaviour of the latter more
closely resembles what I'd expect from the prior phrasing of
"assert [something] to the type checker".
2022-03-23 19:15:06 -07:00
Andrew Svetlov
ff619c7dfe
bpo-47104: Rewrite asyncio.to_thread tests to use IsolatedAsyncioTestCase (GH-32086)
2022-03-23 23:17:07 +02:00
Christian Heimes
48e2010d92
bpo-47101: list only activated algorithms in hashlib.algorithms_available (GH-32076)
2022-03-23 13:30:05 -07:00
Andrew Svetlov
0360e9f346
bpo-46829: Deprecate passing a message into Future.cancel() and Task.cancel() (GH-31840)
...
After a long deliberation we ended up feeling that the message argument for Future.cancel(), added in 3.9, was a bad idea, so we're deprecating it in 3.11 and plan to remove it in 3.13.
2022-03-23 08:43:05 -07:00
Daniël van Noord
7ba7eae508
bpo-2604: Make doctest.DocTestCase reset globs in teardown (GH-31932)
...
Co-authored-by: Piet Delport
Co-authored-by: Hugo Lopes Tavares
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-22 14:01:15 -07:00
Christian Heimes
e03db6d5be
bpo-45150: Fix testing under FIPS mode (GH-32046)
2022-03-22 16:40:43 +01:00
Serhiy Storchaka
492d4109f4
bpo-42885: Optimize search for regular expressions starting with "\A" or "^" (GH-32021)
...
Affected functions are re.search(), re.split(), re.findall(), re.finditer()
and re.sub().
2022-03-22 17:27:55 +02:00
Andrew Svetlov
32e77154dd
bpo-45997: Fix asyncio.Semaphore re-acquiring order (GH-31910)
...
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-03-22 16:02:51 +02:00
Andrew Svetlov
673755bfba
bpo-47076: Make asyncio.Queue stable on slow test boxes (GH-32040)
2022-03-22 16:00:23 +02:00
Jeremy Kloth
88872a29f1
bpo-47084: Clear Unicode cached representations on finalization (GH-32032)
2022-03-22 13:53:51 +01:00
Pablo Galindo Salgado
7d810b6a4e
bpo-46838: Syntax error improvements for function definitions (GH-31590)
2022-03-22 11:38:41 +00:00
Christian Heimes
deeaac49e2
bpo-40280: Skip socket, fork, subprocess tests on Emscripten (GH-31986)
...
- Add requires_fork and requires_subprocess to more tests
- Skip extension import tests if dlopen is not available
- Don't assume that _testcapi is a shared extension
- Skip a lot of socket tests that don't work on Emscripten
- Skip mmap tests, mmap emulation is incomplete
- venv does not work yet
- Cannot get libc from executable
The "entire" test suite is now passing on Emscripten with EMSDK from git head (91 suites are skipped).
2022-03-22 03:04:36 -07:00