Commit Graph

115788 Commits

Author SHA1 Message Date
Paul Moore f34176b77f
gh-82052: Don't send partial UTF-8 sequences to the Windows API (GH-101103)
Don't send partial UTF-8 sequences to the Windows API
2023-01-17 19:23:06 +00:00
Viicos c5660ae96f
Fix typo in `ReprEnum` documentation (#101079) 2023-01-17 16:21:56 +05:30
Pablo Galindo Salgado 1de4395f62
gh-101046: Fix a potential memory leak in the parser when raising MemoryError (#101051) 2023-01-16 18:45:37 +00:00
Steve Dower 30753c37c6
gh-100247: Improve documentation for custom shebang commands in py.exe launcher (GH-101083) 2023-01-16 17:01:04 +00:00
Steve Dower df10571a13
gh-100320: Fix path calculations on Windows when python.exe is moved outside of the normal location (GH-100947) 2023-01-16 16:05:39 +00:00
Mark Shannon 7b14c2ef19
GH-100982: Add `COMPARE_AND_BRANCH` instruction (GH-100983) 2023-01-16 12:35:21 +00:00
Nikita Sobolev b1a74a182d
gh-101056: Fix memory leak in `formatfloat()` in `bytesobject.c` (#101057) 2023-01-16 16:16:07 +05:30
scrazzz b82049993f
Docs: Remove duplicate `TraversableResources` reference (#101068) 2023-01-16 16:14:50 +05:30
Kumar Aditya 74c20b6ece
GH-100997: fix refleak in `_testinternalcapi.c` (#101058) 2023-01-16 16:11:57 +05:30
Oleg Iarygin 8e9d08b062
gh-101041: Fix a misspelled name of `utctimetuple` in a doc warning (GH-101042) 2023-01-15 12:36:31 -08:00
Cristián Maureira-Fredes 5e9df888dd
Fix `ctypes` typo in `set_exception` (#101040) 2023-01-15 20:42:37 +05:30
Kumar Aditya f6307d4416
GH-100892: consolidate `HEAD_LOCK/HEAD_UNLOCK` macros (#100953) 2023-01-15 20:39:26 +05:30
Erlend E. Aasland 206f05a46b
gh-100668: Clarify how sqlite3 maps parameters onto placeholders (#100960)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-01-14 23:58:06 +01:00
Oleg Iarygin 124af17b6e
gh-94518: [_posixsubprocess] Replace variable validity flags with reserved values (#94687)
Have _posixsubprocess.c stop using boolean flags to say if gid and uid values were supplied and action is required.  Such an implicit "either initialized or look somewhere else" confused both the reader (another mental connection to constantly track between functions) and a compiler (warnings on potentially uninitialized variables being passed). Instead, we can utilize a special group/user id as a flag value -1 defined by POSIX but used nowhere else. Namely:

gid: call_setgid = False → gid = -1

uid: call_setuid = False → uid = -1

groups: call_setgroups = False → groups = NULL (obtained with (groups_list != Py_None) ? groups : NULL)

This PR is required for #94519.
2023-01-14 12:11:04 -08:00
Bob Kline 49cae39ef0
gh-101021: Document binary parameters as bytes (#101024) 2023-01-14 11:01:27 -08:00
JustAnotherArchivist ef633e5000
Sync-up parameter name in equivalent code snippet of `enumerate` (GH-101029) 2023-01-13 23:55:35 -06:00
Guido van Rossum 5134ef4878
GH-98831: Identify instructions that don't use oparg (#100957)
For these the instr_format field uses IX instead of IB.
Register instructions use IX, IB, IBBX, IBBB, etc.

Also: Include the closing '}' in Block.tokens, for completeness
2023-01-13 17:06:45 -08:00
Raymond Hettinger 6bde3d2fd3
Add recipes to showcase tee(), zip*, batched, starmap, and product. (GH-101023) 2023-01-13 19:01:22 -06:00
Raymond Hettinger 010576c6ea
Fix typo in docs (GH-101025) 2023-01-13 18:53:06 -06:00
Yurii Karabas 080cb27829
gh-74033: Fix bug when Path takes and ignores **kwargs (GH-19632)
Fix a bug where `Path` takes and ignores `**kwargs` by adding to `PurePath`  class `__init__` method which can take only positional arguments.

Automerge-Triggered-By: GH:brettcannon
2023-01-13 16:05:43 -08:00
Guido van Rossum 1bc7a73683
GH-100573: Fix server hang caused by os.stat() on named pipe (Windows) (#100959) 2023-01-13 13:24:57 -08:00
Mark Shannon c00eb1eae6
Don't double count misses. (GH-100984) 2023-01-13 15:57:39 +00:00
Serhiy Storchaka e5bd5ad70d
gh-100160: Restore and deprecate implicit creation of an event loop (GH-100410)
Partially revert changes made in GH-93453.

asyncio.DefaultEventLoopPolicy.get_event_loop() now emits a
DeprecationWarning and creates and sets a new event loop instead of
raising a RuntimeError if there is no current event loop set.

Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
2023-01-13 14:40:29 +02:00
Steve Dower 468c3bf798
gh-100247: Fix py.exe launcher not using entire shebang command for finding custom commands (GH-100944) 2023-01-13 11:49:01 +00:00
Steve Dower b5d4347950
gh-86682: Adds sys._getframemodulename as an alternative to using _getframe (GH-99520)
Also updates calls in collections, doctest, enum, and typing modules to use _getframemodulename first when available.
2023-01-13 11:31:06 +00:00
Raymond Hettinger 94fc7706b7
GH-100942: Fix incorrect cast in property_copy(). (#100965) 2023-01-12 16:13:56 -06:00
Eric Snow b511d3512b
GH-100997: Implement Multi-Phase Init for the _testinternalcapi Module (gh-100998)
_testinternalcapi is an internal module used for testing.

https://github.com/python/cpython/issues/100997
2023-01-12 13:42:03 -07:00
Barney Gale 005e69403d
gh-96290: Support partial/invalid UNC drives in ntpath.normpath() and splitdrive() (GH-100351)
This brings the Python implementation of `ntpath.normpath()` in line with the C implementation added in 99fcf15

Co-authored-by: Eryk Sun <eryksun@gmail.com>
2023-01-12 19:24:57 +00:00
Matthieu Dartiailh eecd422d1b
gh-96461: Improve docs for bytecode instructions (GH-96462)
* Clarify the meaning of the oparg for CACHE and COPY opcode in dis doc

* Use STACK to describe stack operation in analogy with a Python list

* Remove (delta) from BEFORE_WITH since BEFORE_WITH does not take an argument

* Fix the description of the stack impact of multiple opcodes
2023-01-12 18:23:50 +00:00
Neil Schemenauer c549fcccbb
GH-81381: Add longer comment _PyType_AllocNoTrack() (GH-100954)
The details on the "nitems+1" expression is a bit subtle so add a longer
comment about it.
2023-01-12 10:03:50 -08:00
Noam Cohen 2161bbf243
Fix typo in `enum` module documentation (#100992) 2023-01-12 21:10:29 +05:30
ram vikram singh d9dff4c8b5
GH-100894: Updated the doc for `sys.winver` to clarify its usual contents (GH-100913) 2023-01-12 00:11:12 +00:00
Michał Górny 02a72f080d
gh-98636: Fix detecting gdbm_compat for _dbm module (#98643)
Fix the gdbm_compat library detection logic to actually check for
-lgdbm_compat independently of the ndbm detection.
This fixes the build failure with `--with-dbmliborder=gdbm`,
and implicit fallback to ndbm with the default value.
2023-01-11 22:46:28 +01:00
Carlton Gibson 07a87f74fa
gh-94912: Adjusted check for non-standard coroutine function marker. (#100935)
The initial implementation did not correctly identify explicitly
marked class instances.

Follow up to 532aa4e4e0
2023-01-11 13:17:26 -08:00
Mark Shannon 6e4e14d98f
GH-100923: Embed jump mask in `COMPARE_OP` oparg (GH-100924) 2023-01-11 20:40:43 +00:00
th1722 61f12b8ff7
Ensure some build files include a newline at to avoid warnings (GH-100946) 2023-01-11 17:28:57 +00:00
Steve Dower 5ff029f7a3
Skip py.exe launcher tests in full layout CI test (GH-100948)
These tests become flaky when py.exe exists on the test machine but isn't the one that was just built. They also don't provide any useful information for this scenario, so easiest to just skip them.
2023-01-11 17:25:46 +00:00
Nikita Sobolev 729ab9b622
gh-100871: Improve `copy` module tests (GH-100872)
CC @AlexWaygood as the reviewer of https://github.com/python/cpython/pull/100818

Automerge-Triggered-By: GH:AlexWaygood
2023-01-11 09:14:41 -08:00
Kumar Aditya 762745a124
GH-100892: Fix race in clearing `threading.local` (#100922) 2023-01-11 16:03:31 +05:30
Mariusz Felisiak 847d7708ba
gh-98763: Prefer "python" over "python3" for command line examples in docs. (#98761) 2023-01-11 15:35:41 +05:30
Nikita Sobolev 8795ad1bd0
gh-100931: Test all `pickle` protocols in `test_slice` (#100932) 2023-01-11 09:43:45 +00:00
Thomas Wouters 8dd2766d99 Post 3.12.0a4 2023-01-10 17:40:11 +01:00
Thomas Wouters 3d5d3f7af6 Python 3.12.0a4 2023-01-10 13:09:15 +01:00
Brandt Bucher f07daaf4f7
GH-100117: Make `co_lines` more efficient (GH-100447) 2023-01-10 10:56:53 +00:00
Yao-Ching Huang b2f7b2ef0b
gh-100916: Convert argument to appropriate type (GH-100917) 2023-01-10 10:17:57 +00:00
Semen Zhydenko 35650f2538
Fix typos in Doc folder (#100880) 2023-01-10 11:04:06 +02:00
Ned Deily 57a5259a43
gh-100180: Update macOS installer to OpenSSL 1.1.1s (GH-100908) 2023-01-10 00:10:31 -05:00
Ned Deily be23a20242
gh-100893: update bpo reference in Mac README (GH-100905) 2023-01-09 22:37:10 -05:00
Guido van Rossum 3f3c78e32f
GH-98831: Refactor instr format code and change to enum (#100895) 2023-01-09 15:53:01 -08:00
Steve Dower d7ab7149f8
gh-100180: Update Windows installer to OpenSSL 1.1.1s (GH-100901) 2023-01-09 23:50:59 +00:00