Commit Graph

25295 Commits

Author SHA1 Message Date
Christian Heimes 25ecc040d0
bpo-45573: Introduce extension module flags in Makefile (GH-29594)
``configure`` now uses a standardized format to forward state, compiler
flags, and linker flags to ``Makefile``, ``setup.py``, and
``Modules/Setup``. ``makesetup`` use the new variables by default if a
module line does not contain any compiler or linker flags. ``setup.py``
has a new function ``addext()``.

For a module ``egg``, configure adds:

* ``MODULE_EGG`` with value yes, missing, disabled, or n/a
* ``MODULE_EGG_CFLAGS``
* ``MODULE_EGG_LDFLAGS``

``Makefile.pre.in`` may also provide ``MODULE_EGG_DEPS`` that lists
dependencies such as header files and static libs.

Signed-off-by: Christian Heimes <christian@python.org>
2021-11-18 09:18:44 +01:00
Dennis Sweeney 5d90c467c0
bpo-45826: Fix a crash in suggestions.c by checking for `traceback is None` (GH-29590) 2021-11-18 00:03:52 +01:00
Sam Gross 736684b1bb
bpo-42540: reallocation of id_mutex should not force default allocator (GH-29564)
Unlike the other locks reinitialized by _PyRuntimeState_ReInitThreads,
the "interpreters.main->id_mutex" is not freed by _PyRuntimeState_Fini
and should not force the default raw allocator.
2021-11-17 21:51:03 +01:00
Victor Stinner b919d8105c
bpo-45831: _Py_DumpASCII() uses a single write() call if possible (GH-29596)
If the string is ASCII only and doesn't need to escape characters,
write the whole string with a single write() syscall.
2021-11-17 21:12:20 +01:00
Emmanuel Arias 15409c720b
bpo-28806: Continue work: improve the netrc library (GH-26330)
Continue with the improvement of the library netrc

