Commit Graph

109916 Commits

Author SHA1 Message Date
uniocto 5f2eb87f28
bpo-23750: Document os-system, subprocess. Patch by Martin Panter. (GH-26016)
* Document os-system, subprocess Patch

* Update Doc/library/os.rst

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-05-11 13:47:05 -07:00
Irit Katriel 12e7d10dfd
bpo-25821: Fix inaccuracy in threading.enumerate/is_alive documentation (#23192) 2021-05-11 18:55:24 +01:00
Petr Viktorin b05955d6f5
bpo-43795: PEP 652 user documentation (GH-25668)
- Reformat the C API and ABI Versioning page (and extend/clarify a bit)
- Rewrite the stable ABI docs into a general text on C API Compatibility
- Add a list of Limited API contents, and notes for the individual items. 
- Replace `Include/README.rst` with a link to a devguide page with the same info
2021-05-11 07:04:33 -07:00
Julien Palard d1b81574ed
Doc: http.server: directory is not a class attribute, but an argument. (GH-26017)
* Doc: http.server: directory is not a class attribute, but an argument.
2021-05-10 18:26:53 -07:00
Giampaolo Rodola c0190137ca
bpo-43743 add comment stating _USE_CP_SENDFILE should not be removed (#26024) 2021-05-10 22:45:06 +02:00
Leonardo Lai 21fbbb98ba
bpo-44074: let patchcheck infer the base branch name (GH-25991) 2021-05-10 19:34:27 +01:00
dhoekstra2000 2a031723ee
bpo-43558: Add note about base class initialization to dataclasses doc (GH-25967) 2021-05-10 09:30:22 -04:00
Dennis Sweeney 45862f9f5e
Prevent access outside buffer (GH-26012) 2021-05-10 10:10:22 +01:00
Zachary Ware 8e8307d70b
Revert test for Tix deprecation warning (GH-26005)
Added in bpo-41730 (GH-22186), the test apparently causes refleaks.  The
test isn't worth hunting them down, so it's simply reverted.

This partially reverts commit 4a2d98a1e9.
2021-05-09 01:58:35 -05:00
Eric V. Smith 801497a115
Fix a word in dataclasses docs. (GH-26003) 2021-05-08 22:20:04 -04:00
Batuhan Taskaya 3d98ececda
bpo-43417: Better buffer handling for ast.unparse (GH-24772) 2021-05-09 02:32:04 +03:00
Serhiy Storchaka a0bd9e9c11
bpo-28307: Convert simple C-style formatting with literal format into f-string. (GH-5012)
C-style formatting with literal format containing only format codes
%s, %r and %a (with optional width, precision and alignment)
will be converted to an equivalent f-string expression.

It can speed up formatting more than 2 times by eliminating
runtime parsing of the format string and creating temporary tuple.
2021-05-08 22:33:10 +03:00
Pablo Galindo 6692dc1ca9
bpo-43149: Correct the syntax error message for multiple exception types (GH-25996)
Automerge-Triggered-By: GH:pablogsal
2021-05-08 11:24:41 -07:00
Pablo Galindo 873275e64a
Update references to master to point to main in customsourcelink.html (GH-25993) 2021-05-08 17:13:24 +01:00
Batuhan Taskaya 17229ab4a2
bpo-42725: mention the changes on what's new (GH-25974) 2021-05-08 14:49:40 +03:00
pxinwr b063b02eab
bpo-31904: Correct error string in test_file_not_exists() for VxWorks (GH-25965)
The error string on VxWorks is "no such file or directory" for FileNotFoundError. That is, the 1st letter of the error string has lower case.
2021-05-08 01:03:41 -07:00
Senthil Kumaran 80d250d68c
Fix make libainstall. (GH-25980)
Initial patch by Benno Leslie.
2021-05-07 23:38:08 -07:00
Ned Deily 42fcad26a4
Fix the whatsnew/3.11.rst to link to the blurb-generated changelog. (GH-25979) 2021-05-07 23:25:37 -04:00
Pablo Galindo c40ab5b699
Update the SOURCE_URI in pyspecific.py to point to the new branch (GH-25977) 2021-05-08 03:43:23 +01:00
Ned Deily 164d6e1bb1
Add the blurbify of the 3.10.0b1 changelog to the main branch (GH-25976) 2021-05-07 22:31:01 -04:00
Inada Naoki 4d4be47705
Do not use Py_ssize_clean_t (GH-25940) 2021-05-08 10:17:37 +09:00
E-Paine 092f9ddb5e
bpo-44026: Idle - display interpreter's 'did you mean' hints (GH-25912)
A C function accessible by the default exception handler, but not by python code,
finds the existing name closest to the name causing a name or attribute error.  For
such errors, call the default handler after capturing stderr and retrieve its message line.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-05-07 19:52:01 -04:00
Batuhan Taskaya b2ec37a722
bpo-44063: set the missing end locations on the compiler (GH-25956) 2021-05-07 20:49:06 +03:00
wyz23x2 4a2d98a1e9
bpo-41730: Show deprecation warnings for tkinter.tix (GH-22186)
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
2021-05-07 10:53:23 -05:00
Mark Shannon adcd220556
bpo-40222: "Zero cost" exception handling (GH-25729)
"Zero cost" exception handling.

* Uses a lookup table to determine how to handle exceptions.
* Removes SETUP_FINALLY and POP_TOP block instructions, eliminating (most of) the runtime overhead of try statements.
* Reduces the size of the frame object by about 60%.
2021-05-07 15:19:19 +01:00
Senthil Kumaran b32c8e9795
Simple Enhancement. Add missing return statements in ftplib documentation. (GH-25968) 2021-05-07 07:08:47 -07:00
Erlend Egeberg Aasland 0988ed09b4
bpo-44047: Remove unused argument to _pysqlite_seterror (GH-25915) 2021-05-07 16:15:01 +03:00
Julien Palard a0cb2e4302
Doc: What's new in Python 3.11 (GH-25963) 2021-05-07 10:06:45 +02:00
Inada Naoki 9ad8f109ac
bpo-44029: Remove Py_UNICODE APIs (GH-25881)
Remove deprecated `Py_UNICODE` APIs: `PyUnicode_Encode`,
`PyUnicode_EncodeUTF7`, `PyUnicode_EncodeUTF8`,
`PyUnicode_EncodeUTF16`, `PyUnicode_EncodeUTF32`,
`PyUnicode_EncodeLatin1`, `PyUnicode_EncodeMBCS`,
`PyUnicode_EncodeDecimal`, `PyUnicode_EncodeRawUnicodeEscape`,
`PyUnicode_EncodeCharmap`, `PyUnicode_EncodeUnicodeEscape`,
`PyUnicode_TransformDecimalToASCII`, `PyUnicode_TranslateCharmap`,
`PyUnicodeEncodeError_Create`, `PyUnicodeTranslateError_Create`.

See :pep:`393` and :pep:`624` for reference.
2021-05-07 15:58:29 +09:00
Inada Naoki 4ebf4a6bfa
bpo-40943: Fix skipitem() didn't raise SystemError (GH-25937)
`convertitem()` raises `SystemError` when '#' is used without `PY_SSIZE_T_CLEAN`.
This commit makes `skipitem()` raise it too.
2021-05-07 11:56:48 +09:00
Scott Noyes ee8e7c2fa9
Fix minor grammar problems in dataclasses documentation (GH-25948)
Some missing words; some odd word choices.
2021-05-06 17:52:46 -04:00
Tal Einat 92ceb1c840
docs: clearly document that ":#X" string formatting results in "0X..." (GH-25941)
* clearly document that ":#X" string formatting results in "0X..."

* put back the "serial comma"
2021-05-06 12:27:29 -07:00
Stephen Rosen fb42725561
bpo-43972: Set content-length to 0 for http.server.SimpleHTTPRequestHandler 301s (GH-25705)
* Set content-length for simple http server 301s

When http.server.SimpleHTTPRequestHandler sends a 301 (Moved
Permanently) due to a missing file, it does not set a Content-Length
of 0. Unfortunately, certain clients can be left waiting for the
connection to be closed in this circumstance, even though no body
will be sent. At time of writing, both curl and Firefox demonstrate
this behavior.

* Test Content-Length on simple http server redirect

When serving a redirect, the SimpleHTTPRequestHandler will now send
`Content-Length: 0`. Several tests for http.server already cover
various behaviors and checks including redirection. This change only
adds one check for the expected Content-Length on the simplest case
for a redirect.

* Add news entry for SimpleHTTPRequestHandler fix

* Clarify the specific kind of 301

Co-authored-by: Senthil Kumaran <skumaran@gatech.edu>
2021-05-06 12:25:52 -07:00
Linus Groh 329a47f052
bpo-44059: Register the SerenityOS Browser in the webbrowser module (GH-25947)
Automerge-Triggered-By: GH:gpshead
2021-05-06 12:01:12 -07:00
Raymond Hettinger 55b78ce3c4
Eliminate duplicated calculations and unnecessary work for linear regression (GH-25922) 2021-05-06 07:43:13 -07:00
Christian Heimes e8525567dd
bpo-38820: Test with OpenSSL 3.0.0-alpha16 (GH-25942)
Also use new make target to install FIPS provider.
2021-05-06 16:30:12 +02:00
Dong-hee Na 698e9a8211
bpo-44017: Update test_contextlib_async not to emit DeprecationWarn (GH-25918) 2021-05-06 23:10:52 +09:00
Senthil Kumaran 985ac01637
bpo-43882 Remove the newline, and tab early. From query and fragments. (GH-25921) 2021-05-05 15:50:05 -07:00
Gen Xu 47895e31b6
bpo-44022: Fix http client infinite line reading (DoS) after a HTTP 100 Continue (GH-25916)
Fixes http.client potential denial of service where it could get stuck reading lines from a malicious server after a 100 Continue response.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2021-05-05 15:42:41 -07:00
Gregory P. Smith da5c808fb5
bpo-36515: Disable unaligned memory access in _sha3 on ARM (GH-25927)
Contributed-By: Matthias Klose

Automerge-Triggered-By: GH:tiran
2021-05-05 13:55:33 -07:00
Alfred Perlstein 565a31804c
bpo-35753: Fix crash in doctest with unwrap-able functions (#22981)
Ignore objects that inspect.unwrap throws due to
too many wrappers.  This is a very rare case, however
it can easily be surfaced when a module under doctest
imports unitest.mock.call into its namespace.

We simply skip any object that throws this exception.
This should handle the majority of cases.
2021-05-05 19:33:17 +02:00
Petr Viktorin cf86996a8e
bpo-43795: Mark PyCodec_Unregister as a function, not data, in stable ABI (GH-25920) 2021-05-05 19:32:21 +02:00
Dong-hee Na f4013eba41
typing: format patch with make patchcheck (GH-25919) 2021-05-06 02:08:20 +09:00
Kevin Follstad 96d5c7038b
bpo-44040: Update broken link in pathlib source (GH-25905) 2021-05-05 10:08:26 +02:00
Brad Larsen 23362f8c30
Eliminate duplicated assignment in _randommodule.c (GH-25904) 2021-05-04 20:41:11 -07:00
Raymond Hettinger 6fdc4d37f3
bpo-40521: Convert deque freelist from global vars to instance vars (GH-25906) 2021-05-04 17:08:31 -07:00
karl ding 355bae8882
bpo-40297: Fix test_socket.CANTest.testSendFrame (GH-19548)
The address tuple for CAN_RAW no longer returns the address family
after the introduction of CAN ISO-TP support in a30f6d45ac. However,
updating test_socket.CANTest.testSendFrame was missed as part of the
change, so the test incorrectly attempts to index past the last tuple
item to retrieve the address family.

This removes the now-redundant check for equality against socket.AF_CAN,
as the tuple will not contain the address family.
2021-05-04 15:37:13 -05:00
Jean-Abou-Samra 09490298d4
Clarify rx parameter of compileall functions (#25857) 2021-05-04 21:37:39 +02:00
Raymond Hettinger 1add719516
Fix inconsistent fsum vs sum and fmean vs mean (GH-25898) 2021-05-04 11:27:28 -07:00
Ikko Ashimine 9ee8448243
Fix typo in ast.py (GH-25740)
parantheses -> parentheses
2021-05-04 06:18:58 -07:00