-
Notifications
You must be signed in to change notification settings - Fork 96
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
Fixes for Python 3.8 #182
Fixes for Python 3.8 #182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address the failing CI - one of the existing test fails due to some change in behavior it seems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw CI is still failing for the same reason as before.
This should be fine now, can you have another look? |
The fact that changing the import order breaks the test is a problem because that means the behavior of |
I'm not sure what you are talking about, on Ubuntu 18 I get |
I tried the |
with python-distro 1.0.1-2 |
I use the latest version of And call the function (the same way as in this patch): |
looks like that's unstable anyhow, for example in Debian I get:
|
I split out the Python 3.8 specific fixes for the new SyntaxWarnings and added Python 3.7/3.8 CI: see #183 I am going to rebase this one after that PR has been merged. |
Also only depend on python3-distro if python3 doesn't provide the platform module (i.e. starting with version 3.8).
9067f69
to
0bc639b
Compare
I also replaced |
f921ef3
to
88795e1
Compare
88795e1
to
017549e
Compare
With all the back and forth and debugging I felt the need to rewrite one more time. Beside the original rebased commits I only applied two necessary fixes:
I don't see any evidence of a case mismatch on Travis so I won't change the matching logic from case sensitive to insensitive for now. @jspricke It would be great if you could take another look and comment if that looks good to you, too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least the modules have the same API. This seems good to me.
I double checked that we're not breaking users from source/pip and they get the distro module backported so the install_requires not being conditional is ok.
@dirk-thomas afaik your two commits change nothing as the platform module is part of Python up to 3.8, so the import will always prefer the platform module when it's available. Starting with 3.8 it will switch to the distro module, but in 3.8 |
Thanks. |
This caused #185. |
AFAICT, this is causing CI to fail here: ros-infrastructure/rosdep#735 Although the platform module is available in Python 3.8, rospkg/src/rospkg/os_detect.py Lines 140 to 145 in 2c027b1
|
Also, Test output
|
Have you seen the comment above ("This caused #185.") as well as the related fix from #186?
Do you have the Python package |
Yes,
I'm not on osx, so maybe it's expected? In any case, if I install
Upper case "Ubuntu" doesn't work either. Here's the Dockerfile I used to produce. |
rospkg/test/os_detect/osx/sw_vers Lines 1 to 3 in fc3f2b8
|
No description provided.