[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-02-21 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed in r78247 (trunk) and r78248 (release26-maint) (plus a fix in r78272 and r78279 to avoid test failures when the filesystem encoding is ascii). I didn't use the any_cwd decorator -- I might consider it in future if it turns out that there are more tests lik

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-02-20 Thread Florent Xicluna
Florent Xicluna added the comment: The attached patch proposes a decorator which can be used to strengthen any test which is affected by the CWD. (and fixes for test_(mac|nt|posix)path too) -- Added file: http://bugs.python.org/file16267/issue3426_any_cwd.diff

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-02-01 Thread Brian Curtin
Brian Curtin added the comment: The patch intentionally doesn't use assertIsInstance because that method doesn't exist in 2.6. -- ___ Python tracker ___

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-31 Thread Florent Xicluna
Florent Xicluna added the comment: Small note: - the unit tests could use assertIsInstance(..., str), assertIsInstance(..., unicode) instead of the custom methods. - some "assertTrue" may be replaced by "assertEqual" -- ___ Python tracker

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-18 Thread Brian Curtin
Brian Curtin added the comment: Passes on Windows, Mac, and Linux. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- dependencies: +Add a context manager to change cwd in test.test_support ___ Python tracker ___ ___ Python-

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-15 Thread Ezio Melotti
Ezio Melotti added the comment: For consistency I updated all 4 the modules. If the tests pass on both Windows and Mac the patch should be ready to go in. -- Added file: http://bugs.python.org/file15902/issue3426-3.diff ___ Python tracker

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-15 Thread Florent Xicluna
Changes by Florent Xicluna : -- keywords: +buildbot ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: abspath is basically dead code in macpath, the module is used to manipulate classic MacOS9-style paths and is no longer used as os.path on any supported platform (it used to be os.path on MacOS9). BTW. the module itself is not dead, OSX still uses OS9-style

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-14 Thread Ezio Melotti
Ezio Melotti added the comment: I'll fix the patch. I added Ronald and Andrew to see if they have any opinion about macpath and os2emxpath. The main idea is that abspath should always return unicode if its arg is unicode or str otherwise. -- nosy: +aimacintyre, ronaldoussoren ___

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-14 Thread Brian Curtin
Brian Curtin added the comment: assertStr and assertUnicode don't exist in test_ntpath so the tests fail on Windows. I copied/pasted the functions over from test_posixpath just to see and test_ntpath passes. Other than that, it looks good to me. -- ___

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-13 Thread Ezio Melotti
Ezio Melotti added the comment: I added the fix on ntpath and more tests. I also refactored the tests I added for posixpath. I don't know what is the situation of os2emxpath and macpath and if they should be fixed too. The code for abspath is currently the same on all 4 the modules but I don'

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-12 Thread Brian Curtin
Brian Curtin added the comment: You could use assertIsInstance(s, unicode, '%r is not unicode' % s) in the tests instead of your assertTrue. I think the rest of it looks good. Works for me. -- nosy: +brian.curtin ___ Python tracker

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-12 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-12 Thread Ezio Melotti
Ezio Melotti added the comment: Here is a patch that uses os.getcwdu() instead of os.getcwd() when the arg of abspath is unicode (with tests). It also include an helper context manager in test_support used to create temp dirs and set them as cwd (this will be committed separately) and two hel

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-12 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-12 Thread Ezio Melotti
Ezio Melotti added the comment: This also caused the failure in #7669. I think that the functions in os.path are supposed to return unicode when they get unicode, so I agree that os.getcwdu should be used instead. I'm not sure about os.path.supports_unicode_filenames though. -- assigne

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2009-07-03 Thread Ezio Melotti
Ezio Melotti added the comment: This seems to work fine with Py 3.0 and 3.1 on Linux, it still fails with Py 2.6 and 2.7. -- nosy: +ezio.melotti priority: -> normal versions: +Python 2.6, Python 2.7 -Python 2.4, Python 2.5, Python 3.0 ___ Python tra

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2008-07-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Well, os.path.supports_unicode_filenames is False on posix platforms. So os.path.abspath is not supposed to work with unicode values. I was about to close the issue, but python 3.0 also defines supports_unicode_filenames to False! In ad

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2008-07-22 Thread Christian Häggström
New submission from Christian Häggström <[EMAIL PROTECTED]>: If current working directory contains non-ascii characters, calling os.path.abspath(u".") will result in an error. I expect it to call the underlying os.getcwdu() in this case. >>> import os >>> os.path.abspath(u".") Traceback (most re