Original work and report Xiang Zhang <angwerzx@126.com>

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2021-11-17 11:07:54 +02:00
Pablo Galindo Salgado da20d7401d
bpo-45822: Respect PEP 263's coding cookies in the parser even if flags are not provided (GH-29582) 2021-11-16 12:30:47 -08:00
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
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
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
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
Brandt Bucher ec382fac0d
bpo-45636: Remove the old %-formatting fast-path (GH-29532) 2021-11-15 08:58:23 -08: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
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
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
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
Jason R. Coombs 6ec0dec7b7
[bpo-45765] Fix distribution discovery on empty path. (#29487) 2021-11-09 18:49:43 -05: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
Christian Heimes 5b7c7cb104
bpo-45763: Detect compression build deps in configure (GH-29483) 2021-11-09 16:42:53 +01: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
Christian Heimes 8fefaad242
bpo-45743: -Wl,-search_paths_first is no longer needed (GH-29464) 2021-11-09 09:06:41 +01:00
Christian Heimes cbab997efb
bpo-45723: Prepare support for autoconf 2.71 (GH-29441) 2021-11-08 19:31:14 +01:00
Christian Heimes 57c50c9c7c
bpo-45723: Add helper macros and more caching to configure.ac (GH-29429)
Almost all checks are now cached by AC_CACHE_CHECK().

Common patterns are replaced by helper macros.

Variable names now use naming scheme ``ac_cv_func_$funcname``,
``ac_cv_lib_$library_$funcname``, or ``ac_cv_header_$headername_h``.

``SYS_SELECT_WITH_SYS_TIME`` is no longer used.

``uuid_create`` and ``uuid_enc_be`` are provided by libc on BSD. It is
safe to use ``AC_CHECK_FUNCS`` here.

Caching speeds up ./configure -C from ~ 4s to 2.6s on my system.

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-08 08:06:31 +01:00
Christian Heimes be3cd5c05d
bpo-45723: Detect missing pkg-config (GH-29442) 2021-11-07 11:18:45 +01:00
Mark Dickinson 9127520729
bpo-45392: Update the docstring of the 'type' built-in (GH-29439) 2021-11-06 20:08:44 +01:00
Chris Wesseling 815dad42d5
bpo-45644: Make json.tool read infile before writing to outfile (GH-29273)
so that

$ python -m json.tool foo.json foo.json

doesn't result in an empty foo.json.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-11-06 18:11:35 +01:00
Christian Heimes e9594f6747
bpo-45731: Handle --enable-loadable-sqlite-extensions in configure (GH-29434) 2021-11-06 10:30:37 +01:00
Steve Dower a4774f42e3
bpo-45720: Drop references to shlwapi.dll on Windows (GH-29417) 2021-11-05 23:06:45 +00:00
Pablo Galindo 0b8c3f160f Python 3.11.0a2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEz9yiRbEEPPKl+Xhl/+h0BBaL2EcFAmGFgCUACgkQ/+h0BBaL
 2EcwMxAAgBfI1OCNvTZIg7jyHO4F6VGqJr3vr+QtSIAxLFctX70S77QR3uNs4WOR
 4MdwI1Lv38uCmkhJt9YO7ydgiBmodf9g8SZk7+Abqg1aHLlj+803nSEsBqOTRnqp
 HIN0QsK8VErno73zOHoyc36Q2zGX7nZetnrUtYQklcdSncSsnmqQW5hAd+9Xew61
 bu/Ks5lGOjIEv3ITBomYhZXJjB49N99FYauV3MfuP9Z24L+oNBtsROp4kecFOLCR
 x5Zb2St1rvtysYqard8eXnDWYG+P/zEehAVRrbNmWXldgpG7bUBacxKJiwWHRh9F
 lqle4QdUvmAf5o81xptEfIYznivOge6TDCT+w2UBm3cxjnUV4Bcuh95LNEZHmRAs
 Srr0EZZdtk9xEMkvKzMzKmSmMmIXow95ncAbSc3xqWmQxK5yNfP7eD9s+yxeq+TA
 WDINVI4YZMddRkNvVk0lUGz3uepZY68RAUhO7FB0eAAGdjoqW1fVi0ZvahMYmp0z
 RscNZaCbGSro+jIkDtxUoLBOCIqZ1eXRGMb93pTX+0qILymRFPSxnRvrFK8llNbt
 fRY19GBOnby5SDthUSp5mkToFCTrPBMAPnYMnBWVy/XsfTrXdUHPhUz0hcaQq2HA
 mXEun6ByObwG2z9atHPxq5U8m63862EoUxc6s7xU3nDE4iBpLOk=
 =6z/H
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEz9yiRbEEPPKl+Xhl/+h0BBaL2EcFAmGFojsACgkQ/+h0BBaL
 2EcEYw/9EQjyblmpy7d3bJPcy98epQZVdt99W+9XN62D1oVd+vgsMWTQiAdind6i
 Y5IpjKWVG5nqhOlChBSMcNtRD4Z1o8BOpaV72l0svAN8tGk+JxRfO3jkf7QlIsQR
 DCyBbuqEiytmHTDOGXebul1zFZAaeKy0VnawDPF6+KT8xL6ZTkieqCWW1NUlChSc
 xdAW7ae9JZOT+vWFCXX5eN8eFZl3s6qWiHmVPRJVZT+nED+7EzU8UsGONtDkeFTx
 qqc+5e9pNaTuqfZGL533MFE1Ck6IDhqWUTKDQ6+Nvnn0zK5NnuKKZdnbXEZJSxSM
 wXYNpf60pKu0cKvJBwqxVFiwSOc8aQM3jZZ0xvo0HjN98wJzV0Mj4MJ+fbVPNQv1
 vwd53CHnYEzeK8gVn2hvtWfAwADrGx9EFS1zH8vNSsEkqjnOhjyx+GXjrJvroKSc
 swlnW1Yj+HEVbg2alFunsfO0z2pmFMLk7RjyV0W9tc1KeqnGMRcNWPc03BxkNuFa
 FZ95I1scwsv+5pDpBpgFC0v3ikcvPi/l5I+BQ/i6y4aypUc0w948mQ0E3UniiSs7
 KX1CigSgq1rScwd4GED4AMYnco9EUNS5xF+PA6LIVlLLMGm9bu/P1dBECVIeouAQ
 isITcZqyRcfti1Lb4GUbAf2HfPEqP4vp0eRCHa5WR6EsEHbgVME=
 =DZFj
 -----END PGP SIGNATURE-----

Merge tag 'v3.11.0a2'

Python 3.11.0a2
2021-11-05 21:29:23 +00:00
Nikita Sobolev 60b5333fa9
bpo-45679: add `tuple` tests with `lru_cache` to `test_functools` (GH-29339) 2021-11-05 14:52:46 -05:00
Pablo Galindo e2b4e4bab9
Python 3.11.0a2 2021-11-05 19:04:04 +00:00
Alex Waygood 71e8a3e76a
bpo-45762: Improve docs for ``@singledispatch``/``@singledispatchmethod`` (GH-29426) 2021-11-05 17:25:08 +01:00
Pablo Galindo Salgado e2d65630f3
bpo-45716: Improve the error message when using True/False/None as keywords in a call (GH-29413) 2021-11-05 13:54:55 +00:00
Alex Waygood 32f55d1a5d
bpo-45678: Add more ``singledispatchmethod`` tests (GH-29412)
In order to fix a bug in the 3.9 branch in #29394, more tests were added to
``test_functools.py`` to ensure that ``singledispatchmethod`` still correctly
wrapped a target method, even if the target method had already been wrapped by
 multiple other decorators. This PR brings the new tests into the 3.11 and 3.10
branches as well.
2021-11-05 11:06:18 +01:00
Irit Katriel 3509b26c91
bpo-45292: [PEP 654] Update traceback display code to work with exception groups (GH-29207) 2021-11-05 09:39:18 +00:00
Steve Dower 36b4f9e2a7
bpo-43652: Actually update to Tcl/Tk 8.6.11 on Windows (GH-29397) 2021-11-04 16:39:07 +00:00
Alex Waygood e03e50377d
bpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getitem__`` (GH-29387) 2021-11-04 12:06:34 +08:00
Erlend Egeberg Aasland c273986711
bpo-45613: Set `sqlite3.threadsafety` dynamically (GH-29227)
Use the compile-time selected default SQLite threaded mode to set the
DB-API 2.0 attribute 'threadsafety'

Mappings:
  - SQLITE_THREADSAFE=0 => threadsafety=0
  - SQLITE_THREADSAFE=1 => threadsafety=3
  - SQLITE_THREADSAFE=2 => threadsafety=1
2021-11-03 21:01:37 +00:00
Alex Waygood 5a14929a6e
bpo-45678: Add ``functools.singledispatchmethod`` tests (GH-29328) 2021-11-03 17:12:02 +01:00
Nikita Sobolev e346f19681
bpo-45578: add tests for `dis.distb` (GH-29332) 2021-11-03 14:55:42 +01:00