Skip to content
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

Python 3 preparation: Handle the renaming of "urllib" and "urllib2" #16080

Closed
wluebbe mannequin opened this issue Apr 7, 2014 · 23 comments
Closed

Python 3 preparation: Handle the renaming of "urllib" and "urllib2" #16080

wluebbe mannequin opened this issue Apr 7, 2014 · 23 comments

Comments

@wluebbe
Copy link
Mannequin

wluebbe mannequin commented Apr 7, 2014

The tool 2to3 changes the respective import statements to the new Py3 names.

But the code has to depend on the Python version!

There are 16 effected modules.

This ticket is tracked as a dependency of meta-ticket ticket:16052.

Component: distribution

Author: Frédéric Chapoton

Branch/Commit: 3098f5f

Reviewer: Volker Braun, R. Andrew Ohana

Issue created by migration from https://trac.sagemath.org/ticket/16080

@wluebbe wluebbe mannequin added this to the sage-6.2 milestone Apr 7, 2014
@wluebbe wluebbe mannequin added c: distribution labels Apr 7, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@fchapoton
Copy link
Contributor

Branch: public/16080

@fchapoton
Copy link
Contributor

Commit: c9f3a98

@fchapoton
Copy link
Contributor

New commits:

c9f3a98trac #16080 changing imports of urllib,urrlib2,urlparse for py3 compatibility

@fchapoton
Copy link
Contributor

Author: Frédéric Chapoton

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 15, 2015

Changed commit from c9f3a98 to ab05e06

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 15, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

ab05e06trac #16080 correct one doctest

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 15, 2015

Changed commit from ab05e06 to 3ac77d3

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 15, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

3ac77d3trac #16080 move back 3 imports inside functions

@ohanar
Copy link
Member

ohanar commented Nov 16, 2015

comment:6

Could you use six.moves.urllib instead? We already include six as a standard package, so it is fine to use it.

@vbraun
Copy link
Member

vbraun commented Nov 16, 2015

comment:7

+1 to six.moves.urlib. Rest is great!

@fchapoton
Copy link
Contributor

comment:8

I was using this page

http://python3porting.com/stdlib.html

as a reference, and it says that six could not handle urllib. Maybe this is outdated ?

Do we really gain something by using six instead of the "try except" ? In other words, do you really want me to spend more time on that ? I may have other things to do.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 16, 2015

Changed commit from 3ac77d3 to 99699f6

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 16, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

99699f6trac #16080 now redone using six.moves

@vbraun
Copy link
Member

vbraun commented Nov 16, 2015

Reviewer: Volker Braun, R. Andrew Ohana

@vbraun
Copy link
Member

vbraun commented Nov 16, 2015

comment:11

merge conflict, probably with #19296

@fchapoton
Copy link
Contributor

comment:12

This does not work. Some imports have to be modified. Work in progress.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 17, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

f848c3btrac #16080 correcting some imports

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 17, 2015

Changed commit from 99699f6 to f848c3b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 23, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

3098f5fMerge branch 'public/16080' into 6.10.b5

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 23, 2015

Changed commit from f848c3b to 3098f5f

@fchapoton
Copy link
Contributor

comment:15

Better wait for the bot's green light before setting back to positive review.

@fchapoton
Copy link
Contributor

comment:16

ok, seems to be good to go. Volker, do you approve ?

@vbraun
Copy link
Member

vbraun commented Nov 24, 2015

Changed branch from public/16080 to 3098f5f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants