Sergey Kolesnikov
e0f8a3e9b9
Add missing 'await writer.drain()' call to example (GH-29162)
...
Automerge-Triggered-By: GH:asvetlov
2021-11-25 09:15:24 -08:00
Zbigniew Siciarz
4dd82194f4
bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151)
...
Automerge-Triggered-By: GH:asvetlov
2021-11-25 04:30:48 -08:00
Christian Heimes
dc19e86983
bpo-41498: Fix build on platforms without sigset_t (GH-29770)
2021-11-25 12:28:41 +01:00
Irit Katriel
c456dfafe9
bpo-45711: use exc_value instead of exc_type to determine if exc_info is valid. Add more assertions. (GH-29627)
2021-11-25 09:41:28 +00:00
Pablo Galindo Salgado
24c10d2943
bpo-45727: Only trigger the 'did you forgot a comma' error suggestion if inside parentheses (GH-29757)
2021-11-24 22:21:23 +00:00
Christian Heimes
f4afc53bf6
bpo-45893: Add missing extern C to initconfig.h (GH-29761)
...
Co-authored-by: Steve Dower <steve.dower@python.org>
2021-11-24 21:12:12 +01:00
Jim Crist-Harif
d71c7bc733
bpo-45693: Document `port` parameter to `loop.create_server` (GH-29760)
...
Document the `port` parameter to `loop.create_server` in `asyncio`. In
particular, note that if `host` resolves to multiple network interfaces,
passing in `port=0` will result in a different random unused port being
used for each interface.
Automerge-Triggered-By: GH:ericvsmith
2021-11-24 11:43:57 -08:00
Kumar Aditya
256f9c4588
Fix typo in freeze_modules ( #29744 )
2021-11-24 11:12:03 -08:00
Christian Heimes
5c4b19ec49
bpo-45020: Fix strict-prototypes warning (GH-29755)
2021-11-24 20:01:39 +01:00
Pablo Galindo Salgado
abfc794bbf
bpo-45822: Minor cleanups to the test_Py_CompileString test (GH-29750)
2021-11-24 18:30:03 +00:00
Christian Heimes
b30bf4520a
bpo-45881: Use CC from env first for cross building (GH-29752)
2021-11-24 18:53:33 +01:00
Christian Heimes
64c3807da9
bpo-45847: Fix _crypt detection on Ubuntu (GH-29743)
2021-11-24 10:47:22 +01:00
Christian Heimes
8af6481f6b
bpo-45847: Port _uuid to PY_STDLIB_MOD (GH-29741)
2021-11-24 10:20:37 +01:00
Jason R. Coombs
d5cd2effa6
bpo-45514: Deprecate importlib resources legacy functions. (GH-29036)
...
* bpo-45514: Apply changes from importlib_resources@a3ef4128c6
* Mark legacy functions as deprecated in the docs and link to the migration docs in importlib_resources docs.
* Apply changes from importlib_resources@329ae9d5f2c.
* Indicate importlib.resources as a module.
Co-authored-by: Filipe Laíns <lains@riseup.net>
2021-11-24 02:51:37 -05:00
Erlend Egeberg Aasland
324527012f
bpo-45847: Port _posixshmem to PY_STDLIB_MOD (GH-29738)
2021-11-24 08:19:17 +01:00
Christian Heimes
dd8ce9ea8d
bpo-45886: Allow overriding freeze command for cross compiling (GH-29735)
2021-11-24 08:07:15 +01:00
Zachary Ware
f9de97aae5
bpo-45616: Let py.exe distinguish between v3.1 and v3.10 (GH-29731)
2021-11-23 22:41:04 -06:00
Christian Heimes
9cf5646bb4
bpo-45847: Port _gdbm to PY_STDLIB_MOD (GH-29720)
2021-11-23 22:58:38 +01:00
Christian Heimes
b9e9292d75
bpo-45847: Port _ssl and _hashlib to PY_STDLIB_MOD (GH-29727)
2021-11-23 22:58:13 +01:00
Christian Heimes
095bc8f0d6
bpo-45847: Port _crypt to PY_STDLIB_MOD (GH-29725)
2021-11-23 22:26:50 +01:00
Christian Heimes
f840398a5f
bpo-45873: Restore Python 3.6 compatibility (GH-29730)
...
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
2021-11-23 21:36:40 +01:00
Victor Stinner
4ae26b9c1d
bpo-39026: Fix Python.h when building with Xcode (GH-29488)
...
Fix Python.h to build C extensions with Xcode: remove a relative
include from Include/cpython/pystate.h.
2021-11-23 18:58:57 +01:00
Guido van Rossum
5be98e57b3
bpo-45873: Get rid of bootstrap_python ( #29717 )
...
Instead we use $(PYTHON_FOR_REGEN) .../deepfreeze.py with the
frozen .h file as input, as we did for Windows in bpo-45850.
We also get rid of the code that generates the .h files
when make regen-frozen is run (i.e., .../make_frozen.py),
and the MANIFEST file.
Restore Python 3.8 and 3.9 as Windows host Python again
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2021-11-23 08:56:06 -08:00
Miro Hrončok
ae1965ccb4
bpo-45703: Invalidate _NamespacePath cache on importlib.invalidate_ca… (GH-29384)
...
Consider the following directory structure:
.
└── PATH1
└── namespace
└── sub1
└── __init__.py
And both PATH1 and PATH2 in sys path:
$ PYTHONPATH=PATH1:PATH2 python3.11
>>> import namespace
>>> import namespace.sub1
>>> namespace.__path__
_NamespacePath(['.../PATH1/namespace'])
>>> ...
While this interpreter still runs, PATH2/namespace/sub2 is created:
.
├── PATH1
│ └── namespace
│ └── sub1
│ └── __init__.py
└── PATH2
└── namespace
└── sub2
└── __init__.py
The newly created module cannot be imported:
>>> ...
>>> namespace.__path__
_NamespacePath(['.../PATH1/namespace'])
>>> import namespace.sub2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'namespace.sub2'
Calling importlib.invalidate_caches() now newly allows to import it:
>>> import importlib
>>> importlib.invalidate_caches()
>>> namespace.__path__
_NamespacePath(['.../PATH1/namespace'])
>>> import namespace.sub2
>>> namespace.__path__
_NamespacePath(['.../PATH1/namespace', '.../PATH2/namespace'])
This was not previously possible.
2021-11-23 07:38:02 -08:00
Eric Snow
8ed1495ad9
bpo-45783: Preserve file moves and deletions in the tests for the freeze tool. (GH-29527)
...
Use shutil.copytree rather than Git, which might be missing (or configured
differently) when testing Python built from a source release.
2021-11-23 14:43:40 +01:00
Nikita Sobolev
b48ac6fe38
bpo-45878: convert `try/except` to `self.assertRaises` in `Lib/ctypes/test/test_functions.py` (GH-29721)
2021-11-23 13:12:13 +02:00
Petr Viktorin
2c047f604e
Clarify that discutils.(plat)include is for CPython's headers (GH-29578)
...
Change the docs to note that "include" and "platinclude" are
for CPython's headers, and not necessarily for headers of
third-party libraries.
See discussion in: https://discuss.python.org/t/clarification-on-a-wheels-header-data/9305/19
2021-11-23 11:28:14 +01:00
Mark Shannon
135cabd328
bpo-44525: Copy free variables in bytecode to allow calls to inner functions to be specialized (GH-29595)
...
* Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead.
* Add reference to function to frame, borrow references to builtins and globals.
* Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions.
2021-11-23 09:53:24 +00:00
Erlend Egeberg Aasland
d82f2caf94
bpo-45847: Port _socket to PY_STDLIB_MOD (GH-29713)
2021-11-23 08:52:05 +01:00
Erlend Egeberg Aasland
758a23d1c4
bpo-45847: Fix xxlimited and xxlimited_35 build conditions (GH-29715)
2021-11-23 08:51:30 +01:00
Neil Schemenauer
457e6a6e96
bpo-45561: Run smelly.py tool from $(srcdir) (GH-29138)
2021-11-23 08:51:02 +01:00
Julien Palard
024209401e
bpo-42238: [doc] Announce the future removal of make suspicous. (GH-29652)
...
* bpo-42238: [doc] Announce the future removal of make suspicous.
* Add a news entry.
2021-11-22 15:17:54 -08:00
Erlend Egeberg Aasland
2dc7d3dda6
bpo-45847: Port xxlimited and xxlimited_35 to PY_STDLIB_MOD (GH-29707)
2021-11-22 21:27:05 +01:00
Guido van Rossum
1037ca5a8e
bpo-45850: Implement deep-freeze on Windows ( #29648 )
...
Implement changes to build with deep-frozen modules on Windows.
Note that we now require Python 3.10 as the "bootstrap" or "host" Python.
This causes a modest startup speed (around 7%) on Windows.
2021-11-22 10:09:48 -08:00
Irit Katriel
4d6c0c0cce
bpo-45871: Refactor except matcher validation into a separate function so that it can be reused. Add missing unit test. (GH-29711)
2021-11-22 16:56:23 +00:00
Christian Heimes
0e1c2f3ef8
bpo-45847: port _struct to PY_STDLIB_MOD (GH-29706)
2021-11-22 15:58:43 +01:00
Carl Friedrich Bolz-Tereick
4fad314246
bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691)
2021-11-22 08:44:57 -06:00
Erlend Egeberg Aasland
eee683cbde
bpo-45847: Port audioop, _csv, and _posixsubprocess to PY_STDLIB_MOD_SIMPLE (GH-29705)
...
Automerge-Triggered-By: GH:tiran
2021-11-22 06:37:25 -08:00
Christian Heimes
c6dec7e27a
bpo-45847: Port nis module to PY_STDLIB_MOD (GH-29699)
2021-11-22 15:18:41 +01:00
Mark Shannon
7fd92a8b7e
bpo-45813: Make sure that frame->generator is NULLed when generator is deallocated. (GH-29700)
2021-11-22 14:01:23 +00:00
Christian Heimes
d9cedabeba
bpo-45847: Port compression libs to PY_STDLIB_MOD (GH-29702)
2021-11-22 14:52:29 +01:00
Erlend Egeberg Aasland
b451673f93
bpo-45847: Port mmap, select, and _xxsubinterpreters to Py_STDLIB_MOD (GH-29703)
2021-11-22 14:49:58 +01:00
Eric V. Smith
d3062f672c
bpo-44649: Fix dataclasses(slots=True) with a field with a default, but init=False (GH-29692)
...
Special handling is needed, because for non-slots dataclasses the instance attributes are not set: reading from a field just references the class's attribute of the same name, which contains the default value. But this doesn't work for classes using __slots__: they don't read the class's attribute. So in that case (and that case only), initialize the instance attribute. Handle this for both normal defaults, and for fields using default_factory.
2021-11-22 08:26:12 -05:00
Erlend Egeberg Aasland
5b946cadaa
bpo-45847: Port fcntl to Py_STDLIB_MOD (GH-29696)
...
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-22 14:02:27 +01:00
Christian Heimes
29699a2a2a
bpo-45847: Various PY_STDLIB_MOD cleanups (GH-29697)
2021-11-22 12:09:14 +01:00
Erlend Egeberg Aasland
39f7d2ff01
bpo-45847: Port _lfprof, _opcode, _asyncio, _queue, _statistics, and _typing to PY_STDLIB_MOD_SIMPLE (GH-29690)
...
Automerge-Triggered-By: GH:tiran
2021-11-22 01:57:50 -08:00
Christian Heimes
512dbf6f56
Fix out-of-tree build support for multissltest (GH-29694)
2021-11-22 10:50:53 +01:00
Erlend Egeberg Aasland
718cee08cc
bpo-45847: Port _bisect, _heapq, _json, _pickle, _random, and _zoneinfo to PY_STDLIB_MOD_SIMPLE (GH-29689)
...
Automerge-Triggered-By: GH:tiran
2021-11-22 00:45:41 -08:00
Erlend Egeberg Aasland
133c65a870
bpo-45847: Port array, _contextvars, math, and cmath to PY_STDLIB_MOD_SIMPLE (GH-29688)
2021-11-22 09:05:36 +01:00
Erlend Egeberg Aasland
db2277a114
bpo-45723: Add helpers for save/restore env (GH-29637)
2021-11-22 09:05:06 +01:00