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 basestring (Py2) vs. str (Py3) #16064
Comments
Author: André Apitzsch |
Branch: u/aapitzsch/ticket/16064 |
Commit: |
New commits:
|
comment:3
Eyeballed and patchbotted ok. Just a naive question: wouldn't the |
Reviewer: Ralf Stephan |
comment:5
For unicode strings in Python 2.7 the change will not give the same result as before. See
As we want a single Python 2 / 3 code base I think this is not the right solution. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:11
I have a general question about Python3 tickets: would it not be better to simply use the |
comment:18
Made use of I haven't added |
Changed commit from |
Changed branch from u/aapitzsch/ticket/16064_2 to u/aapitzsch/16064_2 |
Commit: |
Dependencies: #18492 |
comment:21
The patch looks fine. Testing is OK. But in Can you base the patch on |
comment:24
Right at the beginning of test
Apparently the module |
comment:25
Apparently both |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:27
There is a new |
Changed reviewer from Ralf Stephan to Wilfried Luebbe |
comment:28
I did not think of a new All test passed. Looks good. |
comment:29
You were not satisfied with my part of the review, sir? |
Changed reviewer from Wilfried Luebbe to Ralf Stephan, Wilfried Luebbe |
comment:30
Replying to @rwst:
Sorry about that. |
Changed branch from u/aapitzsch/16064_2 to |
From the Python 2 documentation basestring():
This abstract type is the superclass for str and unicode. It cannot be called or instantiated, but it can be used to test whether an object is an instance of str or unicode. isinstance(obj, basestring) is equivalent to isinstance(obj, (str, unicode)).
New in version 2.3.
This is not available in Python 3.
The tool 2to3 changes
basestring
intostr
(the only string type in Py3).There are 27 effected modules.
This ticket is tracked as a dependency of meta-ticket ticket:16052.
Depends on #18492
Component: distribution
Author: André Apitzsch
Branch/Commit:
7e60f88
Reviewer: Ralf Stephan, Wilfried Luebbe
Issue created by migration from https://trac.sagemath.org/ticket/16064
The text was updated successfully, but these errors were encountered: