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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #223: Fix threading monkey-patching on py3.4 #224

Merged
merged 1 commit into from Apr 9, 2015

Conversation

Projects
None yet
2 participants
@vstinner
Contributor

vstinner commented Apr 9, 2015

Fix the monkey-patching of the threading module on Python 3.4. Instead
of removing the thread state lock, patch the _bootstrap_inner() method
to release it.

@vstinner

This comment has been minimized.

Show comment
Hide comment
@vstinner

vstinner Apr 9, 2015

Contributor

I replaced the assertion with an if to be more safe.

Contributor

vstinner commented Apr 9, 2015

I replaced the assertion with an if to be more safe.

@temoto

View changes

Show outdated Hide outdated tests/patcher_test.py
def test_threading_join():
tests.run_isolated('patched_threading_join.py')

This comment has been minimized.

@temoto

temoto Apr 9, 2015

Member

Small typo "patcher_...", after module name. It's not a blocker for merge, I'm just bringing it to attention.

@temoto

temoto Apr 9, 2015

Member

Small typo "patcher_...", after module name. It's not a blocker for merge, I'm just bringing it to attention.

This comment has been minimized.

@vstinner

vstinner Apr 9, 2015

Contributor

It's now fixed.

@vstinner

vstinner Apr 9, 2015

Contributor

It's now fixed.

Issue #223: Fix threading monkey-patching on py3.4
Fix the monkey-patching of the threading module on Python 3.4. Instead
of removing the thread state lock, patch the _bootstrap_inner() method
to release it.
@temoto

This comment has been minimized.

Show comment
Hide comment
@temoto

temoto Apr 9, 2015

Member

Just curious, what assertion?

Member

temoto commented Apr 9, 2015

Just curious, what assertion?

@vstinner

This comment has been minimized.

Show comment
Hide comment
@vstinner

vstinner Apr 9, 2015

Contributor

Just curious, what assertion?

In wrap_bootstrap_inner(), I wrote "assert thread._tstate_lock is not None". But I replaced it with an if, because it looks like the lock can be None in some corner cases. Now the code should work in all cases ;-)

Contributor

vstinner commented Apr 9, 2015

Just curious, what assertion?

In wrap_bootstrap_inner(), I wrote "assert thread._tstate_lock is not None". But I replaced it with an if, because it looks like the lock can be None in some corner cases. Now the code should work in all cases ;-)

@temoto temoto merged commit 2e81481 into eventlet:master Apr 9, 2015

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
@temoto

This comment has been minimized.

Show comment
Hide comment
@temoto

temoto Apr 9, 2015

Member

Merged. Thanks for quick bug report and fix. More thanks for rebasing, it was a pleasure to handle this.

Member

temoto commented Apr 9, 2015

Merged. Thanks for quick bug report and fix. More thanks for rebasing, it was a pleasure to handle this.

@temoto temoto added this to the v0.18 milestone Apr 9, 2015

@temoto temoto modified the milestones: v0.17.3 bug fix release, v0.18 Apr 9, 2015

@vstinner

This comment has been minimized.

Show comment
Hide comment
@vstinner

vstinner Apr 9, 2015

Contributor

Merged. Thanks for quick bug report and fix. More thanks for rebasing, it was a pleasure to handle this.

Wow, this merge was really fast! Thanks for the quick review.

Now, would it be possible to release eventlet with this change? It would help OpenStack a lot to port the project to Python 3. Currenctly, eventlet blocks porting most OpenStack applications to Python 3 because it doesn't (fully) work on Python 3 (with monkey-patching).

Contributor

vstinner commented Apr 9, 2015

Merged. Thanks for quick bug report and fix. More thanks for rebasing, it was a pleasure to handle this.

Wow, this merge was really fast! Thanks for the quick review.

Now, would it be possible to release eventlet with this change? It would help OpenStack a lot to port the project to Python 3. Currenctly, eventlet blocks porting most OpenStack applications to Python 3 because it doesn't (fully) work on Python 3 (with monkey-patching).

@vstinner vstinner deleted the vstinner:threading_join branch Apr 9, 2015

@temoto

This comment has been minimized.

Show comment
Hide comment
@temoto

temoto Apr 9, 2015

Member

Yup, I just released v0.17.3 https://pypi.python.org/pypi/eventlet/0.17.3
Thanks for contributions!

Member

temoto commented Apr 9, 2015

Yup, I just released v0.17.3 https://pypi.python.org/pypi/eventlet/0.17.3
Thanks for contributions!

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