Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1706771 - Package python-pthreading for Python 3
Summary: Package python-pthreading for Python 3
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: ovirt-distribution
Classification: oVirt
Component: python-pthreading
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.4.0
: ---
Assignee: Gal Zaidman
QA Contact: Lukas Svaty
URL:
Whiteboard:
Depends On:
Blocks: 1706775
TreeView+ depends on / blocked
 
Reported: 2019-05-06 09:46 UTC by Sandro Bonazzola
Modified: 2019-05-06 13:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-06 13:16:13 UTC
oVirt Team: Integration
Embargoed:
sbonazzo: ovirt-4.4?


Attachments (Terms of Use)

Description Sandro Bonazzola 2019-05-06 09:46:57 UTC
python-pthreading is currently packaged for python 2 only.
Note that python-pthreading is included in Fedora distribution so once ready we'll need to open a bug there to rebase on the new version.

Comment 1 Gal Zaidman 2019-05-06 12:28:01 UTC
I think that we can close this as not a bug,
python-pthreading is basically used to override the python2 model threading.py
the problem that it fixes has been resolved in python3.

we need it only on python2, the only project that uses it is vdsm, and it uses it
only on python2, so there is no need to port it to python 3.

from the python-pthreading readme:
"""
Reimplement threading.Lock, RLock, and Condition with libpthread.

The pthreading module provides Lock, RLock, and Condition
synchronization objects compatible with Python native threading module.
The implementation, however, is based on POSIX thread library as
delivered by the libpthread. The provided objects are designed to be a
drop-in replacement for their respective threading counterpart.

Take a look at threading.py of Python 2. Notice that Condition.wait()
wakes 20 times a second and checks if the event has been set. This CPU
hogging has been fixed in Python 3, but is not expected to change during
Python 2 lifetime.
"""

from vdsm code:
"""
# When using Python 2, we must monkey patch threading module before importing
# any other module.
if sys.version_info[0] == 2:
    import pthreading
    pthreading.monkey_patch()
...
import threading
...
"""

Comment 2 Gal Zaidman 2019-05-06 13:16:13 UTC
After consulting with Dan and Sandro, we decided that this is not a bug, from the reason in comment 1

Comment 3 Gal Zaidman 2019-05-06 13:16:22 UTC
After consulting with Dan and Sandro, we decided that this is not a bug, from the reason in comment 1


Note You need to log in before you can comment on or make changes to this bug.