Commit graph

111461 commits

Author SHA1 Message Date
Pablo Galindo Salgado df4ae55e66
bpo-45820: Fix a segfault when the parser fails without reading any input (GH-29580) 2021-11-16 19:51:52 +00:00
Erlend Egeberg Aasland 9d6215a54c
bpo-45126: Harden sqlite3 connection initialisation (GH-28227) 2021-11-16 15:53:35 +01:00
Brandt Bucher 6a84d61c55
bpo-45636: Simplify BINARY_OP (GH-29565) 2021-11-16 05:53:57 -08:00
Dong-hee Na 55868f1a33
bpo-45429: Support CREATE_WAITABLE_TIMER_HIGH_RESOLUTION if possible (GH-29203) 2021-11-16 22:41:20 +09:00
Irit Katriel 8b06d01507
bpo-45292: Use raw strings for regex in tests (GH-29545) 2021-11-16 17:28:21 +05:30
Mark Shannon b931077375
bpo-45753: Make recursion checks more efficient. (GH-29524)
* Uses recursion remaining, instead of recursion depth to speed up check against recursion limit.
2021-11-16 11:01:57 +00:00
Victor Stinner 9bf2cbc4c4
bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)
Remove the asyncore and asynchat modules, deprecated in Python
3.6: use the asyncio module instead.

Remove the smtpd module, deprecated in Python 3.6: the aiosmtpd
module can be used instead, it is based on asyncio.

* Remove asyncore, asynchat and smtpd documentation
* Remove test_asyncore, test_asynchat and test_smtpd
* Rename Lib/asynchat.py to Lib/test/support/_asynchat.py
* Rename Lib/asyncore.py to Lib/test/support/_asyncore.py
* Rename Lib/smtpd.py to Lib/test/support/_smtpd.py
* Remove DeprecationWarning from private _asyncore, _asynchat and
  _smtpd modules
* _smtpd: remove deprecated properties
2021-11-16 00:29:17 +01:00
Emmanuel Arias 3352834f59
bpo-43225: [DOC] Add missing value returned by methods on cookiejar (GH-24522)
* Add missing value returned by methods on cookiejar

Documentation say that return something but don't specific with what
value is return, and that can be confuse. This patch add that information.

* Update Doc/library/http.cookiejar.rst

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>

* Update Doc/library/http.cookiejar.rst

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-11-15 14:44:32 -08:00
Terry Jan Reedy ad43dc0b54
bpo-25381: Update explanation of exceptions in C. (GH-26838)
* bpo-25381: Update explanation of exception globals

This paragraph in extending/extending.rst was unchanged (except for
NULL markup) since committed in 2007 Aug 15 for 2.6 alpha.

* Respond to reviews and remove duplication.

