Bug 1738099 - python-pyobd depends on Python 2
Summary: python-pyobd depends on Python 2
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pyobd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F31_PY2REMOVAL
TreeView+ depends on / blocked
 
Reported: 2019-08-06 13:02 UTC by Lumír Balhar
Modified: 2019-10-21 11:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Lumír Balhar 2019-08-06 13:02:57 UTC
Python 2.7 will reach end-of-life in January 2020, over 9 years after it was released. This falls within the Fedora 31 lifetime.
Packages that depend on Python 2 are being switched to Python 3 or removed from Fedora: https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages
Python 2 will be retired in Fedora 32: https://fedoraproject.org/wiki/Changes/RetirePython2

To help planning, we'd like to know the plans for python-pyobd's future. Specifically:


- What is the reason for the Python2 dependency? (Is it software written in Python, or does it just provide Python bindings, or use Python in the build system or test runner?) 

- What are the upstream/community plans/timelines regarding Python 3?

- What is the guidance for porting to Python 3? (Assuming that there is someone who generally knows how to port to Python 3, but doesn't know anything about the particular package, what are the next steps to take?)


This bug is filed semi-automatically, and might not have all the context specific to python-pyobd.
If you need anything from us, or something is unclear, please mention it here.

Thank you.

Comment 1 Ben Cotton 2019-08-13 17:05:55 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 2 Ben Cotton 2019-08-13 17:44:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 3 Lumír Balhar 2019-08-15 06:53:55 UTC
Please answer the above questions. If you don't, the package can be orphaned: https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages

If you need any information or help, or if you need some more time, please let us know.

Comment 4 Lumír Balhar 2019-08-22 07:08:22 UTC
Please answer the above questions. If you don't, the package can be orphaned: https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages

If you need any information or help, or if you need some more time, please let us know.

Comment 5 Lumír Balhar 2019-08-29 05:25:31 UTC
Please answer the above questions. If you don't, the package can be orphaned: https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages

If you need any information or help, or if you need some more time, please let us know.

Comment 6 Miro Hrončok 2019-09-05 10:41:52 UTC
According to the procedure described in https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages the package was now orphaned. If you think it was a mistake, you can provide the answers and claim the package back.

Let us know if you need any help or just need more time.

Comment 7 Jaroslav Škarvada 2019-09-05 13:08:50 UTC
Please unorphan.

- What is the reason for the Python2 dependency? (Is it software written in Python, or does it just provide Python bindings, or use Python in the build system or test runner?) 
It's SW written in python.

- What are the upstream/community plans/timelines regarding Python 3?
It seems the upstream is not going to port it themselves, but it's useful piece of SW and I am going to port it myself.

- What is the guidance for porting to Python 3? (Assuming that there is someone who generally knows how to port to Python 3, but doesn't know anything about the particular package, what are the next steps to take?)
I think I could do it, but please note I am just leaving for two weeks vacation.

Comment 8 Lumír Balhar 2019-10-18 06:35:44 UTC
I've tried to port this application to Python 3 but it's hard for me to test it because I have no access to OBD-compatible device. Nonetheless, I've created a github repository [0] from the current Fedora sources so we can cooperate on this. With my changes, the application seems to be generally functional, all windows work, serial port scan works, all DeprecationWarnings are gone, the configuration is properly saved and loaded, etc.

Let me know if I can help you more.

[0] https://github.com/frenzymadness/pyOBD

Comment 9 Jaroslav Škarvada 2019-10-18 09:39:39 UTC
(In reply to Lumír Balhar from comment #8)
> I've tried to port this application to Python 3 but it's hard for me to test
> it because I have no access to OBD-compatible device. Nonetheless, I've
> created a github repository [0] from the current Fedora sources so we can
> cooperate on this. With my changes, the application seems to be generally
> functional, all windows work, serial port scan works, all
> DeprecationWarnings are gone, the configuration is properly saved and
> loaded, etc.
> 
> Let me know if I can help you more.
> 
> [0] https://github.com/frenzymadness/pyOBD

Really thanks for it, it saved me time :) I am going to test it during weekend on real HW. Will you send your patches upstream?

Comment 10 Jaroslav Škarvada 2019-10-18 16:01:48 UTC
(In reply to Jaroslav Škarvada from comment #9)
> (In reply to Lumír Balhar from comment #8)
> > I've tried to port this application to Python 3 but it's hard for me to test
> > it because I have no access to OBD-compatible device. Nonetheless, I've
> > created a github repository [0] from the current Fedora sources so we can
> > cooperate on this. With my changes, the application seems to be generally
> > functional, all windows work, serial port scan works, all
> > DeprecationWarnings are gone, the configuration is properly saved and
> > loaded, etc.
> > 
> > Let me know if I can help you more.
> > 
> > [0] https://github.com/frenzymadness/pyOBD
> 
> Really thanks for it, it saved me time :) I am going to test it during
> weekend on real HW. Will you send your patches upstream?

It doesn't work, when the connection is initiated, it tracebacks:
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "./pyobd", line 154, in run
    self.initCommunication()
  File "./pyobd", line 130, in initCommunication
    self.port     = obd_io.OBDPort(self.portName,self._notify_window,self.SERTIMEOUT,self.RECONNATTEMPTS)
  File "/var/tmp/pyOBD/obd_io.py", line 103, in __init__
    self.send_command("atz")   # initialize
  File "/var/tmp/pyOBD/obd_io.py", line 146, in send_command
    self.port.write(c)
  File "/usr/lib/python3.7/site-packages/serial/serialposix.py", line 532, in write
    d = to_bytes(data)
  File "/usr/lib/python3.7/site-packages/serial/serialutil.py", line 63, in to_bytes
    raise TypeError('unicode strings are not supported, please encode to bytes: {!r}'.format(seq))
TypeError: unicode strings are not supported, please encode to bytes: 'a'

Comment 11 Lumír Balhar 2019-10-21 11:55:19 UTC
Well, without special hardware I am not able to reproduce and fix more issues.

Do you have some plans to finish the porting?


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