Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-109461: Update logging module lock acquisition to use context manager#109462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Changes from1 commit
Commits
Show all changes
41 commits
Select commitHold shift + click to select a range
02c1d58
Updated logging __init__.py to acquire its module lock using a contex…
dcollisonSep 15, 2023
f319ab0
📜🤖 Added by blurb_it.
blurb-it[bot]Sep 15, 2023
6664c4c
Merge branch 'main' into gh-109461-update-logging-lock-acquisition
dcollisonSep 15, 2023
fd635b2
Updated to leave the existing API alone and added a new method _acqui…
dcollisonSep 15, 2023
749b678
Merge remote-tracking branch 'origin/gh-109461-update-logging-lock-ac…
dcollisonSep 15, 2023
e5ad43b
Updated acquireLock usages to acquireModuleLock
dcollisonSep 15, 2023
0a2bb5f
Removed unnecessary changes
dcollisonSep 15, 2023
ea33592
Merge branch 'main' into gh-109461-update-logging-lock-acquisition
dcollisonSep 15, 2023
af9f7d1
Merge branch 'main' into gh-109461-update-logging-lock-acquisition
dcollisonSep 15, 2023
4f2d1c1
Updated _acquireModuleLock() to _get_lock() which gets the lock's con…
dcollisonSep 16, 2023
dc7df1e
Merge remote-tracking branch 'origin/gh-109461-update-logging-lock-ac…
dcollisonSep 16, 2023
892a5cb
Updated comments
dcollisonSep 16, 2023
a30d5da
Merge branch 'main' into gh-109461-update-logging-lock-acquisition
dcollisonSep 16, 2023
cf7a2e6
Updated blurb
dcollisonSep 16, 2023
0a53f3b
Merge remote-tracking branch 'origin/gh-109461-update-logging-lock-ac…
dcollisonSep 16, 2023
2760cc5
Removed unused import
dcollisonSep 16, 2023
b5e6651
Merge branch 'main' into gh-109461-update-logging-lock-acquisition
dcollisonSep 18, 2023
7f3b28a
Updated __init__.py to remove _get_lock() and "if _lock" checks since…
dcollisonSep 21, 2023
09c9133
Changed "with logging._get_lock():" to "with logging._lock:"
dcollisonSep 21, 2023
9f3607e
Changed "with logging._get_lock()" to "with logging._lock:"
dcollisonSep 21, 2023
b15e4bf
Changed "with logging._get_lock():" to "with logging._lock:"
dcollisonSep 21, 2023
a0c50bf
Update __init__.py
dcollisonSep 21, 2023
9d0675b
Update Misc/NEWS.d/next/Library/2023-09-15-17-12-53.gh-issue-109461.V…
dcollisonSep 21, 2023
a298a7b
Update __init__.py
dcollisonSep 21, 2023
1b14732
Merge branch 'main' into gh-109461-update-logging-lock-acquisition
dcollisonSep 21, 2023
1979a75
Updated handlers to use a context manager for lock acquisition
dcollisonSep 21, 2023
3fd33ef
Updated handlers to use a context manager for lock acquisition
dcollisonSep 21, 2023
22c868e
Copying _lock to local variable
dcollisonSep 21, 2023
335f814
Updated another lock acquisition
dcollisonSep 21, 2023
afa79ef
Update Misc/NEWS.d/next/Library/2023-09-15-17-12-53.gh-issue-109461.V…
dcollisonSep 21, 2023
600a126
Merge branch 'main' into gh-109461-update-logging-lock-acquisition
dcollisonSep 21, 2023
5e92580
Someone managed to duplicate a line in the docstring
dcollisonSep 21, 2023
20e46f6
Merge remote-tracking branch 'origin/gh-109461-update-logging-lock-ac…
dcollisonSep 21, 2023
c73e2b7
Someone managed to duplicate a line in the docstring
dcollisonSep 21, 2023
a9472c7
Reverted Handler acquire() and release() as it actually needs the Non…
dcollisonSep 21, 2023
df75801
Merge branch 'main' into gh-109461-update-logging-lock-acquisition
dcollisonSep 21, 2023
bca5ae8
Added comment to _acquireLock() to justify the try-except block aroun…
dcollisonSep 22, 2023
1ba5979
Renamed "_acquireLock" to "_prepareFork" and "_releaseLock" to "_afte…
dcollisonSep 22, 2023
c1a9651
Merge branch 'main' into gh-109461-update-logging-lock-acquisition
dcollisonSep 22, 2023
efd7462
Merge branch 'main' into gh-109461-update-logging-lock-acquisition
dcollisonSep 22, 2023
797ae0d
Merge branch 'main' into gh-109461-update-logging-lock-acquisition
AA-TurnerSep 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Updated acquireLock usages to acquireModuleLock
  • Loading branch information
@dcollison
dcollison committedSep 15, 2023
commite5ad43b7fee87a0b1136dd6925d07aade55f7151
4 changes: 3 additions & 1 deletionLib/logging/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -260,6 +260,8 @@ def _acquireModuleLock():
try:
_acquireLock()
yield
except BaseException:
raise
finally:
_releaseLock()

Expand DownExpand Up@@ -892,7 +894,7 @@ def _removeHandlerRef(wr):
# set to None. It can also be called from another thread. So we need to
# pre-emptively grab the necessary globals and check if they're None,
# to prevent race conditions and failures during interpreter shutdown.
acquire, handlers =_acquireLock, _handlerList
acquire, handlers =_acquireModuleLock, _handlerList
if acquire and handlers:
with acquire():
try:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp