Hi!
Some of my Python code which was running without any issue fails miserably with F34. Python is now version 3.9, I found some building bugs for 1 of the libraries which has been fixed earlier this year.
Namely I have issue with urllib3 and pexpect. Where should I ask about it? I feel this list is not really about Python issues, and that code was working fine with Python 3.8.
Thank you.
Fred
On 05/07/2021 12:53, Frederic Muller wrote:
Hi!
Some of my Python code which was running without any issue fails miserably with F34. Python is now version 3.9, I found some building bugs for 1 of the libraries which has been fixed earlier this year.
Namely I have issue with urllib3 and pexpect. Where should I ask about it? I feel this list is not really about Python issues, and that code was working fine with Python 3.8.
Thank you.
You may want to ask on the
devel mailing list -- devel@lists.fedoraproject.org
at least that would be my first inclination
On 7/5/21 12:35 PM, Ed Greshko wrote:
On 05/07/2021 12:53, Frederic Muller wrote:
Hi!
Some of my Python code which was running without any issue fails miserably with F34. Python is now version 3.9, I found some building bugs for 1 of the libraries which has been fixed earlier this year.
Namely I have issue with urllib3 and pexpect. Where should I ask about it? I feel this list is not really about Python issues, and that code was working fine with Python 3.8.
Thank you.
You may want to ask on the
devel mailing list -- devel@lists.fedoraproject.org
at least that would be my first inclination
Thank you very much. I'll try that.
Fred
On Mon, 5 Jul 2021 11:53:46 +0700 Frederic Muller fred@cm17.com wrote:
Some of my Python code which was running without any issue fails miserably with F34. Python is now version 3.9, I found some building bugs for 1 of the libraries which has been fixed earlier this year.
Namely I have issue with urllib3 and pexpect. Where should I ask about it? I feel this list is not really about Python issues, and that code was working fine with Python 3.8.
The best place to look for these things is at python.org. A quick search found this page with changes from 3.8 to 3.9.
https://docs.python.org/3/whatsnew/3.9.html
It has this to say about urllib.
urllib.parse
Earlier Python versions allowed using both ; and & as query parameter separators in urllib.parse.parse_qs() and urllib.parse.parse_qsl(). Due to security concerns, and to conform with newer W3C recommendations, this has been changed to allow only a single separator key, with & as the default. This change also affects cgi.parse() and cgi.parse_multipart() as they use the affected functions internally. For more details, please see their respective documentation. (Contributed by Adam Goldschmidt, Senthil Kumaran and Ken Jin in bpo-42967.)
It has nothing to say about pexpect. So, pexpect is not a python provided program, and probably uses something on that page internally that has changed.
On 7/5/21 8:50 PM, stan via users wrote:
On Mon, 5 Jul 2021 11:53:46 +0700 Frederic Muller fred@cm17.com wrote:
Some of my Python code which was running without any issue fails miserably with F34. Python is now version 3.9, I found some building bugs for 1 of the libraries which has been fixed earlier this year.
Namely I have issue with urllib3 and pexpect. Where should I ask about it? I feel this list is not really about Python issues, and that code was working fine with Python 3.8.
The best place to look for these things is at python.org. A quick search found this page with changes from 3.8 to 3.9.
https://docs.python.org/3/whatsnew/3.9.html
It has this to say about urllib.
urllib.parse
Earlier Python versions allowed using both ; and & as query parameter separators in urllib.parse.parse_qs() and urllib.parse.parse_qsl(). Due to security concerns, and to conform with newer W3C recommendations, this has been changed to allow only a single separator key, with & as the default. This change also affects cgi.parse() and cgi.parse_multipart() as they use the affected functions internally. For more details, please see their respective documentation. (Contributed by Adam Goldschmidt, Senthil Kumaran and Ken Jin in bpo-42967.)
It has nothing to say about pexpect. So, pexpect is not a python provided program, and probably uses something on that page internally that has changed. _______________________________________________
Hi and thank you!
Actually Felix from the devel list 'smelled' the issue right away: I install libraries through pip without a virtual environment. I should either used rpm packages or create venv and use pip for that environment.
He even told me how to clean up everything and get running.
As an addon, the pexcept issue which was there right before my email to the list, fixed itself when I emailed devel and want to write the exact error message. So go figure!
Anyway I learned something and I guess I am a better(?) Python programmer now ;-)
Thank you all for helping.
Fred
On 5 Jul 2021, at 15:07, Frederic Muller fred@cm17.com wrote:
On 7/5/21 8:50 PM, stan via users wrote:
On Mon, 5 Jul 2021 11:53:46 +0700 Frederic Muller fred@cm17.com wrote:
Some of my Python code which was running without any issue fails miserably with F34. Python is now version 3.9, I found some building bugs for 1 of the libraries which has been fixed earlier this year.
Namely I have issue with urllib3 and pexpect. Where should I ask about it? I feel this list is not really about Python issues, and that code was working fine with Python 3.8.
The best place to look for these things is at python.org. A quick search found this page with changes from 3.8 to 3.9.
https://docs.python.org/3/whatsnew/3.9.html
It has this to say about urllib.
urllib.parse
Earlier Python versions allowed using both ; and & as query parameter separators in urllib.parse.parse_qs() and urllib.parse.parse_qsl(). Due to security concerns, and to conform with newer W3C recommendations, this has been changed to allow only a single separator key, with & as the default. This change also affects cgi.parse() and cgi.parse_multipart() as they use the affected functions internally. For more details, please see their respective documentation. (Contributed by Adam Goldschmidt, Senthil Kumaran and Ken Jin in bpo-42967.)
It has nothing to say about pexpect. So, pexpect is not a python provided program, and probably uses something on that page internally that has changed. _______________________________________________
Hi and thank you!
Actually Felix from the devel list 'smelled' the issue right away: I install libraries through pip without a virtual environment. I should either used rpm packages or create venv and use pip for that environment.
It’s fine to install packages with pip install —user. Use of venv is very useful, but not mandatory.
Barry
He even told me how to clean up everything and get running.
As an addon, the pexcept issue which was there right before my email to the list, fixed itself when I emailed devel and want to write the exact error message. So go figure!
Anyway I learned something and I guess I am a better(?) Python programmer now ;-)
Thank you all for helping.
Fred _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
On 7/6/21 3:34 AM, Barry wrote:
Hi and thank you!
Actually Felix from the devel list 'smelled' the issue right away: I install libraries through pip without a virtual environment. I should either used rpm packages or create venv and use pip for that environment.
It’s fine to install packages with pip install —user. Use of venv is very useful, but not mandatory.
Barry
Actually it's not. That's what I do all the time. Rather than copying the explanation, I'll point whoever is interested into the explanations and the resolution *it seems to be a very common problem users are facing apparently*: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/...
Thank you all for the help.
Fred
On Mon, 5 Jul 2021 at 23:37, Frederic Muller fred@cm17.com wrote:
On 7/6/21 3:34 AM, Barry wrote:
Hi and thank you!
Actually Felix from the devel list 'smelled' the issue right away: I install libraries through pip without a virtual environment. I should either used rpm packages or create venv and use pip for that environment.
It’s fine to install packages with pip install —user. Use of venv is very useful, but not mandatory.
Barry
Actually it's not. That's what I do all the time. Rather than copying the explanation, I'll point whoever is interested into the explanations and the resolution *it seems to be a very common problem users are facing apparently*:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/...
Thank you all for the help.
Thanks for the followup. I use a NASA command-line batch processing package that just came out with a new version. They replaced most of the shell scripts with python, which has been generating problem reports, many related to "requests", so it is indeed a very common problem.
Too many linux users are doing "sudo pip install ...". I'm beginning to think Google should downgrade search hits that contain "sudo" and also add a "potentially unsafe" warning to such links.
On 6 Jul 2021, at 03:38, Frederic Muller fred@cm17.com wrote:
On 7/6/21 3:34 AM, Barry wrote:
Hi and thank you!
Actually Felix from the devel list 'smelled' the issue right away: I install libraries through pip without a virtual environment. I should either used rpm packages or create venv and use pip for that environment.
It’s fine to install packages with pip install —user. Use of venv is very useful, but not mandatory.
Barry
Actually it's not. That's what I do all the time. Rather than copying the explanation, I'll point whoever is interested into the explanations and the resolution *it seems to be a very common problem users are facing apparently*: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/...
I read all of the thread, i am on the dev list.
It told you to never install into the fedora system python directories, which it appears you did. It did not tell you that installing the user dirs will break fedora.
Barry
Thank you all for the help.
Fred _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Barry wrote:
On 6 Jul 2021, at 03:38, Frederic Muller fred@cm17.com wrote:
On 7/6/21 3:34 AM, Barry wrote:
[...]
It’s fine to install packages with pip install —user. Use of venv is very useful, but not mandatory.
Actually it's not. That's what I do all the time. Rather than copying the explanation, I'll point whoever is interested into the explanations and the resolution *it seems to be a very common problem users are facing apparently*: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/...
I read all of the thread, i am on the dev list.
It told you to never install into the fedora system python directories, which it appears you did. It did not tell you that installing the user dirs will break fedora.
Doing so can still interact badly with the system python modules.
While it's better to limit that to just one user rather than the whole system, it doesn't really help when the user who's got an odd python problem is your own. :)
I think it's entirely reasonable advice to generally recommend using venv if you're using pip. Personally, I'd package anything I needed before I'd ever use pip install.
Can you get away with not doing so in every case? Sure. But you have to know what those cases are. So it's not good general advice to suggest you shouldn't bother with using venv, IMO.
On 6 Jul 2021, at 18:35, Todd Zullinger tmz@pobox.com wrote:
Barry wrote:
On 6 Jul 2021, at 03:38, Frederic Muller fred@cm17.com wrote:
On 7/6/21 3:34 AM, Barry wrote:
[...]
It’s fine to install packages with pip install —user. Use of venv is very useful, but not mandatory.
Actually it's not. That's what I do all the time. Rather than copying the explanation, I'll point whoever is interested into the explanations and the resolution *it seems to be a very common problem users are facing apparently*: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/...
I read all of the thread, i am on the dev list.
It told you to never install into the fedora system python directories, which it appears you did. It did not tell you that installing the user dirs will break fedora.
Doing so can still interact badly with the system python modules.
Do you have an example of this? I'm sure it is possible, but I've not seen this personally.
The only case I know of where a venv is a must is when you want to use conflicting sets of pip installed packages for different apps.
If the set of packages do not conflict I have never seen pip install -user fail. I'd love to know of a case that does fail and investigate it.
While it's better to limit that to just one user rather than the whole system, it doesn't really help when the user who's got an odd python problem is your own. :)
If you pip install into the system then you will very likely break something important.
I think it's entirely reasonable advice to generally recommend using venv if you're using pip. Personally, I'd package anything I needed before I'd ever use pip install.
I agree and even said so.
Can you get away with not doing so in every case? Sure. But you have to know what those cases are. So it's not good general advice to suggest you shouldn't bother with using venv, IMO.
Barry
-- Todd _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Hi,
Barry Scott wrote:
On 6 Jul 2021, at 18:35, Todd Zullinger tmz@pobox.com wrote: Doing so can still interact badly with the system python modules.
Do you have an example of this? I'm sure it is possible, but I've not seen this personally.
Not specific (as I don't use pip). But if you install a new/different version of some module via pip and use it in your code, it then works for you and breaks when you run the code as another user. Things like that were what I intended by "interact badly."
Depending on your use, that's a feature and not a bug. It's fine if you know about the potential pitfall. I figure the folks who know those well will know when they can ignore the general advice to isolate their use of pip from the packaged bits.
And, of course, the folks on the Fedora Python team (and others) have been working to improve the way in which pip and system modules interact, so some of these potential pitfalls are less than they used to be (or will be so, eventually).
The only case I know of where a venv is a must is when you want to use conflicting sets of pip installed packages for different apps.
If the set of packages do not conflict I have never seen pip install -user fail. I'd love to know of a case that does fail and investigate it.
Indeed, I didn't intend to suggest it would fail. It just doesn't always lead to a great experience for users who aren't aware of the ways things might interact between modules in ~/.local and site-packages.
Hopefully that helps clarify what I meant a bit better.
Thanks,