Commit Graph

113989 Commits

Author SHA1 Message Date
Victor Stinner 00464bbed6
gh-94199: Remove the ssl.wrap_socket() function (#94203)
Remove the ssl.wrap_socket() function, deprecated in Python 3.7:
instead, create a ssl.SSLContext object and call its
sl.SSLContext.wrap_socket() method. Any package that still uses
ssl.wrap_socket() is broken and insecure. The function neither sends
a SNI TLS extension nor validates server hostname. Code is subject to
CWE-295 : Improper Certificate Validation.
2022-07-08 15:20:15 +02:00
Brandt Bucher 23ee4a8067
gh-94215: Fix error handling for line-tracing events (GH-94681)
* Re-enable crasher
* Fix error handling for line-tracing events
* blurb add
2022-07-08 14:40:35 +02:00
Erlend Egeberg Aasland e5b841a403
gh-94622: Add more references to the sqlite3 types anchor (#94623) 2022-07-08 02:38:38 +02:00
Erlend Egeberg Aasland fb6dccae34
gh-94321: Document sqlite3.PrepareProtocol (#94620) 2022-07-08 00:33:17 +02:00
Kumar Aditya 71697664d7
GH-90699: Move generated static initializer to pycore_runtime_generated.h (GH-94051) 2022-07-07 13:04:05 -07:00
Samuel Sloniker afd6a37ad1
gh-93654: Add module docstring to pathlib (GH-94611)
Issue: gh-93654
2022-07-07 12:59:29 -07:00
finefoot b6558d768f
gh-94343: Ease initialization of reprlib.Repr attributes (GH-94581) 2022-07-07 09:55:33 -05:00
Christian Heimes 29f86d6c28
gh-94642: Remove -D_XOPEN_SOURCE from more pkg-config CFLAGS (#94657)
Some pkg-config pc files define CFLAGS with -D_XOPEN_SOURCE=600. We always want _XOPEN_SOURCE=700.
2022-07-07 14:47:32 +02:00
Michael Droettboom ed136b9673
gh-93910: Fix enum performance regression (GH-94614)
This removes the performance regression in 3.11, **at the expense of not fixing
the "bug" that allows accessing values from values** (e.g. `Color.RED.BLUE`).

Using the benchmark @markshannon [presented](https://github.com/python/cpython/issues/93910#issuecomment-1165503032), the results are:

| Version | Enum | Fast enum | Normal class |
| --- | --- | --- | --- |
| 3.10 | 2.04 | 0.59 | 0.56 |
| 3.11 | 2.78 | 0.31 | 0.15 |
| This PR | 1.30 | 0.32 | 0.16 |

I share this mostly as information about the source of the regression, as this may be useful. It may be that the lower-risk approach for the beta is just to revert to a previously-known working state.
2022-07-07 04:26:56 -07:00
Kumar Aditya 277f55cb04
GH-94644: fix test_curses ref leak (GH-94647) 2022-07-07 03:57:45 -07:00
Christian Heimes 9c60b25a0d
gh-94644: Define HAVE_NCURSESW in pkg-config branch (#94651) 2022-07-07 12:57:12 +02:00
Christian Heimes de5884295e
gh-94215: Add reproducer for segfault in frame_setlineno() (GH-94563) 2022-07-07 12:53:57 +02:00
Erlend Egeberg Aasland 8bbd70b4d1
gh-94430: Allow params named `module` or `self` with custom C names in Argument Clinic (#94431) 2022-07-07 11:29:34 +02:00
Erlend Egeberg Aasland 3eb2b9634f
gh-94628: Add explicit parameter list to sqlite3.connect docs (#94629)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-07-07 09:00:20 +02:00
Irit Katriel bde06e1b83
gh-92228: disable the compiler's 'small exit block inlining' optimization for blocks that have a line number (GH-94592)
Inlining of code that corresponds to source code lines, can make it hard to distinguish later between code which is only reachable from except handlers, and that which is reachable in normal control flow. This caused problems with the debugger's jump feature.

This PR turns off the inlining optimisation for code which has line numbers. We still inline things like the implicit "return None".
2022-07-06 23:38:36 -07:00
Erlend Egeberg Aasland 94988603f3
gh-94630: Update sqlite3 docs with positional-only and keyword-only symbols (#94631) 2022-07-07 01:13:30 +02:00
Erlend Egeberg Aasland 760b8cf0c8
gh-94017: Improve clarity of sqlite3 transaction handling docs (#94320)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-07-06 22:59:07 +02:00
Kumar Aditya 14fea6b4d2
GH-93896: AAlways set event loop in asyncio.run and IsolatedAsyncioTestCase (#94593) 2022-07-06 16:18:21 +01:00
Christian Heimes e925241d95
gh-90005: Port readline and curses to PY_STDLIB_MOD (GH-94452)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-06 11:56:25 +02:00
Irit Katriel 50b9a7762f
gh-94438: in frameobject's mark_stacks switch, the PUSH_EXC_INFO and POP_EXCEPT cases are no longer reachable (GH-94582) 2022-07-06 07:15:59 +01:00
Pablo Galindo Salgado 40d81fd63b
gh-94510: Raise on re-entrant calls to sys.setprofile and sys.settrace (GH-94511)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-07-05 20:18:47 +02:00
Erik De Bonte 5f319308a8
gh-91330: Tests and docs for dataclass descriptor-typed fields (GH-94424)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-07-05 20:09:41 +02:00
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
Jeremy Kloth 067597522a
gh-92897: Ensure `venv --copies` respects source build property of the creating interpreter (GH-92899) 2022-07-05 16:08:20 +01:00
Petr Viktorin e6ec6f5b50
Docs: Convert PEP 630 (Isolating Extension Modules) to a HOWTO (GH-94489)
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-05 16:37:28 +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
Oleg Iarygin 670f7f10cf
gh-94512: Fix forced arg format in AC-processed multiprocessing (GH-94517) 2022-07-04 14:11:11 +01:00
Oleg Iarygin 9b50f76fcd
gh-94512: Fix forced arg format in AC-processed winreg (GH-94513) 2022-07-04 14:10:10 +01:00
Oleg Iarygin 21f6b4d783
gh-94512: Fix forced arg format in AC-processed msvcrtmodule (GH-94514) 2022-07-04 14:09:34 +01:00
Vinay Sajip a391b74dbe
Update logging documentation: change cross-reference and add webapp r… (GH-94540) 2022-07-04 06:06:43 +01: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
Terry Jan Reedy 39c29f753e
IDLE doc: Tweek RESTART and Windows console start (#94530) 2022-07-03 12:56:44 -04:00
Oleg Iarygin 7db1d2eaf3
gh-93096: Remove `python -m base64 -t` (gh-94230) 2022-07-02 15:53:43 +09:00
Erlend Egeberg Aasland cc81962e69
Doc: fix sqlite3 blob reference anchor (#94505) 2022-07-02 08:35:48 +02:00
Erlend Egeberg Aasland 3a2e61524f
gh-94393: Remove unneeded module state from _json (#94394) 2022-07-02 08:24:19 +02: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
Sam Ezeh 80aaeabb8b
gh-81054: Document that SimpleHTTPRequestHandler follows symbolic links (GH-94416) 2022-07-01 18:21:27 +02:00
Mariatta Wijaya ad55147c1d
Update code sample when importing modules in queue doc (GH-94244)
In the queue documentation, the code snippet shows the import to be not PEP 8 compliant.

Since people typically copy-paste from such code samples, I think it's important to show best-practices here.
2022-07-01 17:51:46 +02:00