Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Conversation

danigm
Copy link

@danigm danigm commented Feb 6, 2025

This patch removes the override of createLock method so this class will use the default logging.Handler method.

The tests are failing for python 3.13 because in this version there's a direct usage of self.lock instead of calling self.acquire(): https://github.com/python/cpython/blob/3.13/Lib/logging/__init__.py#L1025-L1026

This patch removes the override of createLock method so this class will
use the default logging.Handler method.

The tests are failing for python 3.13 because in this version there's a
direct usage of self.lock instead of calling self.acquire():
https://github.com/python/cpython/blob/3.13/Lib/logging/__init__.py#L1025-L1026
Copy link

google-cla bot commented Feb 6, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@EpicWink
Copy link

To keep the current behaviour (of not synchronising handling), you instead may want to set lock to some new dummy value, which implements the threading.Lock interface. For Python 3.12 and below compatibility, you will need to implement __enter__, __exit__, acquire, release, _at_fork_reinit

This patch adds a DummyLock to do not synchronising handling, as
suggested in the comment:
census-instrumentation#1248 (comment)
@bjorn-einar-bjartnes-4ss

👍 We were affected by this, causing tests to fail at Python 3.13. I tried to add these changes to the package directly in the project, and then things works again. Any idea of when this will be officially released in the public package?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants