summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* gh-90928: Improve static initialization of keywords tuple in AC (#95907)Erlend E. Aasland2022-08-1355-5147/+2011
|
* gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code ↵Eric Snow2022-08-1186-370/+10314
| | | | | | | | | | | | | | | | (gh-95860) We only statically initialize for core code and builtin modules. Extension modules still create the tuple at runtime. We'll solve that part of interpreter isolation separately. This change includes generated code. The non-generated changes are in: * Tools/clinic/clinic.py * Python/getargs.c * Include/cpython/modsupport.h * Makefile.pre.in (re-generate global strings after running clinic) * very minor tweaks to Modules/_codecsmodule.c and Python/Python-tokenize.c All other changes are generated code (clinic, global strings).
* gh-95878: Fix format char in datetime CAPI tests (GH-95879)Christian Heimes2022-08-111-4/+4
|
* gh-95504: Fix negative numbers in PyUnicode_FromFormat (GH-95848)Petr Viktorin2022-08-101-0/+60
| | | Co-authored-by: philg314 <110174000+philg314@users.noreply.github.com>
* gh-93649: Undefine NDEBUG in Modules/_testcapi/* to enable assert() (GH-95793)Petr Viktorin2022-08-101-0/+3
|
* gh-93649: Split unicode tests from _testcapimodule.c & add some more (GH-95819)Petr Viktorin2022-08-104-322/+658
| | | | | | - Move PyUnicode tests to a separate file - Add some more tests for PyUnicode_FromFormat Co-authored-by: philg314 <110174000+philg314@users.noreply.github.com>
* Disable Limited API tests with Py_TRACE_REFS (GH-95796)Petr Viktorin2022-08-091-0/+15
|
* gh-93274: Expose receiving vectorcall in the Limited API (GH-95717)Petr Viktorin2022-08-084-1/+82
|
* Fix downcast compiler warning in Modules/_testcapi/vectorcall.c (#95729)Erlend E. Aasland2022-08-081-1/+1
|
* docs: Fix a few typos (#94899)Tim Gates2022-08-081-1/+1
| | | | | | - overriden => overridden - calcualation => calculation Signed-off-by: Tim Gates <tim.gates@iress.com>
* gh-95385 Fastpath for encoding dict to JSON (gh-95374)Aivars Kalvāns2022-08-061-78/+88
|
* gh-94673: Recover Weaklist Lookup Performance (gh-95544)Eric Snow2022-08-041-3/+6
| | | gh-95302 seems to have introduced a small performance regression. Here we make some minor changes to recover that lost performance.
* Fix links to old SF bugs (#95648)Serhiy Storchaka2022-08-041-1/+1
|
* gh-93274: Make vectorcall safe on mutable classes & inherit it by default ↵Petr Viktorin2022-08-042-1/+228
| | | | (#95437)
* gh-95388: Deprecate creating immutable types with mutable bases (GH-95533)Petr Viktorin2022-08-041-0/+16
|
* gh-94936: C getters: co_varnames, co_cellvars, co_freevars (#95008)Ken Jin2022-08-041-11/+69
|
* gh-91323: Revert "Allow overriding a future compliance check in asyncio.Task ↵Łukasz Langa2022-08-042-102/+8
| | | | | | (GH-32197)" (GH-95442) This reverts commit d4bb38f82bf18b00db3129031ce4969b6f0caab9.
* gh-91838: Resolve HTTP links which redirect to HTTPS (GH-95642)Serhiy Storchaka2022-08-041-1/+1
| | | | It updates links which redirect to HTTPS with different authority or path.
* GH-92678: Fix tp_dictoffset inheritance. (GH-95596)Mark Shannon2022-08-031-0/+28
| | | | | | * Add test for inheriting explicit __dict__ and weakref. * Restore 3.10 behavior for multiple inheritance of C extension classes that store their dictionary at the end of the struct.
* gh-95417: Quick fix for "ULONG_PTR differs in levels of indirection from ↵Oleg Iarygin2022-08-012-4/+12
| | | | void *" (GH-95538)
* gh-93649: Split heaptype tests from _testcapimodule.c (GH-95386)Petr Viktorin2022-08-014-970/+989
| | | | | This removes the unused negative_dictoffset function: the type this function would create is available as _testcapi.HeapCTypeWithNegativeDict
* gh-94512: Fix forced arg format in AC-processed resource (GH-94515)Oleg Iarygin2022-07-292-31/+38
|
* gh-43414: os.get_terminal_size() now uses the actual file descriptor on ↵Raghunandan Bhat2022-07-281-15/+2
| | | | Windows instead of mapping to standard handles (#93203)
* gh-94512: Fix forced arg format in AC-processed overlapped (GH-94516)Oleg Iarygin2022-07-282-64/+335
|
* gh-95324: Emit a warning if an object doesn't call PyObject_GC_UnTrack ↵Pablo Galindo Salgado2022-07-275-0/+12
| | | | during deallocation in debug mode (#95325)
* GH-93899: fix checks for eventfd flags (GH-95170)Kumar Aditya2022-07-272-10/+14
|
* GH-95045: gc untrack _lsprof.Profiler before deallocating it (GH-95315)Kumar Aditya2022-07-271-0/+1
| | | Automerge-Triggered-By: GH:pablogsal
* gh-95005: Replace PyAccu with PyUnicodeWriter (gh-95006)Aivars Kalvāns2022-07-272-73/+66
|
* gh-95174: WASI: skip missing sockets functions (GH-95179)Christian Heimes2022-07-274-10/+114
|
* gh-95041: Fail syslog.syslog in case inner call to syslog.openlog fails ↵Noam Cohen2022-07-261-1/+7
| | | | (GH-95264)
* gh-95174: Handle missing dup() and constants in WASI (GH-95229)Christian Heimes2022-07-265-2/+26
| | | | | | | - check for ``dup()`` libc function - handle missing ``F_DUPFD`` in ``dup2()`` replacement function - add workaround for WASI libc bug in MSG_TRUNC - ESHUTDOWN is missing, use EPIPE instead - POLLPRI is missing, define as 0 (no-op)
* Statistics inv_cdf sync with corresponding random module normal ↵Raymond Hettinger2022-07-261-1/+1
| | | | distributions (#95265)
* gh-95041: Fix several minor issues in syslog.openlog() (GH-95058)Serhiy Storchaka2022-07-261-24/+33
| | | | | | | | | | | | * syslog_get_argv() swallows exceptions, but not in all cases. * if ident is non UTF-8 encodable, syslog.openlog() fails after setting the global reference to ident. Now the C string saved internally in the previous call to openlog() points to the freed memory. * PySys_Audit() can crash if ident is NULL. * There may be a race condition with syslog.syslog(), because the global reference to ident is decrefed before setting the new value. * Possible use of freed memory if syslog.openlog() is called while the GIL is released in syslog.syslog().
* GH-92678: Expose managed dict clear and visit functions (#95246)Mark Shannon2022-07-251-0/+8
|
* gh-90473: Check for HAVE_KILL in main.c:exit_sigint (GH-95165)Christian Heimes2022-07-231-1/+1
|
* gh-95132: Correctly relay *args and **kwds from sqlite3.connect to factory ↵Erlend Egeberg Aasland2022-07-233-147/+35
| | | | | | | | | | | | (#95146) This PR partially reverts gh-24421 (PR) and fixes the remaining concerns given in gh-93044 (issue): - keyword arguments are passed as positional arguments to factory() - if an argument is not passed to sqlite3.connect(), its default value is passed to factory() Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-95095: Use SSL_CTX_get_max_proto_version instead of SSL_CTX_ctrl (GH-95096)David Benjamin2022-07-211-2/+2
| | | | | | | The wrapper macros are more readable and match the form recommended in the OpenSSL documentation. They also slightly less error-prone, as the mapping of arguments to SSL_CTX_ctrl is not always clear. (Though in this case it's straightforward.) https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_get_max_proto_version.html
* GH-94382: port multiprocessing static types to heap types (#94336)Kumar Aditya2022-07-203-63/+61
|
* GH-90699: fix ref counting of static immortal strings (gh-94850)Kumar Aditya2022-07-201-1/+1
|
* GH-91153: Handle mutating __index__ methods in bytearray item assignment ↵Brandt Bucher2022-07-191-0/+16
| | | | (GH-94891)
* gh-94930: skipitem() in getargs.c should return non-NULL on error (GH-94931)Serhiy Storchaka2022-07-181-2/+21
|
* GH-94857: fix test_io refleak (GH-94858)Kumar Aditya2022-07-181-1/+6
|
* gh-94821: Fix autobind of empty unix domain address (GH-94826)Nir Soffer2022-07-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When binding a unix socket to an empty address on Linux, the socket is automatically bound to an available address in the abstract namespace. >>> s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) >>> s.bind("") >>> s.getsockname() b'\x0075499' Since python 3.9, the socket is bound to the one address: >>> s.getsockname() b'\x00' And trying to bind multiple sockets will fail with: Traceback (most recent call last): File "/home/nsoffer/src/cpython/Lib/test/test_socket.py", line 5553, in testAutobind s2.bind("") OSError: [Errno 98] Address already in use Added 2 tests: - Auto binding empty address on Linux - Failing to bind an empty address on other platforms Fixes f6b3a07b7df6 (bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866)
* gh-93939: Build C extensions without setup.py (GH-94474)Christian Heimes2022-07-142-1/+2
| | | Combines GH-93940, GH-94452, and GH-94433
* gh-93649: Fix linkage of _PyTestCapi_Init_Vectorcall (#94702)Oleg Iarygin2022-07-131-1/+1
|
* bpo-45924: Fix asyncio incorrect traceback when future's exception is raised ↵Kumar Aditya2022-07-111-0/+14
| | | | multiple times (GH-30274)
* GH-94736: Fix _multiprocessing.SemLock subclassing (#94738)Kumar Aditya2022-07-111-4/+2
| | | | | | | | | * fix allocator and deallocator * 📜🤖 Added by blurb_it. * code review Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-94637: Release GIL in SSLContext.set_default_verify_paths (GH-94658)Christian Heimes2022-07-091-1/+5
|
* gh-93649: Split vectorcall testing from _testcapimodule.c (GH-94549)Petr Viktorin2022-07-085-251/+286
| | | | | | | | | | | | | | The `_testcapimodule.c` file is getting too large to work with effectively. This PR lays out a general structure of how tests can be split up, with more splitting to come later if the structure is OK. Vectorcall tests aren't the biggest issue -- it's just an area I want to work on next, so I'm starting here. An issue specific to vectorcall tests is that it wasn't clear that e.g. `MethodDescriptor2` is related to testing vectorcall: the `/* Test PEP 590 */` section had an ambiguous end. Separate file should make things like this much clearer. OTOH, for some pieces it might not be clear where they should be -- I left `meth_fastcall` with tests of the other calling conventions. IMO, even with the ambiguity it's still worth it to split the huge file up. I'm not sure about the buildsystem changes, hopefully CI will tell me what's wrong. @vstinner, @markshannon: Do you think this is a good idea? Automerge-Triggered-By: GH:encukou
* gh-94321: Document sqlite3.PrepareProtocol (#94620)Erlend Egeberg Aasland2022-07-071-0/+3
|