Skip to content

fix import with Python 3 for easybuild.tools.* modules and easybuild.main#2719

Merged
wpoely86 merged 10 commits intoeasybuilders:4.xfrom
boegel:py3_easybuild_tools
Jan 14, 2019
Merged

fix import with Python 3 for easybuild.tools.* modules and easybuild.main#2719
wpoely86 merged 10 commits intoeasybuilders:4.xfrom
boegel:py3_easybuild_tools

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Jan 13, 2019

No description provided.

@boegel boegel added the python3 Python 3 compatibility label Jan 13, 2019
@boegel boegel added this to the 4.0 milestone Jan 13, 2019
@boegel boegel requested a review from wpoely86 January 13, 2019 18:33
# method definition as it is in logging, can't change this
# pylint: disable=unused-argument
def makeRecord(self, name, level, pathname, lineno, msg, args, excinfo, func=None, extra=None):
def makeRecord(self, name, level, pathname, lineno, msg, args, excinfo, func=None, extra=None, sinfo=None):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some documentation on the arguments wouldn't go amiss

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I agree, but the Python documentation itself is rather light on this too...

This is only used internally in fancylogger, I'd rather not spend too much time on this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url_fd = urllib2.urlopen(url_req, timeout=timeout)
if used_urllib is std_urllib:
# urllib2 (Python 2) / urllib.request (Python 3) does the right thing for http proxy setups,
# urllib does not!
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still relevant? Do we use urllib anywhere?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but we used to, and I guess the comment serves as a reminder why we use urllib2 rather than urllib, doesn't hurt to keep it there imho.

@wpoely86 wpoely86 merged commit 4163371 into easybuilders:4.x Jan 14, 2019
@boegel boegel deleted the py3_easybuild_tools branch January 14, 2019 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python3 Python 3 compatibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants