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 and unicode #4

Closed
wants to merge 2 commits into from
Closed

Python 3 and unicode #4

wants to merge 2 commits into from

Conversation

wrightmx
Copy link

@wrightmx wrightmx commented Apr 7, 2013

Fix problem where the unicode function does not exist in python 3.

Also, fixed a problem with running tests on mac os x (see Stack Overflow).

@seckenrode
Copy link

unipath is currently broken in python 3 due to this, is there any update in merging this into master? Thanks.

Python 3.3.2 (default, Jul 27 2013, 09:56:45)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import unipath
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<basepath>/lib/python3.3/site-packages/unipath/__init__.py", line 4, in <module>
    from unipath.abstractpath import AbstractPath
  File "<basepath>/lib/python3.3/site-packages/unipath/abstractpath.py", line 11, in <module>
    _base = os.path.supports_unicode_filenames and unicode or str
NameError: name 'unicode' is not defined

@jonathan-s
Copy link

@mikeorr It would be great if you merged this pull request and made it available to others through PyPi

@njones11
Copy link

I'm also being affected this. Would love to use Unipath!

@Xowap
Copy link

Xowap commented Nov 12, 2014

Okay, this situation is really weird: I have a Linux with Python 3.4.1, and Unipath works like a charm. On the other hand, I have a MacOS X with Python 3.4.2 (from brew) and I get the same issue as you guys do.

When I try things in the terminal, here is what happens:

% python3.4                                                                                                                                                                  
Python 3.4.1 (default, Jul 26 2014, 13:46:45) 
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> _base = os.path.supports_unicode_filenames and unicode or str
>>> print(_base)
<class 'str'>

And the weirdest thing is that PyCharm will not give me an error on my Linux computer but will detect it on the MacOS X computer.

Does anyone have a clue where this would come from?

@mikeorr
Copy link
Owner

mikeorr commented Jan 5, 2015

Fixed MacOSX temp dir in a68006f.
Fixed Unicode issue in 5f5df5f. Details in issue 16.

@mikeorr mikeorr closed this Jan 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants