Commit Graph

117952 Commits

Author SHA1 Message Date
Victor Stinner 8ebc9fc321
gh-102304: Rename _Py_IncRefTotal_DO_NOT_USE_THIS() (#107193)
* Rename _Py_IncRefTotal_DO_NOT_USE_THIS() to _Py_INCREF_IncRefTotal()
* Rename _Py_DecRefTotal_DO_NOT_USE_THIS() to _Py_DECREF_DecRefTotal()
* Remove temporary _Py_INC_REFTOTAL() and _Py_DEC_REFTOTAL() macros
2023-07-24 19:47:50 +00:00
Victor Stinner e717b47ed8
gh-98608: Move PyInterpreterConfig to pylifecycle.h (#107191)
Move PyInterpreterConfig structure and associated macros from
initconfig.h to pylifecycle.h: it's not related to the Python
Initialization Configuration.
2023-07-24 19:42:04 +00:00
Alex Waygood db17529f80
gh-104050: Argument Clinic: annotate `main()` (#107192) 2023-07-24 19:32:38 +00:00
Victor Stinner 837fa5c0cd
GH-96803: Move PyUnstable_InterpreterFrame_GetCode() to Python.h (#107188)
Declare the following 3 PyUnstable functions in
Include/cpython/pyframe.h rather than Include/cpython/frameobject.h,
so they are now provided by the standard "#include <Python.h>".
2023-07-24 21:20:44 +02:00
Erlend E. Aasland 83a2837b32
gh-106368: Increase Argument Clinic CLI test coverage (#107156)
Instead of hacking into the Clinic class, use the Argument Clinic tool
to run the ClinicExternalTest test suite.

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-07-24 20:49:16 +02:00
Victor Stinner 307186704d
gh-106320: Remove private _PyMem API (#107187)
Move private _PyMem functions to the internal C API (pycore_pymem.h):

* _PyMem_GetCurrentAllocatorName()
* _PyMem_RawStrdup()
* _PyMem_RawWcsdup()
* _PyMem_Strdup()

No longer export these functions.

Move pymem_getallocatorsname() function from _testcapi to _testinternalcapi,
since the API moved to the internal C API.
2023-07-24 18:48:06 +00:00
Victor Stinner d27eb1e406
gh-106320: Remove private _PyUnicode C API (#107185)
Move private _PyUnicode functions to the internal C API
(pycore_unicodeobject.h):

* _PyUnicode_IsCaseIgnorable()
* _PyUnicode_IsCased()
* _PyUnicode_IsXidContinue()
* _PyUnicode_IsXidStart()
* _PyUnicode_ToFoldedFull()
* _PyUnicode_ToLowerFull()
* _PyUnicode_ToTitleFull()
* _PyUnicode_ToUpperFull()

No longer export these functions.
2023-07-24 18:26:29 +00:00
Guido van Rossum 032f480909
Thoroughly refactor the cases generator (#107151)
This mostly extracts a whole bunch of stuff out of generate_cases.py into separate files, but there are a few other things going on here.

- analysis.py: `Analyzer` etc.
- instructions.py: `Instruction` etc.
- flags.py: `InstructionFlags`, `variable_used`, `variable_used_unspecialized`
- formatting.py: `Formatter` etc.
- Rename parser.py to parsing.py, to avoid conflict with stdlib parser.py
- Blackify most things
- Fix most mypy errors
- Remove output filenames from Generator state, add them to `write_instructions()` etc.
- Fix unit tests
2023-07-24 09:38:23 -07:00
Erlend E. Aasland ff5f94b72c
Docs: Add missing markup to Argument Clinic docs (#106876)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-24 15:22:18 +00:00
Victor Stinner 7516953275
gh-107162: Document errcode.h usage in its comment (#107177)
Public and documented PyRun_InteractiveOneFlags() C API uses it.
2023-07-24 14:14:58 +00:00
Victor Stinner fd66baf34a
gh-106320: Remove private _PyDict C API (#107145)
Move private _PyDict functions to the internal C API (pycore_dict.h):

* _PyDict_Contains_KnownHash()
* _PyDict_DebugMallocStats()
* _PyDict_DelItemIf()
* _PyDict_GetItemWithError()
* _PyDict_HasOnlyStringKeys()
* _PyDict_MaybeUntrack()
* _PyDict_MergeEx()

No longer export these functions.
2023-07-24 14:02:03 +00:00
da-woods 0a9b339363
Fix PyVectorcall_Function doc versionadded (#107140)
The documentation implies that PyVectorcall_Function() was available in Python 3.8.
This is half-true - it was available under a different name. I think it's clearer to set
the "version added" to 3.9.
2023-07-24 14:54:38 +02:00
Hakan Celik ebe44a5155
Docs: Remove duplicate word in Argument Clinic howto heading (#107169) 2023-07-24 13:54:39 +02:00
TommyUnreal 2cf99026d6
gh-107017: Change Chapter Strings to Texts in the Introduction chapter. (#107104)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-24 05:55:57 +00:00
Victor Stinner 1e50112287
gh-106320: Remove private _PyObject C API (#107159)
Move private _PyObject and private _PyType functions to the internal
C API (pycore_object.h):

* _PyObject_GetMethod()
* _PyObject_IsAbstract()
* _PyObject_NextNotImplemented()
* _PyType_CalculateMetaclass()
* _PyType_GetDocFromInternalDoc()
* _PyType_GetTextSignatureFromInternalDoc()

No longer export these functions.
2023-07-23 22:25:48 +00:00
Jérôme Carretero 8de8a817ee
Docs: fix typo in os.pwrite docstring (#107087) 2023-07-23 14:53:25 -07:00
cLupus 7ca2d8e053
gh-105291: Add link to migration guide for distutils (#107130)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-07-23 14:50:01 -07:00
Erlend E. Aasland b447e19e72
gh-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls (#107062)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-23 22:56:56 +02:00
Victor Stinner 7d41ead919
gh-106320: Remove _PyBytes_Join() C API (#107144)
Move private _PyBytes functions to the internal C API
(pycore_bytesobject.h):

* _PyBytes_DecodeEscape()
* _PyBytes_FormatEx()
* _PyBytes_FromHex()
* _PyBytes_Join()

No longer export these functions.
2023-07-23 20:10:12 +00:00
Victor Stinner 0d6dfd68d2
gh-106320: Remove private _PyObject C API (#107147)
Move private debug _PyObject functions to the internal C API
(pycore_object.h):

* _PyDebugAllocatorStats()
* _PyObject_CheckConsistency()
* _PyObject_DebugTypeStats()
* _PyObject_IsFreed()

No longer export most of these functions, except of
_PyObject_IsFreed().

Move test functions using _PyObject_IsFreed() from _testcapi to
_testinternalcapi. check_pyobject_is_freed() test no longer catch
_testcapi.error: the tested function cannot raise _testcapi.error.
2023-07-23 20:09:08 +00:00
Victor Stinner 0810b0c435
gh-106320: Remove _PyTuple_MaybeUntrack() C API (#107143)
Move _PyTuple_MaybeUntrack() and _PyTuple_DebugMallocStats() functions
to the internal C API (pycore_tuple.h). No longer export these functions.
2023-07-23 19:16:21 +00:00
Victor Stinner adb27ea2d5
gh-106320: Remove _PyIsSelectable_fd() C API (#107142)
Move _PyIsSelectable_fd() macro to the internal C API
(pycore_fileutils.h).
2023-07-23 19:07:12 +00:00
Ezio Melotti 956b3de816
Remove superflous whitespaces in `layout.html`. (GH-107067) 2023-07-23 17:18:50 +02:00
Dong-hee Na d1b839b453
gh-107122: Update what's news for dbm.*dbm.clear() method (gh-107135) 2023-07-24 00:08:50 +09:00
Dong-hee Na 0ae4870d09
gh-107122: Add clear method to dbm.ndbm module (gh-107126) 2023-07-23 14:26:23 +00:00
Tomas R b3c34e55c0
gh-62519: Make pgettext search plurals when translation is not found (#107118)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-07-23 16:08:28 +02:00
Dong-hee Na b273837fea
gh-107122: Add clear method to dbm.gdbm.module (gh-107127) 2023-07-23 13:51:12 +00:00
TommyUnreal e59da0c4f2
gh-107017: Analolgy to Pascal and C replaced. (#107025)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-07-23 06:07:24 -06:00
Serhiy Storchaka 08a228da05
gh-107091: Fix the use of some C domain roles (#107092) 2023-07-23 12:27:05 +02:00
htsedebenham c65592c4d6
gh-106186: Don't report MultipartInvariantViolationDefect for valid multipart emails when parsing header only (#107016) 2023-07-23 12:25:18 +02:00
Gilles Bassière 54632528ee
bpo-18319: gettext() can retrieve a message even if a plural form exists (#19869) 2023-07-23 11:59:19 +02:00
Daniele Procida a2a0e51400
gh-106996: Add the basics of a turtle graphics tutorial (#107072)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-23 03:43:27 -06:00
littlebutt's workshop 102a773716
gh-106976: alphabetise bullets by module name task2-3 (#107005)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-23 09:41:34 +00:00
wulmer f5147c0cfb
gh-101100: Fix some broken sphinx references (#107095) 2023-07-23 03:23:44 -06:00
Tomas R dcd7acb04a
gh-54738: Add argparse i18n howto (#104562) 2023-07-23 11:10:38 +02:00
wulmer 680f3e1591
gh-71261: Add paragraph on shadowing submodules with star imports (#107004) 2023-07-23 03:00:42 -06:00
Jakub Červinka 9629d4442e
gh-107017: removed mention that C does it the same way (#107020) 2023-07-23 02:57:52 -06:00
wulmer 0af247da09
gh-102111: Add link to string escape sequences in re module (#106995)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-23 02:50:38 -06:00
J. Nick Koston 9eeb4b485f
gh-82500: Fix asyncio sendfile overflow on 32bit (#107056) 2023-07-22 21:07:14 -07:00
Guido van Rossum 7fc9be350a
gh-107082: Remove debug hack from get_first_executor in test_capi.test_misc (#107085)
(Even though it doesn't look like it fixes gh-107082 -- see discussion there -- it still removes debug code that should never have been committed.)
2023-07-22 18:22:33 -07:00
Lukas van de Wiel 9a6b278769
gh-106962: Detect mpicc in configure.ac (#106961)
Don't let autoconf mistake MPI compilers for Intel compilers;
filter out the MPI case to prevent Intel specific options from being applied.
2023-07-22 23:20:03 +00:00
Erlend E. Aasland 3aeffc0d8f
gh-104050: Argument Clinic: Increase typing coverage (#107074)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-22 22:30:42 +00:00
Victor Stinner 889851ecc3
gh-106320: Remove _PyFunction_Vectorcall() API (#107071)
Move _PyFunction_Vectorcall() API to the internal C API.
No longer export the function.
2023-07-22 21:44:33 +00:00
Victor Stinner c1331ad508
gh-106320: Remove private _PyModule API (#107070)
Move private _PyModule API to the internal C API
(pycore_moduleobject.h):

* _PyModule_Clear()
* _PyModule_ClearDict()
* _PyModuleSpec_IsInitializing()
* _PyModule_IsExtension()

No longer export these functions.
2023-07-22 21:41:11 +00:00
Victor Stinner 0927a2b25c
GH-103082: Rename PY_MONITORING_EVENTS to _PY_MONITORING_EVENTS (#107069)
Rename private C API constants:

* Rename PY_MONITORING_UNGROUPED_EVENTS to _PY_MONITORING_UNGROUPED_EVENTS
* Rename PY_MONITORING_EVENTS to _PY_MONITORING_EVENTS
2023-07-22 21:35:27 +00:00
J. Nick Koston b7dc795dfd
gh-106527: asyncio: optimize to add/remove readers and writers (#106528) 2023-07-22 21:07:40 +00:00
Victor Stinner ee15844db8
gh-106320: Move _PyMethodWrapper_Type to internal C API (#107064) 2023-07-22 20:57:59 +00:00
Jochem Boersma 5e5a34ac3a
gh-107028: tiny textual changes in logging docs and docstrings (GH-107029) 2023-07-22 21:43:18 +01:00
Victor Stinner 22422e9d1a
gh-106320: Remove private _PyInterpreterID C API (#107053)
Move the private _PyInterpreterID C API to the internal C API: add a
new pycore_interp_id.h header file.

Remove Include/interpreteridobject.h and
Include/cpython/interpreteridobject.h header files.
2023-07-22 19:31:55 +00:00
Serhiy Storchaka f8b7fe2f26
gh-106948: Add standard external names to nitpick_ignore (GH-106949)
It includes standard C types, macros and variables like "size_t",
"LONG_MAX" and "errno", and standard environment variables like "PATH".
2023-07-22 21:35:22 +03:00