cpython/Lib
Richard Hansen 843d28f59d
gh-124872: Replace enter/exit events with "switched" (#124776)
Users want to know when the current context switches to a different
context object.  Right now this happens when and only when a context
is entered or exited, so the enter and exit events are synonymous with
"switched".  However, if the changes proposed for gh-99633 are
implemented, the current context will also switch for reasons other
than context enter or exit.  Since users actually care about context
switches and not enter or exit, replace the enter and exit events with
a single switched event.

The former exit event was emitted just before exiting the context.
The new switched event is emitted after the context is exited to match
the semantics users expect of an event with a past-tense name.  If
users need the ability to clean up before the switch takes effect,
another event type can be added in the future.  It is not added here
because YAGNI.

I skipped 0 in the enum as a matter of practice.  Skipping 0 makes it
easier to troubleshoot when code forgets to set zeroed memory, and it
aligns with best practices for other tools (e.g.,
https://protobuf.dev/programming-guides/dos-donts/#unspecified-enum).
2024-10-14 12:28:41 -07:00
..
__phello__
_pyrepl gh-124960: Fixed `barry_as_FLUFL` future flag does not work in new REPL (#124999) 2024-10-14 15:53:50 +02:00
asyncio gh-125472: Revert "gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (#12… (#125476) 2024-10-14 17:59:13 +00:00
collections gh-123339: Fix cases of inconsistency of __module__ and __firstlineno__ in classes (GH-123613) 2024-09-28 20:51:49 +03:00
concurrent gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
ctypes gh-121249: Support _Complex types in the struct module (#121613) 2024-10-07 13:53:02 +02:00
curses gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
dbm gh-120417: Remove unused imports in the stdlib (#120420) 2024-06-12 20:56:42 +02:00
email gh-122989: Replace duplicate “self.policy.linesep” with “linesep” (#123002) 2024-09-04 02:30:25 -04:00
encodings
ensurepip gh-91818: Use default program name in the CLI of many modules (GH-124867) 2024-10-10 00:20:53 +03:00
html
http gh-123430: Add dark mode support to pages generated by http.server (#123475) 2024-09-03 09:32:11 +03:00
idlelib gh-122392: IDLE - Fix overlapping lines in browsers (#122392) (#124975) 2024-10-07 14:52:09 -04:00
importlib gh-123085: Fix issue in inferred caller when resources package has no source (#123102) 2024-09-12 19:08:06 +00:00
json gh-91818: Use default program name in the CLI of many modules (GH-124867) 2024-10-10 00:20:53 +03:00
logging gh-124653: Relax (again) detection of queue API for logging handlers (GH-124897) 2024-10-07 19:42:19 +01:00
multiprocessing gh-84559: Change the multiprocessing start method default to `forkserver` (GH-101556) 2024-09-26 16:57:19 -07:00
pathlib GH-125069: Fix inconsistent joining in `WindowsPath(PosixPath(...))` (#125156) 2024-10-13 17:46:10 +00:00
pydoc_data gh-125072: Add label for assignment expressions; update tracked section for assignment expression topic (#125074) 2024-10-07 22:51:14 +00:00
re Remove dead code in the RE parser (GH-122796) 2024-08-07 19:44:18 +00:00
site-packages
sqlite3 gh-91818: Use default program name in the CLI of many modules (GH-124867) 2024-10-10 00:20:53 +03:00
sysconfig gh-120831: Correct default minimum iOS version. (#122339) 2024-07-27 01:53:44 +00:00
test gh-124872: Replace enter/exit events with "switched" (#124776) 2024-10-14 12:28:41 -07:00
tkinter gh-123341: Support `tkinter.Event` type subcript (#123353) 2024-09-01 12:47:07 +01:00
tomllib gh-124835: `tomllib.loads`: Raise TypeError not AttributeError. Improve message (#124587) 2024-10-01 19:58:08 -07:00
turtledemo Fix typos (#123775) 2024-09-09 14:58:26 +02:00
unittest gh-124176: Add special support for dataclasses to `create_autospec` (#124429) 2024-09-27 09:48:31 +03:00
urllib gh-76960: Fix urljoin() and urldefrag() for URIs with empty components (GH-123273) 2024-08-31 12:42:08 +03:00
venv Trivial change: Update comments in activate about what running hash -r does (GH-125385) 2024-10-13 08:22:05 +01:00
wsgiref Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
xml Fix typos in comments and test code (#122846) 2024-08-11 21:16:41 -07:00
xmlrpc gh-120485: Add an override of `allow_reuse_port` on classes subclassing `socketserver.TCPServer` (GH-120488) 2024-06-16 13:15:03 +01:00
zipfile Fix invisible character typo (#123933) 2024-09-11 07:44:46 -04:00
zoneinfo
__future__.py
__hello__.py
_aix_support.py
_android_support.py gh-116622: Mock the passage of time in Android logcat rate limit tests (#124015) 2024-09-13 04:58:11 +00:00
_collections_abc.py gh-116938: Clarify documentation of `dict` and `dict.update` regarding the positional argument they accept (#125213) 2024-10-11 23:05:13 +00:00
_colorize.py gh-117225: Move colorize functionality to own internal module (#118283) 2024-05-01 12:27:06 -06:00
_compat_pickle.py
_compression.py
_ios_support.py gh-119253: use ImportError in _ios_support (#119254) 2024-05-20 16:39:30 -04:00
_markupbase.py
_opcode_metadata.py GH-119866: Spill the stack around escaping calls. (GH-124392) 2024-10-07 14:56:39 +01:00
_osx_support.py
_py_abc.py
_pydatetime.py gh-41431: Add `datetime.time.strptime()` and `datetime.date.strptime()` (#120752) 2024-09-25 14:43:58 -07:00
_pydecimal.py gh-121798: Add class method Decimal.from_number() (GH-121801) 2024-10-14 08:24:01 +00:00
_pyio.py gh-90102: Fix pyio _isatty_open_only() (#125089) 2024-10-08 11:49:50 +00:00
_pylong.py Fix typos in comments and test code (#122846) 2024-08-11 21:16:41 -07:00
_sitebuiltins.py
_strptime.py gh-53203: Fix strptime() for %c, %x and %X formats on many locales (GH-125406) 2024-10-14 16:29:20 +03:00
_threading_local.py
_weakrefset.py gh-89967: make WeakKeyDictionary and WeakValueDictionary thread safe (#125325) 2024-10-13 21:05:05 +05:30
abc.py
annotationlib.py Minor edit for code clarification in annotationlib. (#124805) 2024-09-30 15:25:56 -07:00
antigravity.py
argparse.py gh-86357: argparse: use str() consistently and explicitly to print choices (GH-117766) 2024-10-14 09:36:53 +03:00
ast.py gh-91818: Use default program name in the CLI of many modules (GH-124867) 2024-10-10 00:20:53 +03:00
base64.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
bdb.py gh-124552 : Improve the accuracy of possible breakpoint check in bdb (#124553) 2024-10-04 21:32:57 -04:00
bisect.py
bz2.py gh-115961: Add name and mode attributes for compressed file-like objects (GH-116036) 2024-04-21 11:46:39 +03:00
cProfile.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
calendar.py gh-120567: Clarify weekday return in calendar.monthrange docstring (#120570) 2024-06-16 16:43:57 -04:00
cmd.py Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
code.py gh-122546: Relax SyntaxError check when raising errors on the new REPL (#123233) 2024-08-23 00:25:33 +01:00
codecs.py gh-121785: Remove unused code from codecs.py (GH-121787) 2024-07-15 17:18:37 +00:00
codeop.py gh-124960: Fixed `barry_as_FLUFL` future flag does not work in new REPL (#124999) 2024-10-14 15:53:50 +02:00
colorsys.py gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
compileall.py gh-117205: Increase chunksize when compiling pyc in parallel (#117206) 2024-04-03 15:24:24 -07:00
configparser.py gh-123049: configparser: Allow to create the unnamed section from scratch. (#123077) 2024-08-18 15:52:25 -04:00
contextlib.py
contextvars.py
copy.py gh-121300: Add `replace` to `copy.__all__` (#121302) 2024-07-03 20:33:56 +05:30
copyreg.py
csv.py gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
dataclasses.py gh-118974: Add `decorator` argument to `make_dataclass` (gh-122723) 2024-10-01 09:51:51 -04:00
datetime.py gh-123843: Remove broken links to the Zope DateTimeWiki (#123846) 2024-09-08 22:39:23 -04:00
decimal.py gh-123339: Fix cases of inconsistency of __module__ and __firstlineno__ in classes (GH-123613) 2024-09-28 20:51:49 +03:00
difflib.py gh-115801: Only allow sequence of strings as input for difflib.unified_diff (GH-118333) 2024-06-10 14:06:18 +03:00
dis.py Add "annotate" SET_FUNCTION_ATTRIBUTE bit to dis. (#124566) 2024-09-25 17:01:45 -07:00
doctest.py gh-120254: Add a `commands` argument to `pdb.set_trace` (#120255) 2024-09-24 12:52:15 -07:00
enum.py gh-116110: remove extra processing for the __signature__ attribute (GH-116234) 2024-10-08 12:36:03 -07:00
filecmp.py gh-122400: Handle ValueError in filecmp (GH-122401) 2024-07-30 08:50:30 +00:00
fileinput.py
fnmatch.py
fractions.py gh-121797: Add class method Fraction.from_number() (GH-121800) 2024-10-14 07:54:59 +00:00
ftplib.py Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
functools.py functools: Give up on lazy-importing types (#124736) 2024-09-29 06:31:06 -07:00
genericpath.py gh-117114: Make os.path.isdevdrive available on all platforms (GH-117115) 2024-03-25 22:55:11 +00:00
getopt.py Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
getpass.py
gettext.py Fix old-style `print` statement in `gettext` comments (#122939) 2024-08-12 18:15:57 +03:00
glob.py GH-116380: Move pathlib-specific code from `glob` to `pathlib._abc`. (#120011) 2024-06-07 17:59:34 +01:00
graphlib.py gh-115238: Remove a redundant f-string in graphlib (#115239) 2024-09-01 06:12:53 +01:00
gzip.py gh-125260: Change the default ``gzip.compress()`` mtime to 0 (#125261) 2024-10-12 18:18:48 +01:00
hashlib.py Fix typos in warnings, docstrings, comments and text files (#123597) 2024-09-03 02:20:40 +02:00
heapq.py gh-119721: Integrate documentation fixes into heapq module docstring. (gh-119722) 2024-05-29 11:39:34 -05:00
hmac.py
imaplib.py Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
inspect.py gh-101552: Allow pydoc to display signatures in source format (#124669) 2024-10-09 05:03:53 +00:00
io.py
ipaddress.py gh-124217, ipaddress: Add RFC 9637 reserved IPv6 block `3fff::/20` (#124240) 2024-09-20 11:01:28 +00:00
keyword.py
linecache.py gh-122170: Handle ValueError raised by os.stat() in linecache (GH-122176) 2024-07-27 10:10:42 +00:00
locale.py gh-91565: Replace bugs.python.org links with Devguide/GitHub ones (GH-91568) 2024-04-01 13:02:07 +00:00
lzma.py gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
mailbox.py gh-117467: Add preserving of mailbox owner on flush (GH-117510) 2024-04-04 13:32:53 +03:00
mimetypes.py Fix typos in comments and docstring (#122720) 2024-08-07 07:39:16 +01:00
modulefinder.py
netrc.py
ntpath.py gh-120417: Remove unused imports in the stdlib (#120420) 2024-06-12 20:56:42 +02:00
nturl2path.py
numbers.py
opcode.py GH-118093: Specialize `CALL_KW` (GH-123006) 2024-08-16 17:11:24 +01:00
operator.py gh-115808: Add ``is_none`` and ``is_not_none`` to ``operator`` (#115814) 2024-08-10 20:16:34 +01:00
optparse.py
os.py GH-119169: Simplify `os.walk()` exception handling (#121435) 2024-07-08 17:41:01 +01:00
pdb.py gh-91818: Use default program name in the CLI of many modules (GH-124867) 2024-10-10 00:20:53 +03:00
pickle.py gh-122213: Add notes for pickle serialization errors (GH-122214) 2024-09-09 21:28:55 +03:00
pickletools.py gh-123309: Remove check for redefined memo entry in pickletools.dis() (GH-123374) 2024-08-31 16:21:49 +03:00
pkgutil.py
platform.py gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
plistlib.py
poplib.py
posixpath.py pathlib ABCs: remove duplicate `realpath()` implementation. (#119178) 2024-06-05 18:54:50 +01:00
pprint.py gh-118761: Improve import time of `pprint` (#122725) 2024-08-07 22:46:54 +03:00
profile.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
pstats.py gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
pty.py gh-124405: Fix `NameError` in `openpty` (#124406) 2024-09-24 20:06:39 +02:00
py_compile.py
pyclbr.py
pydoc.py gh-101552: Allow pydoc to display signatures in source format (#124669) 2024-10-09 05:03:53 +00:00
queue.py gh-117531: Unblock getters after non-immediate queue shutdown (#117532) 2024-04-10 08:01:42 -07:00
quopri.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
random.py gh-123968: Fix lower bound for `python -m random --float` (#123971) 2024-09-12 16:54:18 +03:00
reprlib.py
rlcompleter.py gh-113978: Ignore warnings on text completion inside REPL (#113979) 2024-05-21 18:28:21 +02:00
runpy.py
sched.py gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
secrets.py
selectors.py
shelve.py
shlex.py
shutil.py gh-117151: increase default buffer size of shutil.copyfileobj() to 256k. (GH-119783) 2024-10-04 16:51:22 -07:00
signal.py
site.py gh-125140: Remove the current directory from sys.path when using pyrepl (GH-125212) 2024-10-09 22:30:56 +00:00
smtplib.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
socket.py gh-121423: Improve import time of `socket` (#121424) 2024-09-04 12:00:37 +02:00
socketserver.py
sre_compile.py
sre_constants.py
sre_parse.py
ssl.py gh-118658: Return consistent types from `get_un/verified_chain` in `SSLObject` and `SSLSocket` (#118669) 2024-08-16 22:27:44 +02:00
stat.py gh-120417: Remove unused imports in the stdlib (#120420) 2024-06-12 20:56:42 +02:00
statistics.py Minor code beautifications in statistics.py (gh-124866) 2024-10-01 15:55:36 -05:00
string.py
stringprep.py
struct.py gh-120417: Add #noqa to used imports in the stdlib (#120421) 2024-06-13 16:14:50 +02:00
subprocess.py gh-121381 Remove subprocess._USE_VFORK escape hatch (#121383) 2024-07-30 18:39:54 -07:00
symtable.py gh-119698: deprecate ``symtable.Class.get_methods`` (#121902) 2024-07-22 07:04:17 -07:00
tabnanny.py gh-120495: Fix incorrect exception handling in Tab Nanny (#120498) 2024-06-15 05:04:14 -06:00
tarfile.py gh-121285: Remove backtracking when parsing tarfile headers (GH-121286) 2024-08-31 15:17:05 -07:00
tempfile.py
textwrap.py
this.py
threading.py gh-121474: Add threading.Barrier parties arg sanity check. (GH-121480) 2024-07-30 11:53:07 +03:00
timeit.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
token.py
tokenize.py gh-91818: Use default program name in the CLI of many modules (GH-124867) 2024-10-10 00:20:53 +03:00
trace.py gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) 2024-05-29 12:43:19 -04:00
traceback.py gh-122145: Handle an empty AST body when reporting tracebacks (#122161) 2024-09-18 18:42:33 +02:00
tracemalloc.py
tty.py
turtle.py gh-123614: Add save function to turtle.py (#123617) 2024-09-12 21:36:17 -07:00
types.py
typing.py gh-119180: Rename SOURCE format to STRING (#124620) 2024-09-26 13:49:48 -07:00
uuid.py Fix typos in comments and docstring (#122720) 2024-08-07 07:39:16 +01:00
warnings.py gh-122088: Copy the coroutine status of the underlying callable in `@warnings.deprecated` (#122086) 2024-07-23 10:59:28 +01:00
wave.py
weakref.py gh-89967: make WeakKeyDictionary and WeakValueDictionary thread safe (#125325) 2024-10-13 21:05:05 +05:30
webbrowser.py gh-123494: Improve documentation for ``webbrowser`` return types (#123495) 2024-09-01 06:17:03 +01:00
zipapp.py
zipimport.py gh-121735: Fix module-adjacent references in zip files (#123037) 2024-09-11 22:33:07 -04:00