summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use _Py_RVALUE() in macros (#99844)Victor Stinner2022-11-285-6/+6
| | | | | | | | | | | | | | The following macros are modified to use _Py_RVALUE(), so they can no longer be used as l-value: * DK_LOG_SIZE() * _PyCode_CODE() * _PyList_ITEMS() * _PyTuple_ITEMS() * _Py_SLIST_HEAD() * _Py_SLIST_ITEM_NEXT() _PyCode_CODE() is private and other macros are part of the internal C API.
* Grammatical improvements for ctypes 'winmode' documentation (GH-19167)David Miguel Susano Pinto2022-11-281-2/+2
|
* gh-89653: PEP 670: Convert macros to functions (#99843)Victor Stinner2022-11-288-27/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert macros to static inline functions to avoid macro pitfalls, like duplication of side effects: * DK_ENTRIES() * DK_UNICODE_ENTRIES() * PyCode_GetNumFree() * PyFloat_AS_DOUBLE() * PyInstanceMethod_GET_FUNCTION() * PyMemoryView_GET_BASE() * PyMemoryView_GET_BUFFER() * PyMethod_GET_FUNCTION() * PyMethod_GET_SELF() * PySet_GET_SIZE() * _PyHeapType_GET_MEMBERS() Changes: * PyCode_GetNumFree() casts PyCode_GetNumFree.co_nfreevars from int to Py_ssize_t to be future proof, and because Py_ssize_t is commonly used in the C API. * PyCode_GetNumFree() doesn't cast its argument: the replaced macro already required the exact type PyCodeObject*. * Add assertions in some functions using "CAST" macros to check the arguments type when Python is built with assertions (debug build). * Remove an outdated comment in unicodeobject.h.
* bpo-31718: Fix io.IncrementalNewlineDecoder SystemErrors and segfaults (#18640)Zackery Spytz2022-11-283-9/+32
| | | | Co-authored-by: Oren Milman <orenmn@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* bpo-41825: restructure docs for the os.wait*() family (GH-22356)Georg Brandl2022-11-282-93/+145
|
* gh-99249: Clarify "read-only" slots tp_bases & tp_mro (GH-99342)Petr Viktorin2022-11-281-6/+25
| | | | | | | | | | | | | | | | | These slots are marked "should be treated as read-only" in the table at the start of the document. That doesn't say anything about setting them in the static struct. `tp_bases` docs did say that it should be ``NULL`` (TIL!). If you ignore that, seemingly nothing bad happens. However, some slots may not be inherited, depending on which sub-slot structs are present. (FWIW, NumPy sets tp_bases and is affected by the quirk -- though to be fair, its DUAL_INHERIT code probably predates tp_bases docs, and also the result happens to be benign.) This patch makes things explicit. It also makes the summary table legend easier to scan. Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-51524: Fix bug when calling trace.CoverageResults with valid infile (#99629)Furkan Onder2022-11-283-1/+12
| | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Docs: both sqlite3 "point examples" now adapt to str (#99823)Erlend E. Aasland2022-11-271-1/+1
|
* gh-91340: Document multiprocessing.set_start_method force parameter (GH-32339)Sam Ezeh2022-11-271-2/+6
| | | | | | | | #91340 https://bugs.python.org/issue47184 Automerge-Triggered-By: GH:kumaraditya303
* Docs: Move .PHONY to each section to avoid copy/paste omissions (#99396)Hugo van Kemenade2022-11-271-4/+24
|
* gh-99677: Deduplicate self-type in `mro` in `inspect._getmembers` (#99678)Nikita Sobolev2022-11-271-1/+1
| | | Closes #99677
* gh-99815: remove unused 'invalid' sentinel value and code that checks for it ↵Anthony Sottile2022-11-271-7/+1
| | | | in inspect.signature parsing (GH-21104)
* GH-87235: Make sure "python /dev/fd/9 9</path/to/script.py" works on macOS ↵Ronald Oussoren2022-11-273-98/+120
| | | | | | | | | | | | (#99768) On macOS all file descriptors for a particular file in /dev/fd share the same file offset, that is ``open("/dev/fd/9", "r")`` behaves more like ``dup(9)`` than a regular open. This causes problems when a user tries to run "/dev/fd/9" as a script because zipimport changes the file offset to try to read a zipfile directory. Therefore change zipimport to reset the file offset after trying to read the zipfile directory.
* Remove unused local variables in inspect.py (#24218)Yonatan Goldschmidt2022-11-271-2/+1
|
* gh-85988: Change documentation for sys.float_info.rounds (GH-99675)Brad Wolfe2022-11-271-6/+12
| | | | | | | | | | | | | | | | | | | | * Change documentation for sys.float_info.rounds Change the documentation for sys.float_info.rounds to remove references to C99 section 5.2.4.2.2 and instead place the available values inline. * Correction to previous documentation change Newlines were not preserved in generated HTML on previous commit. I have changes the list to a comma-separated list of values and their meanings. * Clarify source for value of FLT_ROUNDS Clarify the source of the FLT_ROUNDS value and change 'floating-point addition' to 'floating-point arithmetic' to indicate that the rounding mode applies to all arithmetic operations.
* doc: Remove backslashes in doctest grammar docs (#29346)George Zhang2022-11-271-3/+3
|
* bpo-43327: Fix the docs for PyImport_ImportFrozenModuleObject() (#24659)Zackery Spytz2022-11-271-2/+2
| | | | | | The docs stated that PyImport_ImportFrozenModuleObject() returns a new reference, but it actually returns an int. Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* GH-66285: fix forking in asyncio (#99769)Kumar Aditya2022-11-273-0/+110
| | | Closes #66285
* bpo-45975: Simplify some while-loops with walrus operator (GH-29347)Nick Drozd2022-11-2628-153/+41
|
* gh-89682: [doc] reword docstring of __contains__ to clarify that it returns ↵Ivan Savov2022-11-262-1/+2
| | | | a bool (GH-29043)
* gh-88330: Add more detail about what is a resource. (#99801)Jason R. Coombs2022-11-262-3/+12
|
* gh-98108: Add limited pickleability to zipfile.Path (GH-98109)Jason R. Coombs2022-11-266-22/+110
| | | | | | | | | | | | | | | * gh-98098: Move zipfile into a package. * Moved test_zipfile to a package * Extracted module for test_path. * Add blurb * Add jaraco as owner of zipfile.Path. * Synchronize with minor changes found at jaraco/zipp@d9e7f4352d. * gh-98108: Sync with zipp 3.9.1 adding pickleability.
* gh-99795: Fix typo in importlib.resources.abc (GH-99796)busywhitespace2022-11-261-1/+1
| | | | | Changing TraversableReader to TraversableResources at one place of the documentation. See #99795 for more details.
* Fix zipfile packaging after GH-98103 (GH-99797)Jason R. Coombs2022-11-262-0/+9
| | | | | * Add zipfile and test_zipfile to list of packages. Fixes regression introduced in #98103. * Restore support for py -m test.test_zipfile
* gh-91078: Return None from TarFile.next when the tarfile is empty (GH-91850)Sam Ezeh2022-11-263-0/+15
| | | Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* gh-98098: Create packages from zipfile and test_zipfile (gh-98103)Jason R. Coombs2022-11-268-798/+834
| | | | | | | | | | | | | * gh-98098: Move zipfile into a package. * Moved test_zipfile to a package * Extracted module for test_path. * Add blurb * Add jaraco as owner of zipfile.Path. * Synchronize with minor changes found at jaraco/zipp@d9e7f4352d.
* gh-97966: Restore prior expectation that uname_result._fields and ._asdict ↵Jason R. Coombs2022-11-263-2/+14
| | | | would include the processor. (gh-98343)
* gh-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declaration warnings ↵Sam James2022-11-263-48/+57
| | | | | | | in configure.ac (#99406) Follow up to 12078e78f6e4a21f344e4eaff529e1ff3b97734f.
* gh-99502: mention bytes-like objects as input in `secrets.compare_digest` ↵Nikita Sobolev2022-11-261-1/+3
| | | | | | (GH-99512) Now it is in sync with https://docs.python.org/3/library/hmac.html#hmac.compare_digest It is the same function, just re-exported. So, I guess they should mention the same input types.
* GH-95896: posixmodule.c: fix osdefs.h inclusion to not depend on compiler ↵TheShermanTanker2022-11-261-11/+3
| | | | | (#95897) Co-authored-by: Steve Dower <steve.dower@python.org>
* Fix typo in `__match_args__` doc (#99785)Terry Jan Reedy2022-11-261-1/+1
| | | A opy of #98549, whose author (@icecream17) uses a school computer that blocks the CLA site. I did not mention this in commit comment above so CLA bot does not pick up the name and request the CLA again.
* gh-98724: Fix warnings on Py_SETREF() usage (#99781)Victor Stinner2022-11-253-3/+3
| | | Cast argument to the expected type.
* gh-99029: Fix handling of `PureWindowsPath('C:\<blah>').relative_to('C:')` ↵Barney Gale2022-11-253-52/+20
| | | | | | | (GH-99031) `relative_to()` now treats naked drive paths as relative. This brings its behaviour in line with other parts of pathlib, and with `ntpath.relpath()`, and so allows us to factor out the pathlib-specific implementation.
* gh-64019: Have attribute table in `inspect` docs link to module attributes ↵Stanley2022-11-251-6/+1
| | | | | instead of listing them (GH-98116) Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
* Fix typo on inline comment for email.generator (GH-98210)Gary Donovan2022-11-251-1/+1
| | | Trivial change to comment - no issue or new entry necessary
* bpo-40882: Fix a memory leak in SharedMemory on Windows (GH-20684)Zackery Spytz2022-11-254-2/+58
| | | | | In multiprocessing.shared_memory.SharedMemory(), the temporary view returned by MapViewOfFile() should be unmapped when it is no longer needed.
* gh-96168: Add sqlite3 row factory how-to (#99507)Erlend E. Aasland2022-11-251-41/+119
| | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* bpo-38031: Fix a possible assertion failure in _io.FileIO() (#GH-5688)Zackery Spytz2022-11-253-1/+15
|
* bpo-41260: C impl of datetime.date.strftime() takes different keyword arg ↵Zackery Spytz2022-11-253-2/+7
| | | | (GH-21712)
* Revert "gh-98724: Fix Py_CLEAR() macro side effects" (#99737)Victor Stinner2022-11-245-172/+29
| | | | | Revert "gh-98724: Fix Py_CLEAR() macro side effects (#99100)" This reverts commit c03e05c2e72f3ea5e797389e7d1042eef85ad37a.
* gh-64490: Fix bugs in argument clinic varargs processing (#32092)colorfulappl2022-11-2411-11/+612
|
* GH-66285: Revert "fix forking in asyncio" (#99756)Kumar Aditya2022-11-243-109/+0
|
* Fix rendering of audioop license in Doc/license.rst (GH-99752)Zachary Ware2022-11-241-0/+4
| | | | Also some cosmetic blank line additions for consistency with the formatting of the rest of the file.
* GH-66285: skip asyncio fork tests for platforms without md5 hash (#99745)Kumar Aditya2022-11-241-0/+4
| | | Such buildbots (at the time of writing, only "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash 3.x") cannot use multiprocessing with a fork server, so just skip the test there.
* GH-79033: Fix asyncio.Server.wait_closed() (#98582)Guido van Rossum2022-11-244-2/+30
| | | | | | | | | | | It was a no-op when used as recommended (after close()). I had to debug one test (test__sock_sendfile_native_failure) -- the cleanup sequence for the test fixture was botched. Hopefully that's not a portend of problems in user code -- this has never worked so people may well be doing this wrong. :-( Co-authored-by: kumar aditya
* gh-99240: Fix double-free bug in Argument Clinic str_converter generated ↵colorfulappl2022-11-246-25/+201
| | | | | | | | code (GH-99241) Fix double-free bug mentioned at https://github.com/python/cpython/issues/99240, by moving memory clean up out of "exit" label. Automerge-Triggered-By: GH:erlend-aasland
* gh-64490: Fix refcount error when arguments are packed to tuple in argument ↵colorfulappl2022-11-246-4/+121
| | | | clinic (#99233)
* gh-99708: fix bug where compiler crashes on if expression with an empty body ↵Irit Katriel2022-11-243-3/+29
| | | | block (GH-99732)
* gh-94808: [coverage] Add an asynchronous generator test where the generator ↵zhanpon2022-11-241-0/+13
| | | | is already running (#97672)
* gh-98872: Fix a possible resource leak in Python 3.11.0 (GH-99047)SQLPATCH2022-11-242-0/+2
| | | | | Issue: #98872 Automerge-Triggered-By: GH:kumaraditya303