* Update Doc/extending/extending.rst

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-11-15 14:38:53 -08:00
Joannah Nanjekye c750adbe69
Save a reference for ensure_future and create_task (GH-29163)
Co-authored-by: Joannah Nanjekye <jnanjekye@python.org>
2021-11-15 14:30:28 -08:00
Erlend Egeberg Aasland 6c5a312fb6
bpo-45677: Reword first section of sqlite3 docs (#29326)
* bpo-45677: Avoid addressing the reader as 'you' in sqlite3 docs

* Adjust wording

* Adjust wording again

* Typo

* Update Doc/library/sqlite3.rst

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>

* Address review: adjust wording

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Lib/sqlite3/__init__.py

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Lib/sqlite3/__init__.py

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Apply Alex' suggestion, and apply 80 char limit to PR

* Minor adjustment

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-15 14:22:42 -08:00
Brandt Bucher ec382fac0d
bpo-45636: Remove the old %-formatting fast-path (GH-29532) 2021-11-15 08:58:23 -08:00
Erlend Egeberg Aasland 822c3dcce3
bpo-45512: Raise exception if sqlite3.Connection.__init__ is called with bad isolation level (#29561)
* bpo-45512: Raise sqlite3.Connection.__init__ is called with bad isolation level

* Also explicitly test allowed isolation levels

* Use subTest for better error messages if something goes wrong

* Update Lib/test/test_sqlite3/test_dbapi.py

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2021-11-15 21:55:38 +09:00
Erlend Egeberg Aasland b567b9d74b
bpo-45512: Simplify isolation_level handling in sqlite3 (GH-29053) 2021-11-15 16:50:59 +09:00
Christian Heimes c3997865f2
bpo-45573: Use Makefile's dependencies in setup.py (GH-29559) 2021-11-14 20:55:15 +01:00
Alex Waygood c2c4fdf5ea
bpo-45752: Remove "array" from list of things that cannot be copied in copy module docstring (GH-29555)
Automerge-Triggered-By: GH:asvetlov
2021-11-14 04:56:01 -08:00
M. Mostafa Farzan b7360ae395
bpo-45752: Fix no-support examples in 'copy' docs (GH-29548) 2021-11-14 11:34:37 +02:00
Christian Heimes 464e6616be
bpo-45800: Move pyexpat build setup into configure (GH-29547)
Settings for :mod:`pyexpat` C extension are now detected by ``configure``.
The bundled ``expat`` library is built in ``Makefile``.

Signed-off-by: Christian Heimes <christian@python.org>
2021-11-14 10:02:24 +01:00
Pablo Galindo Salgado 25835c518a
bpo-45738: Fix computation of error location for invalid continuation (GH-29550)
characters in the parser
2021-11-14 01:06:41 +00:00
Jack DeVries f8da00ef04
bpo-45799: [Doc] improve confusing sentence in __main__.rst (GH-29546)
I was reading this bit last night and thought it was a typo. In the light of day, I realized it wasn't *technically* a typo, but definitely confusing wording. This PR fixes the confusing sentence.

Automerge-Triggered-By: GH:ericvsmith
2021-11-13 12:16:05 -08:00
Christian Heimes 0486570f7b
bpo-45798: Move _decimal build setup into configure (GH-29541)
Settings for :mod:`decimal` internal C extension are now detected by
:program:`configure`. The bundled `libmpdec` library is built in
``Makefile``.

Signed-off-by: Christian Heimes <christian@python.org>
2021-11-13 13:56:16 +01:00
Hong Xu 4c792f39e6
bpo-45772: socket.socket should be a class instead of a function (GH-23960)
* bpo-45772: socket.socket should be a class instead of a function

Currently `socket.socket` is documented as a function, but it is really
a class (and thus has function-like usage to construct an object). This
correction would ensure that Python projects that are interlinking
Python's documentation can properly locate `socket.socket` as a type.
2021-11-13 08:02:04 +02:00
Irit Katriel de3db1448b
bpo-45711: assert that the type of exc_info is redundant (GH-29518) 2021-11-12 21:37:26 +00:00
Victor Stinner 9d32714384
bpo-45745: Remove regrtest --findleaks options (GH-29514)
Remove the --findleaks command line option of regrtest: use the
--fail-env-changed option instead. Since Python 3.7, it was a
deprecated alias to the --fail-env-changed option.
2021-11-12 16:19:09 +01:00
Brandt Bucher 8f1b71de73
bpo-45711: Re-bump the magic number and update doc (GH-29528) 2021-11-12 13:21:45 +00:00
Hynek Schlawack e501d70b34
bpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533)
Since `.. module:: contextvars` sets the module using `.. class:: contextvars.Token`, intersphinx records it as `contextvars.contextvars.Token`.
2021-11-12 11:47:55 +02:00
Raymond Hettinger 807f839bbf
bpo-45235: Revert an argparse bugfix that caused a regression (GH-29525)
* Revert "bpo-45235: Fix argparse overrides namespace with subparser defaults (GH-28420) (GH-28443)"

This reverts commit a18d52269a.
2021-11-11 21:53:23 -06:00
Brandt Bucher 27b69e60da
bpo-45773: Stop "optimizing" certain jump patterns (GH-29505) 2021-11-11 11:44:34 -08:00
Brandt Bucher 9178f533ff
bpo-45636: Merge all numeric operators (GH-29482) 2021-11-10 22:56:22 -08:00
Guido van Rossum 1cbaa505d0
bpo-45696: Deep-freeze selected modules (GH-29118)
This gains 10% or more in startup time for `python -c pass` on UNIX-ish systems.

The Makefile.pre.in generating code builds on Eric's work for bpo-45020, but the .c file generator is new.

Windows version TBD.
2021-11-10 18:01:53 -08:00
Christian Heimes fc9b622819
bpo-45723: Add --with-pkg-config to configure (GH-29517)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-10 23:02:19 +01:00
Christian Heimes 0a9f69539b
bpo-45747: Detect gdbm/dbm dependencies in configure (GH-29467)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-10 20:26:55 +01:00
Erlend Egeberg Aasland c1323d4b8c
bpo-45754: Use correct SQLite limit when checking statement length (GH-29489) 2021-11-10 18:46:11 +00:00
Irit Katriel 4cdeee5978
bpo-45711: remove unnecessary DUP_TOP and POP in exception handling (GH-29495) 2021-11-10 18:08:28 +00:00
Irit Katriel 05fbd60147
bpo-45711: Use _PyErr_ClearExcState instead of setting only exc_value to NULL (GH-29404) 2021-11-10 16:57:14 +00:00
Erlend Egeberg Aasland 76d14fac72
bpo-45723: Improve and simplify more configure.ac checks (GH-29485) 2021-11-10 16:30:18 +01:00
Pablo Galindo Salgado 20205ad2b5
bpo-45637: Fix cframe-based fallback in the gdb helpers (GH-29515) 2021-11-10 13:41:22 +00:00
Jason R. Coombs 6ec0dec7b7
[bpo-45765] Fix distribution discovery on empty path. (#29487) 2021-11-09 18:49:43 -05:00
Raymond Hettinger 912a4ccc3a
bpo-45701: Improve documentation for *typed* parameter (GH-29498) 2021-11-09 17:01:29 -06:00
Erlend Egeberg Aasland 49171aa91a
bpo-45723: Remove dead code for obsolete --with-dyld option (GH-29500)
Was commented out by Jack Jansen in 2001-08-15 by commit
b6e9cad34c:

"Ripped out Next/OpenStep support, which was broken anyway"

Automerge-Triggered-By: GH:tiran
2021-11-09 13:05:58 -08:00
Steve Dower a56fbad85e
bpo-45220: Ensure RT_MANIFEST is defined when compiling Windows resource files (GH-29501) 2021-11-09 20:12:53 +00:00
Irit Katriel cb414cf0e2
bpo-45757: Fix bug where dis produced an incorrect oparg on EXTENDED_ARG before a no-arg opcode (GH-29480) 2021-11-09 20:07:38 +00:00
Steve Dower bcc4e46832
bpo-45732: Update bundled Tcl/Tk on Windows to 8.6.12 (GH-29477) 2021-11-09 16:47:28 +00:00
Raymond Hettinger c3bc0fe5a6
Factor-out constant calculation. (GH-29491) 2021-11-09 10:30:06 -06:00
Christian Heimes 5b7c7cb104
bpo-45763: Detect compression build deps in configure (GH-29483) 2021-11-09 16:42:53 +01:00
Erlend Egeberg Aasland 185533639d
bpo-45723: Remove obsolete AC_EXEEXT from configure.ac (GH-29486)
From the autoconf docs *Obsolete Macros* section:

    Defined the output variable EXEEXT based on the output of the 
    compiler, which is now done automatically. Typically set to empty
    string if Posix and ‘.exe’ if a DOS variant.
2021-11-09 07:32:59 -08:00
Carl Friedrich Bolz-Tereick 2819e98d10
bpo-45764: improve error message when missing '(' after 'def' (GH-29484)
to achieve this, change the grammar to expect the '(' token after 'def' NAME.

Automerge-Triggered-By: GH:pablogsal
2021-11-09 06:03:32 -08:00
Pablo Galindo Salgado f4c03484da
bpo-45637: Remove broken fallback in gdb helpers to obtain frame variable (GH-29257) 2021-11-09 11:19:47 +00:00
Christian Heimes 6a1cc8bf8a
bpo-45743: Remove workaround for zlib CVE from 2002 (GH-29457) 2021-11-09 09:56:05 +01:00
Christian Heimes 8fefaad242
bpo-45743: -Wl,-search_paths_first is no longer needed (GH-29464) 2021-11-09 09:06:41 +01:00