-
Notifications
You must be signed in to change notification settings - Fork 153
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
Update urllib.request to be the preferred urllib #428
Update urllib.request to be the preferred urllib #428
Conversation
I think we can drop any notion of supporting python 2 - we'll only backport fixes like this if absolutely needed. I assume with that, we can ignore any need for urllib2?
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: DC Slagel <notifications@github.com>
Sent: Wednesday, March 10, 2021 4:12:08 PM
To: kinverarity1/lasio <lasio@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: [kinverarity1/lasio] Update urllib.request to be the preferred urllib (#428)
Description
This pull-request attempts to resolve the problem described in issue #426<https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkinverarity1%2Flasio%2Fissues%2F426&data=04%7C01%7C%7C5560626d2f484186ae2f08d8e3873f0a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637509517299569782%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZvbvYrlx36h5sdisFb2wUpmiLnqr7jseVJdL9JYkZcw%3D&reserved=0> "Have an issue with urllib2 when using the lasio package". It changes the import order for urllib.request and urllib2 so that urllib.request is tried first. urllib.request is recommended for python3, urllib2 is no-longer updated for python3.
I left urllib2 in as a fallback for python2 support even though Lasio no-longer supports python2. Let me know if it should be removed now and I'll make the update to this pull-request.
Test Notes:
The test results are the same before and after the code change:
Name Stmts Miss Cover
----------------------------------------------
lasio/__init__.py 13 2 85%
lasio/convert_version.py 20 20 0%
lasio/defaults.py 11 0 100%
lasio/examples.py 42 10 76%
lasio/excel.py 88 34 61%
lasio/exceptions.py 6 0 100%
lasio/las.py 407 59 86%
lasio/las_items.py 199 31 84%
lasio/las_version.py 50 14 72%
lasio/reader.py 406 32 92%
lasio/writer.py 175 10 94%
----------------------------------------------
TOTAL 1417 212 85%
Let me know if this change could be accepted (or rejected) or
needs some additional changes to be approved and merged.
Thank you,
DC
________________________________
You can view, comment on, or merge this pull request online at:
#428<https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkinverarity1%2Flasio%2Fpull%2F428&data=04%7C01%7C%7C5560626d2f484186ae2f08d8e3873f0a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637509517299569782%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=HY%2FE6vw9P5%2FVu%2FGF%2FgGEi0jiZdnw9Qu7NvsoodKXkpY%3D&reserved=0>
Commit Summary
* Update urllib.request to be the preferred urllib
File Changes
* M lasio/reader.py<https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkinverarity1%2Flasio%2Fpull%2F428%2Ffiles%23diff-40002138d0bde09d483e0a01f32ee2b683892761150df48d4567524dda229052&data=04%7C01%7C%7C5560626d2f484186ae2f08d8e3873f0a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637509517299579742%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=rdy%2F3h5QvRIPo503DzIkV3RZPVLumXQ9cIhHb71qfZ4%3D&reserved=0> (27)
Patch Links:
* #428.patch<https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkinverarity1%2Flasio%2Fpull%2F428.patch&data=04%7C01%7C%7C5560626d2f484186ae2f08d8e3873f0a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637509517299579742%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wY2N%2F5QdkL4vp%2FOK9ZRzGTDCx4Sh4OvHt9NCaZu%2FqU8%3D&reserved=0>
* #428.diff<https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkinverarity1%2Flasio%2Fpull%2F428.diff&data=04%7C01%7C%7C5560626d2f484186ae2f08d8e3873f0a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637509517299589697%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=OPMiVKMCkM30spJ3NP3jv5o%2FzYXlo8of8lqVk5SZKMY%3D&reserved=0>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkinverarity1%2Flasio%2Fpull%2F428&data=04%7C01%7C%7C5560626d2f484186ae2f08d8e3873f0a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637509517299589697%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=0EC%2F9jzb7rwArzS5ZkpvdjfpI%2F37RXS4QN9%2FCa1jX8I%3D&reserved=0>, or unsubscribe<https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABCQ62YBNBRADRQQLQ2AKBDTC32CBANCNFSM4Y5HCZDA&data=04%7C01%7C%7C5560626d2f484186ae2f08d8e3873f0a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637509517299589697%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=opik2LxPN4heAp6QDxZg04VBxqBynGpK%2FcIL1Y%2BwkVk%3D&reserved=0>.
|
Okay, Per @kinverarity1's response, I've removed urllib2 python2 support. In addition, Test coverage for reader.py changes to less statements and higher coverage because the urllib2 section is removed:
Let me know if this change could be accepted (or rejected) or Thank you, |
Thank you |
Description
This pull-request attempts to resolve the problem described in issue #426 "Have an issue with urllib2 when using the lasio package". It changes the import order for urllib.request and urllib2 so that urllib.request is tried first. urllib.request is recommended for python3, urllib2 is no-longer updated for python3.
I left urllib2 in as a fallback for python2 support even though Lasio no-longer supports python2. Let me know if it should be removed now and I'll make the update to this pull-request.
Test Notes:
The test results are the same before and after the code change:
Let me know if this change could be accepted (or rejected) or
needs some additional changes to be approved and merged.
Thank you,
DC