Commit Graph

113849 Commits

Author SHA1 Message Date
Victor Stinner d435a18c53
gh-94199: Remove ssl.RAND_pseudo_bytes() function (#94202)
Remove the ssl.RAND_pseudo_bytes() function, deprecated in Python
3.6: use os.urandom() or ssl.RAND_bytes() instead.
2022-06-24 11:05:53 +02:00
Victor Stinner 6e33ba114f
gh-94169: Remove deprecated io.OpenWrapper (#94170)
Remove io.OpenWrapper and _pyio.OpenWrapper, deprecated in Python
3.10: just use :func:`open` instead. The open() (io.open()) function
is a built-in function. Since Python 3.10, _pyio.open() is also a
static method.
2022-06-24 08:46:53 +02:00
Brandt Bucher 5075e81c51
Add more tests for throwing into yield from (GH-94097) 2022-06-23 16:48:28 -07:00
Pablo Galindo Salgado 8e6eccabe8
Add ABI dump script (#94135) 2022-06-23 22:52:43 +01:00
Sam Ezeh 28a2ccfff2
[Enum] Remove automatic docstring generation (GH-94188) 2022-06-23 13:35:37 -07:00
Myron Walker 9a95fa9267
gh-91219: Add an index_pages default list and parameter to SimpleHTTPRequestHandler (GH-31985)
* Add an index_pages default list to SimpleHTTPRequestHandler and an
optional constructor parameter that allows the default indexes pages
list to be overridden.  This makes it easy to set a new index page name
without having to override send_head.
2022-06-23 13:30:44 -07:00
Guido van Rossum 4e796f5646
gh-93771: Clarify how deepfreeze.py is run (#94150) 2022-06-23 09:31:39 -07:00
wookie184 2fc83ac3af
gh-92858: Improve error message for some suites with syntax error before ':' (#92894) 2022-06-23 17:31:09 +01:00
Ethan Furman b4e0d6124a
[Enum] fix typo (GH-94158) 2022-06-23 07:48:25 -07:00
Kumar Aditya 5b6e5762ca
GH-91742: Fix pdb crash after jump (GH-94171) 2022-06-23 15:19:13 +01:00
Erlend Egeberg Aasland 89285314bd
gh-89121: Keep the number of pending SQLite statements to a minimum (#30379)
Make sure statements that have run to completion or errored are
reset and cleared off the cursor for all paths in execute() and
executemany().
2022-06-23 12:14:05 +02:00
Julien Palard 11e865c74b
gh-86404: [doc] Fix missing backtick and double target name. (#94120) 2022-06-23 09:12:18 +02:00
Christian Heimes 15bfabd1aa
gh-84461: Fix test_sqlite for Emscripten/WASI (#94125) 2022-06-23 08:31:55 +02:00
Oscar R fb1e9506c1
gh-91456: [Enum] Deprecate default auto() behavior with mixed value types (GH-91457)
When used with plain Enum, auto() returns the last numeric value assigned, skipping any incompatible member values (such as strings); starting in 3.13 the default auto() for plain Enums will require all the values to be of compatible types, and will return a new value that is 1 higher than any existing value.

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2022-06-22 23:20:24 -07:00
partev 7c439dca13
Closes gh-94152: Update pyvideo.org URL (GH-94075)
The URL is now https://pyvideo.org, which uses HTTPS and avoids a redirect.
2022-06-22 22:35:02 -05:00
Inada Naoki 9877f4c624
gh-85308: argparse: Use filesystem encoding for arguments file (GH-93277) 2022-06-23 12:09:57 +09:00
Victor Stinner 576dd90117
gh-84623: Remove unused imports in idlelib (#94143)
Remove commented code in test_debugger_r.py.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-06-23 00:09:48 +02:00
Pablo Galindo Salgado dd39e29ccb
Add ABI dump Makefile target (#94136) 2022-06-22 22:22:27 +01:00
Victor Stinner e52009d3f6
gh-84623: Move imports in doctests (#94133)
Move imports in doctests to prevent false alarms in pyflakes.
2022-06-22 22:24:45 +02:00
Victor Stinner c1fb12e5af
gh-54781: Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/ (#94070)
* Move Lib/tkinter/test/test_tkinter/ to Lib/test/test_tkinter/.
* Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/.
* Add Lib/test/test_ttk/__init__.py based on test_ttk_guionly.py.
* Add Lib/test/test_tkinter/__init__.py
* Remove old Lib/test/test_tk.py.
* Remove old Lib/test/test_ttk_guionly.py.
* Add __main__ sub-modules.
* Update imports and update references to rename files.
2022-06-22 22:23:37 +02:00
Victor Stinner 47e35625ff
gh-84623: Remove unused imports (#94132) 2022-06-22 19:14:27 +02:00
partev 8661c5053f
gh-94114: Remove obsolete reference to python.org mirrors (GH-94115)
* gh-94114
2022-06-22 09:55:06 -07:00
Illia Volochii d36954b7ea
gh-91172: Create a workflow for verifying bundled pip and setuptools (GH-31885)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-06-22 15:32:22 +02:00
Jason R. Coombs c029b552f3
gh-93951: In test_bdb.StateTestCase.test_skip, avoid including auxiliary importers. (GH-93962)
Co-authored-by: Brett Cannon <brett@python.org>
2022-06-22 14:05:45 +02:00
fikotta ca308c13da
Fix typo in _io.TextIOWrapper Clinic input (#94037)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-06-22 14:02:14 +02:00
chgnrdv dc8e1d0390
gh-94101 Disallow instantiation of SSLSession objects (GH-94102)
Fixes #94101

Automerge-Triggered-By: GH:tiran
2022-06-22 03:10:22 -07:00
Serhiy Storchaka fda4b2f063
gh-74696: Do not change the current working directory in shutil.make_archive() if possible (GH-93160)
It is no longer changed when create a zip or tar archive.

It is still changed for custom archivers registered with shutil.register_archive_format()
if root_dir is not None.

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-06-22 10:47:25 +02:00
Mark Shannon f805d37641
Stats: Add summary of top instructions for misses and deferred specialization. (GH-94072) 2022-06-22 08:50:02 +01:00
Carl Bordum Hansen 9a479c3c10
gh-88123: Implement new Enum __contains__ (GH-93298)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2022-06-22 00:04:04 -07:00
Irit Katriel 6575841266
bpo-30535: [doc] state that sys.meta_path is not empty by default (GH-94098)
Co-authored-by: Windson yang <wiwindson@outlook.com>
2022-06-21 23:03:08 +01:00
Gregory P. Smith 296e4efebb
gh-89336: Remove configparser APIs that were deprecated for 3.12 (#92503)
https://github.com/python/cpython/issue/89336: Remove configparser 3.12 deprecations.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-06-21 14:31:25 -07:00
Gregory P. Smith 4abab6b603
gh-87389: Fix an open redirection vulnerability in http.server. (#93879)
Fix an open redirection vulnerability in the `http.server` module when
an URI path starts with `//` that could produce a 301 Location header
with a misleading target.  Vulnerability discovered, and logic fix
proposed, by Hamza Avvan (@hamzaavvan).

Test and comments authored by Gregory P. Smith [Google].
2022-06-21 13:16:57 -07:00
Thomas A Caswell 0709586744
DOC: correct bytesarray -> bytearray in comments (GH-92410) 2022-06-21 22:04:03 +02:00
Ezio Melotti f28ec34c5c
gh-82927: Update files related to HTML entities. (GH-92504) 2022-06-21 22:03:12 +02:00
Jelle Zijlstra 4e08fbcfdf
gh-93021: Fix __text_signature__ for __get__ (GH-93023)
Because of the way wrap_descr_get is written, the second argument
to __get__ methods implemented through the wrapper is always
optional.
2022-06-21 21:45:38 +02:00
max dd5cf84f24
Tutorial: specify match cases don't fall through (GH-93615) 2022-06-21 21:44:09 +02:00
paulreece 51d673176a
gh-93240: clarify wording in IO tutorial (GH-93276)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-06-21 21:40:11 +02:00
Mark Dickinson 420f0df862
Minor optimization for Fractions.limit_denominator (GH-93730)
When we construct the upper and lower candidates in limit_denominator,
the numerator and denominator are already relatively prime (and the
denominator positive) by construction, so there's no need to go through
the usual normalisation in the constructor. This saves a couple of
potentially expensive gcd calls.

Suggested by Michael Scott Asato Cuthbert in GH-93477.
2022-06-21 21:36:35 +02:00
luzpaz 830513754d
gh-93675: Fix typos in `Doc/` (GH-93676)
Closes #93675
2022-06-21 21:10:45 +02:00
Oleg Iarygin f62ff97f31
gh-93851: Fix all broken links in Doc/ (GH-93853) 2022-06-21 20:55:18 +02:00
MilanJuhas 7327d61abe
Closes gh-94038: Update Release Schedule in README.rst from PEP 664 to PEP 693 (GH-94046) 2022-06-21 13:08:21 -05:00
Steve Dower 5a08e0fda4
gh-94068: Remove HVSOCKET_CONTAINER_PASSTHRU constant because it has been removed from Windows (GH-94069)
Fixes #94068

Automerge-Triggered-By: GH:zware
2022-06-21 10:27:21 -07:00
Adam Turner 0efe3a1636
gh-86986: Drop compatibility support for Sphinx 2 (GH-93737)
* Revert "bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282)"

This reverts commit 5c1f15b4b1

* Revert "bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)"

This reverts commit b63a620014.
2022-06-21 17:04:46 +02:00
Mark Shannon 6f8875eba3
GH-93841: Allow stats to be turned on and off, cleared and dumped at runtime. (GH-93843) 2022-06-21 15:40:54 +01:00
Victor Stinner c7a79bb036
gh-74953: _PyThread_cond_after() uses _PyTime_t (#94056)
pthread _PyThread_cond_after() implementation now uses the _PyTime_t
type to handle properly overflow: clamp to the maximum value.

Remove MICROSECONDS_TO_TIMESPEC() function.
2022-06-21 15:45:49 +02:00
Victor Stinner 616fa3465d
gh-54781: Move Lib/lib2to3/tests/ to Lib/test/test_lib2to3/ (#94049)
* Move Lib/lib2to3/tests/ to Lib/test/test_lib2to3/.
* Remove Lib/test/test_lib2to3.py.
* Update imports.
* all_project_files(): use different paths and sort files
  to make the tests more reproducible.
* Update references to tests.
2022-06-21 15:21:22 +02:00
Christian Heimes 50ebd72fb0
gh-93839: Use load_package_tests() for testmock (GH-94055)
Fixes failing tests on WebAssembly platforms.

Automerge-Triggered-By: GH:tiran
2022-06-21 05:51:39 -07:00
Christian Heimes 0ff7b996f5
gh-94052: Don't re-run failed tests with --python option (#94054) 2022-06-21 14:42:32 +02:00
Erlend Egeberg Aasland 94eeac03dc
gh-94028: Clear and reset sqlite3 statements properly in cursor iternext (GH-94042) 2022-06-21 12:30:29 +01:00
Dennis Sweeney 5fcfdd87c9
GH-91432: Specialize FOR_ITER (GH-91713)
* Adds FOR_ITER_LIST and FOR_ITER_RANGE specializations.

* Adds _PyLong_AssignValue() internal function to avoid temporary boxing of ints.
2022-06-21 11:19:26 +01:00