Commit Graph

113059 Commits

Author SHA1 Message Date
Mark Shannon 5974827c71
GH-88756: Update docs for PEP 523 eval function type. (GH-91788) 2022-04-21 18:14:01 +01:00
Petr Viktorin ac4ffd3be2
bpo-47169: Export PyOS_CheckStack on Windows (GH-32414) 2022-04-21 18:03:25 +02:00
Mark Shannon 944fffee89
GH-88116: Use a compact format to represent end line and column offsets. (GH-91666)
* Stores all location info in linetable to conform to PEP 626.

* Remove column table from code objects.

* Remove end-line table from code objects.

* Document new location table format
2022-04-21 16:10:37 +01:00
Victor Stinner 2a5f171759
gh-89653: PEP 670: Convert tuple macros to functions (#91786)
Convert macros to static inline functions:

* PyTuple_GET_SIZE()
* PyTuple_SET_ITEM()
* PyList_GET_SIZE()
* PyList_SET_ITEM()

Add a macro converting arguments to PyTupleObject*, PyListObject* or
PyObject* to prevent emitting new compiler warnings.

According to PEP 670, PyTuple_GET_ITEM() and PyList_GET_ITEM() are
left as macros.
2022-04-21 16:52:54 +02:00
Victor Stinner 1b184c8408
gh-91782: Define static_assert() macro on FreeBSD (#91787)
On FreeBSD, if the static_assert() macro is not defined, define it in
Python until <sys/cdefs.h> supports C11:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255290
2022-04-21 16:40:34 +02:00
Victor Stinner 1a2b282f20
gh-89653: PEP 670: Convert PyWeakref_GET_OBJECT() to function (#91785)
Convert the PyWeakref_GET_OBJECT() macro to a static inline function.
Add an assertion to check the argument with PyWeakref_Check(). Add a
macro converting the argument to PyObject* to prevent emitting new
compiler warning.
2022-04-21 16:01:47 +02:00
Dennis Sweeney f2b4e458b3
gh-91636: Don't clear required fields of function objects (GH-91651) 2022-04-21 02:06:35 -04:00
Iman Kermani 615b24c80b
bpo-42066: CookieJar cookies should not be sorted (GH-22745) 2022-04-20 20:45:24 -05:00
Victor Stinner 031f1e6040
gh-90623: signal.raise_signal() calls PyErr_CheckSignals() (#91756)
signal.raise_signal() and os.kill() now call PyErr_CheckSignals() to
check immediately for pending signals.
2022-04-21 03:14:57 +02:00
Victor Stinner c77953b23e
Revert "gh-85567: Register a cleanup function to close files for FileType objects in argparse (#32257)" (#91771)
This reverts commit 328dbc051f.
2022-04-21 03:10:51 +02:00
Victor Stinner 4e52c66f69
gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#91705)
Convert unicodeobject.h macros to static inline functions:

* PyUnicode_CHECK_INTERNED()
* PyUnicode_DATA(), _PyUnicode_COMPACT_DATA(),
  _PyUnicode_NONCOMPACT_DATA()
* PyUnicode_GET_LENGTH()
* PyUnicode_IS_ASCII()
* PyUnicode_IS_COMPACT()
* PyUnicode_IS_COMPACT_ASCII()
* PyUnicode_IS_READY()

Reorder functions to declare functions before their first usage.

Static inline functions are wrapped by macros which casts
arguments with _PyObject_CAST() to prevent introducing
new compiler warnings when passing "const PyObject*".
2022-04-21 02:51:17 +02:00
Raymond Hettinger 25e35742ce
Minor improvements to grammar and markup. (GH-91762) 2022-04-20 16:02:47 -05:00
Mariatta Wijaya d608a0126e
Fix typo in GH Issue template (GH-91759)
Typo in the word enhancement.
2022-04-20 12:18:30 -07:00
Victor Stinner 7cdaf87ec5
gh-91731: Replace Py_BUILD_ASSERT() with static_assert() (#91730)
Python 3.11 now uses C11 standard which adds static_assert()
to <assert.h>.

* In pytime.c, replace Py_BUILD_ASSERT() with preprocessor checks on
  SIZEOF_TIME_T with #error.
* On macOS, py_mach_timebase_info() now accepts timebase members with
  the same size than _PyTime_t.
* py_get_monotonic_clock() now saturates GetTickCount64() to
  _PyTime_MAX: GetTickCount64() is unsigned, whereas _PyTime_t is
  signed.
2022-04-20 19:26:40 +02:00
slateny ad3ca17ff5
bpo-23747: Enhance platform doc, document default behavior (GH-31462) 2022-04-20 18:23:40 +02:00
Dennis Sweeney d7d7e6c007
Cast to (destructor) to fix compiler warnings (GH-91711) 2022-04-20 16:15:45 +01:00
dependabot[bot] b8812c9ca3
build(deps): bump actions/upload-artifact from 2.3.1 to 3 (#32227)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.3.1 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.3.1...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-20 08:04:56 -07:00
dependabot[bot] 3ace1034b8
build(deps): bump actions/cache from 2.1.7 to 3.0.1 (#32228)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.7 to 3.0.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2.1.7...v3.0.1)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-20 07:53:08 -07:00
Dong-hee Na f571c26fc1
gh-91632: Fix generic_alias_iterator to be finalized at exit. (GH-91727) 2022-04-20 23:10:41 +09:00
Irit Katriel f92bcfe6de
gh-89770: [PEP-678] add exception notes to tutorial (GH-30441) 2022-04-20 13:43:10 +01:00
Victor Stinner aaeea78b0f
gh-91731: Build Python with -std=c11 (#91733)
Python is now built with "-std=c11" compiler option, rather than
"-std=c99".
2022-04-20 13:19:05 +02:00
Jakub Kulík 4420faf273
gh-91734: Fix ossaudio support on Solaris (GH-91735) 2022-04-20 13:46:08 +03:00
slateny 5101d97d0b
bpo-30718: Add information about text buffering (GH-32351) 2022-04-20 17:24:53 +09:00
Raymond Hettinger 26f2e688b8
Clean-up the argparse docs quick links table (GH-91726) 2022-04-20 01:21:54 -05:00
Inada Naoki 4d2403fd50
gh-91020: Add `PyBytes_Type.tp_alloc` for subclass (GH-91686) 2022-04-20 14:06:29 +09:00
slateny 692aea6f38
Add link to sys.path in os lib (#91679) 2022-04-19 20:59:48 -07:00
dependabot[bot] 1ba63e3a9b
build(deps): bump actions/checkout from 2 to 3 (#32226)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-19 20:50:07 -07:00
AJ Jordan 326ae71f1d
Fix awkward sentence in signal docs (#91508)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-19 18:20:25 -07:00
Nick b6d5e3c3c9
bpo-46075: Store localhost cookies in CookieJar (#30108)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-19 13:08:06 -07:00
dependabot[bot] 74e319239b
build(deps): bump actions/setup-python from 2 to 3 (#31630)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-19 13:03:58 -07:00
Dennis Sweeney da6c78584b
gh-90667: Add specializations of Py_DECREF when types are known (GH-30872) 2022-04-19 19:02:19 +01:00
Kumar Aditya ab0d35d70d
bpo-46712: share more global strings in deepfreeze (gh-32152)
(for gh-90868)
2022-04-19 11:41:36 -06:00
Irit Katriel 3c43806513
gh-74166: make all_errors keyword-only (GH-91704) 2022-04-19 18:16:20 +01:00
Ma Lin a059395921
bpo-40859: Update Windows build to use xz-5.2.5 (GH-20622) 2022-04-19 17:36:51 +01:00
Ma Lin e4e8895ae3
gh-91616: re module, fix .fullmatch() mismatch when using Atomic Grouping or Possessive Quantifiers (GH-91681)
These jumps should use DO_JUMP0() instead of DO_JUMP():
- JUMP_POSS_REPEAT_1
- JUMP_POSS_REPEAT_2
- JUMP_ATOMIC_GROUP
2022-04-19 17:49:36 +03:00
Victor Stinner 061a8bf77c
gh-91231: Add shutdown_timeout to multiprocessing BaseManager (#32112)
Add an optional keyword 'shutdown_timeout' parameter to the
multiprocessing.BaseManager constructor. Kill the process if
terminate() takes longer than the timeout.

Multiprocessing tests pass test.support.SHORT_TIMEOUT
to BaseManager.shutdown_timeout.
2022-04-19 16:27:00 +02:00
Serhiy Storchaka 74070085da
Add more tests for group names and refs in RE (GH-91695) 2022-04-19 16:56:51 +03:00
Dong-hee Na 16fc5733b7
gh-90699: Use module state to access insert str object. (GH-91693) 2022-04-19 22:12:46 +09:00
slateny 6a7a8a740e
Doc: Fix link formatting typo (GH-91659) 2022-04-19 18:15:46 +09:00
Irit Katriel 5b37b49ebc
gh-74166: break cycle by clearing the list instead of dropping its reference (GH-91685) 2022-04-19 10:09:10 +01:00
penguin_wwy e590379197
gh-90997: bpo-46841: Disassembly of quickened code (GH-32099) 2022-04-19 09:45:08 +01:00
Victor Stinner aa5c0a9f8d
bpo-40421: Cleanup PyFrame C API (GH-32417) 2022-04-19 09:53:10 +02:00
Oleg Iarygin 7fbc7f6128
gh-91098: Use Argument Clinic for Object/classobject.c to fix docstrings (#31711)
Closes GH-91098.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-18 19:56:53 -07:00
Yurii Karabas 014eb7fd02
bpo-46014: Add docs regarding `functools.singledispatch` changes in 3.11 (#32282)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-18 19:50:59 -07:00
Inada Naoki 6fdb62b1fa
gh-91526: io: Remove device encoding support from TextIOWrapper (GH-91529)
`TextIOWrapper.__init__()` called `os.device_encoding(file.fileno())` if fileno is 0-2 and encoding=None.
But it is very rarely works, and never documented behavior.
2022-04-19 11:44:36 +09:00
Irit Katriel 39a54ba638
gh-74166: Add option to get all errors from socket.create_connection (GH-91586) 2022-04-18 23:15:41 +01:00
Bryan Weber 0860b26a4f
gh-91670: Removes `SO` config variable in `sysconfig.py` (#91671)
* Removes SO config variable in sysconfig

Per @warsaw in https://github.com/python/cpython/issues/63754, this was
deprecated in Python 3.4 and was suggested for removal in Python 3.5.

* Add NEWS

* Update Misc/NEWS.d/next/Library/2022-04-18-15-23-24.gh-issue-91670.6eyChw.rst

Co-authored-by: Éric <merwok@netwok.org>

Co-authored-by: Barry Warsaw <barry@python.org>
Co-authored-by: Éric <merwok@netwok.org>
2022-04-18 14:01:18 -07:00
Oleg Iarygin 2f0fc521f4
gh-91102: Use Argument Clinic for EncodingMap (#31725)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-18 13:43:56 -07:00
Barry Warsaw dbd9d75fed
Add some information about where pynche has moved to (#91650) 2022-04-18 07:34:53 -07:00
Kumar Aditya 8c54c3dacc
gh-91576: Speed up iteration of strings (#91574) 2022-04-18 07:18:27 -07:00