[issue511261] WIN32 os.path.normpath('./') incorrect

2022-04-10 Thread admin
Change by admin : -- github: None -> 36008 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46208] os.path.normpath change between 3.11.0a2 and 3.11.0a3+

2022-01-06 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46208] os.path.normpath change between 3.11.0a2 and 3.11.0a3+

2022-01-06 Thread Steve Dower
Steve Dower added the comment: New changeset 9c5fa9c97c5c5336e60e4ae7a2e6e3f67acedfc7 by neonene in branch 'main': bpo-46208: Fix normalization of relative paths in _Py_normpath()/os.path.normpath (GH-30362) https://github.com/python/cpython/commit/9c5fa9c97c5c5336e60e4ae7a2e6e3f67acedfc7

[issue46208] os.path.normpath change between 3.11.0a2 and 3.11.0a3+

2022-01-06 Thread Steve Dower
Steve Dower added the comment: I'm happy with PR 30362 now - any other comments before we merge? -- ___ Python tracker ___ ___

[issue46208] os.path.normpath change between 3.11.0a2 and 3.11.0a3+

2022-01-03 Thread neonene
neonene added the comment: >Here's a branch with a passing ntpath.normpath test and a failing >posixpath.normpath test: I took the test cases for my PR, thanks. On Windows machine, ntpath fails and posixpath passes. It seems that the passing one is tested with pure python code. --

[issue46208] os.path.normpath change between 3.11.0a2 and 3.11.0a3+

2022-01-03 Thread neonene
Change by neonene : -- keywords: +patch nosy: +neonene nosy_count: 3.0 -> 4.0 pull_requests: +28576 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30362 ___ Python tracker

[issue46208] os.path.normpath change between 3.11.0a2 and 3.11.0a3+

2022-01-02 Thread Hugo van Kemenade
Hugo van Kemenade added the comment: Here's a branch with a passing ntpath.normpath test and a failing posixpath.normpath test: https://github.com/hugovk/cpython/tree/issue-46208-tests https://github.com/hugovk/cpython/commit/d7e8da179adce51a8f63d2dbd062a272dda826bc --

[issue46208] os.path.normpath change between 3.11.0a2 and 3.11.0a3+

2021-12-31 Thread Steve Dower
Steve Dower added the comment: Yep, it's a bug and should be fixed. I'm still not back coding yet, but I'll get to it once I am if nobody else gets there first. This is going to affect getpath.py in the native implementation, so it ought to be fixed there (and we need tests for this case,

[issue46208] os.path.normpath change between 3.11.0a2 and 3.11.0a3+

2021-12-30 Thread Hugo van Kemenade
Hugo van Kemenade added the comment: git bisect between v3.11.0a2 and v3.11.0a3 points to the same commit, 99fcf1505218464c489d419d4500f126b6d6dc28. -- ___ Python tracker

[issue46208] os.path.normpath change between 3.11.0a2 and 3.11.0a3+

2021-12-30 Thread Christian Heimes
Christian Heimes added the comment: The issue could be related to 99fcf1505218464c489d419d4500f126b6d6dc28 / bpo-45582. -- nosy: +christian.heimes, steve.dower ___ Python tracker

[issue46208] os.path.normpath change between 3.11.0a2 and 3.11.0a3+

2021-12-30 Thread Hugo van Kemenade
New submission from Hugo van Kemenade : The behaviour of os.path.normpath appears to have changed between Python 3.10/Python 3.11.0a2 and 3.11.0a3+. I don't see anything mentioned in https://docs.python.org/3.11/whatsnew/3.11.html Is this intentional? Old behaviour: Python 3.10.1

[issue26329] os.path.normpath("//") returns //

2021-07-12 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue26329] os.path.normpath("//") returns //

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 47abf240365ddd54a91c6ac167900d4bf6806c4f by Miss Islington (bot) in branch '3.9': bpo-26329: update os.path.normpath documentation (GH-20138) (#27095) https://github.com/python/cpython/commit/47abf240365ddd54a91c6ac167900d4bf6806c4f

[issue26329] os.path.normpath("//") returns //

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 443db64f496d3988d20cfda2c3c2ceb6702df36f by Miss Islington (bot) in branch '3.10': bpo-26329: update os.path.normpath documentation (GH-20138) (GH-27094) https://github.com/python/cpython/commit/443db64f496d3988d20cfda2c3c2ceb6702df36f

[issue26329] os.path.normpath("//") returns //

2021-07-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +25643 pull_request: https://github.com/python/cpython/pull/27095 ___ Python tracker ___

[issue26329] os.path.normpath("//") returns //

2021-07-12 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: New changeset 66c5853406bbcccecf35372795078c0641a5f385 by Furkan Onder in branch 'main': bpo-26329: update os.path.normpath documentation (GH-20138) https://github.com/python/cpython/commit/66c5853406bbcccecf35372795078c0641a5f385

[issue26329] os.path.normpath("//") returns //

2021-07-12 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +25642 pull_request: https://github.com/python/cpython/pull/27094 ___ Python tracker

[issue26329] os.path.normpath("//") returns //

2021-06-21 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker ___

[issue44316] Support preserving path meaning in os.path.normpath() and abspath()

2021-06-13 Thread Eryk Sun
Eryk Sun added the comment: I think separate keep_curdir and keep_pardir options is over-complicating the signature. Also, I'd prefer to remove a dot component if it's not the first component since there's no reason to keep it. If you plan to use normpath() in pathlib, then the case for

[issue44316] Support preserving path meaning in os.path.normpath() and abspath()

2021-06-12 Thread Barney Gale
Barney Gale added the comment: I think I agree How would you feel about two new arguments? Following `os.curdir` and `os.pardir` names: def normpath(path, *, keep_curdir=False, keep_pardir=False) ... -- ___ Python tracker

[issue44316] Support preserving path meaning in os.path.normpath() and abspath()

2021-06-12 Thread Eryk Sun
Eryk Sun added the comment: > single dots are collapsed For pathlib, I've previously discussed a desire to retain a leading dot component from the initializing path. This could be implemented in strict mode for normpath(). A leading dot is significant in the path of an executable in a

[issue44316] Support preserving path meaning in os.path.normpath() and abspath()

2021-06-12 Thread Barney Gale
Barney Gale added the comment: For this bug specifically, the pathlib docs describe the desirable behaviour: Spurious slashes and single dots are collapsed, but double dots ('..') are not, since this would change the meaning of a path in the face of symbolic links: >>> PurePath('foo//bar')

[issue44316] Support preserving path meaning in os.path.normpath() and abspath()

2021-06-12 Thread Barney Gale
Barney Gale added the comment: Thanks Terry, I've added a topic here: https://discuss.python.org/t/pathlib-and-os-path-code-duplication-and-feature-parity/9239 The bit about `normpath()` is towards the middle of the post. -- ___ Python tracker

[issue44316] Support preserving path meaning in os.path.normpath() and abspath()

2021-06-12 Thread Barney Gale
Change by Barney Gale : -- keywords: +patch pull_requests: +25279 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26694 ___ Python tracker ___

[issue44316] Support preserving path meaning in os.path.normpath() and abspath()

2021-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think you should propose this for discussion on python-ideas list to try for more support. If you can, say more about why reconsider. -- nosy: +terry.reedy versions: +Python 3.11 ___ Python tracker

[issue44316] Support preserving path meaning in os.path.normpath() and abspath()

2021-06-04 Thread Barney Gale
New submission from Barney Gale : >>> os.path.normpath('a/./b/../c//.') 'a/c' >>> pathlib.Path('a/./b/../c//.') PosixPath('a/b/../c') pathlib takes care not to change the meaning of the path when normalising. That means preserving '..' entries, as these can't be simplified

[issue26329] os.path.normpath("//") returns //

2020-05-16 Thread Furkan Onder
Change by Furkan Onder : -- pull_requests: +19444 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20138 ___ Python tracker ___

[issue26329] os.path.normpath("//") returns //

2020-05-16 Thread Furkan Onder
Furkan Onder added the comment: PR has been sent! -- nosy: +furkanonder ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37939] os.path.normpath change some characters of a path into kinda 'hex number'

2019-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: 3.5 (and 3.6) only gets security fixes. From the report, the bug is fixed in 3.7. FWIW, I agree about the 9-bit octal thing. There is another issue about this. -- nosy: +terry.reedy resolution: -> out of date stage: -> resolved status: open ->

[issue37939] os.path.normpath change some characters of a path into kinda 'hex number'

2019-08-24 Thread Eryk Sun
Eryk Sun added the comment: >\N{name} : named character >\U : 32-bit hexadecimal ordinal (e.g. \U0010) >\u : 16-bit hexadecimal ordinal (e.g. \u) >\xXX : 8-bit hexadecimal ordinal (e.g. \xff) >\OOO : 9-bit octal ordinal (e.g. \777) >

[issue37939] os.path.normpath change some characters of a path into kinda 'hex number'

2019-08-24 Thread Eryk Sun
me programs use forward slash as a switch for command-line options. In this case first normalize the path via os.path.normpath, or via replace('/', '\\'). In some cases a path may be returned to us in Windows with a "\\?\" prefix (backslash only), which is sometimes referred to as an ext

[issue37939] os.path.normpath change some characters of a path into kinda 'hex number'

2019-08-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I guess '\f' translates to \x0c and using raw string helps with this. >>> ord('\f') 12 >>> '\f' '\x0c' >>> var = "d:\stuff\morestuff\furtherdown\THEFILE.txt" >>> var 'd:\\stuff\\morestuff\x0curtherdow

[issue37939] os.path.normpath change some characters of a path into kinda 'hex number'

2019-08-24 Thread Yugi
-52.png messages: 350371 nosy: Yugi priority: normal severity: normal status: open title: os.path.normpath change some characters of a path into kinda 'hex number' type: behavior versions: Python 3.5 Added file: https://bugs.python.org/file48560/Screenshot from 2019-08-24 21-41-52.png

[issue26329] os.path.normpath("//") returns //

2019-05-27 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: @ Jack McCracken do you want to open a pull request for this? -- nosy: +nanjekyejoannah ___ Python tracker ___

[issue26329] os.path.normpath("//") returns //

2016-06-05 Thread Jack McCracken
Jack McCracken added the comment: Here's the patch I made. -- keywords: +patch Added file: http://bugs.python.org/file43250/add-many-slash-path-note.patch ___ Python tracker

[issue26329] os.path.normpath("//") returns //

2016-06-05 Thread Jack McCracken
Jack McCracken added the comment: Hey all - I would love to write a patch :) Working on it! -- nosy: +Jack.McCracken ___ Python tracker ___

[issue26329] os.path.normpath("//") returns //

2016-06-05 Thread Arno-Can Uestuensoez
Arno-Can Uestuensoez added the comment: Hi Serhiy, I am currently still investigating it for my own project. https://stackoverflow.com/questions/37646103/posix-path-1003-1-examples-and-behaviour-for-foo-bar Currently I do not have the build environment, so I can provide the text, but

[issue27228] just for clearing: os.path.normpath("file://a") returns "file:/a"

2016-06-05 Thread Georg Brandl
Georg Brandl added the comment: `os.path` does not handle URIs of any type, so this behavior is correct as Steven says. -- nosy: +georg.brandl resolution: -> not a bug status: open -> closed ___ Python tracker

[issue26329] os.path.normpath("//") returns //

2016-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you provide a patch Arno-Can? According to the comment in the configure script of GNU coreutils, the only POSIX platforms known for coreutils developers that have two distinct roots / and // are Cygwin, z/OS and dead Apollo DomainOS. Yet few exotic

[issue27228] just for clearing: os.path.normpath("file://a") returns "file:/a"

2016-06-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: "file://a" is a valid relative file path, for a directory called "file:" and a file called "a", so normpath should return "file:/a". -- nosy: +steven.daprano ___ Python tracker

[issue27228] just for clearing: os.path.normpath("file://a") returns "file:/a"

2016-06-05 Thread Arno-Can Uestuensoez
New submission from Arno-Can Uestuensoez: I am currently finishing a file system library and use 'os.path.normpath' for canonical input into match-operations. So already found Issue26329 - IEEE-1003.1-Chap 4.2 and written a comment. But I guess this issue should be handled seperately. Now

[issue26329] os.path.normpath("//") returns //

2016-06-05 Thread Arno-Can Uestuensoez
Arno-Can Uestuensoez added the comment: I propose to add at least a statement like e.g. "In conformance to IEEE Std 1003.1™, 2013 Edition; 4.12 Pathname Resolution". Because I had the same thought of a bug at first view, this because I did not find any hint in e.g. docs for 2.7.11. The

[issue26329] os.path.normpath("//") returns //

2016-05-18 Thread Camilla Montonen
Camilla Montonen added the comment: Should the comment with the link to specification be added to Lib/posixpath.py? or Lib/os.py? -- ___ Python tracker

[issue26329] os.path.normpath("//") returns //

2016-05-18 Thread Camilla Montonen
Changes by Camilla Montonen : -- nosy: +Winterflower ___ Python tracker ___ ___

[issue26329] os.path.normpath("//") returns //

2016-02-10 Thread Fred Rolland
New submission from Fred Rolland: Hi, os.path.normpath("//") returns '//' I would expect to be '/' >>> os.path.normpath("//") '//' >>> os.path.normpath("///") '/' >>> os.path.normpath("") '/' -- components:

[issue26329] os.path.normpath("//") returns //

2016-02-10 Thread Emanuel Barry
Changes by Emanuel Barry : -- assignee: -> serhiy.storchaka nosy: +ebarry, serhiy.storchaka stage: -> needs patch type: -> behavior ___ Python tracker

[issue26329] os.path.normpath("//") returns //

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue636648. This is intended behavior. It was introduced in changeset 01d5b80a3c03. >From the POSIX Specification [1]: """ A pathname consisting of a single shall resolve to the root directory of the process. A null pathname shall

[issue26329] os.path.normpath("//") returns //

2016-02-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: serhiy.storchaka -> ___ Python tracker ___

[issue17415] Clarify docs of os.path.normpath()

2013-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset ff9636af9505 by Terry Jan Reedy in branch '3.2': Issue #17415: Clarify 'this' referent by moving containing sentence just after http://hg.python.org/cpython/rev/ff9636af9505 New changeset bceb81b0016e by Terry Jan Reedy in branch '2.7': Issue

[issue17415] Clarify docs of os.path.normpath()

2013-03-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: If foo is a symbolic link, changing A/foo/../B to A/B could change the meaning, so I am sure the rewrite is correct. I used Ezio's version with a few more changes. I particular, I changed 'This collapsing', which is slightly awkward anyway, to 'This string

[issue17415] Clarify docs of os.path.normpath()

2013-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: os.path.normpath() works not only with strings but with bytes objects too. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17415

[issue17415] Clarify docs of os.path.normpath()

2013-03-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: The top of the os doc makes it clear that path = byte string or unicode string and I meant 'string' in that generalized sense. I think 'string' is used that way elsewhere in the 3.x docs. I though of 'text manipulation', but as the doc again makes clear, unix

[issue17415] Clarify docs of os.path.normpath()

2013-03-17 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- assignee: docs@python - terry.reedy stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17415

[issue17415] Clarify docs of os.path.normpath()

2013-03-16 Thread Gurmeet Singh
by reading only the docs). So, I further suggest to add to the description by Ezio Melotti after the line This collapsing may change the meaning of the path if it contains symbolic links.. We could add the following bracketed line (since os.path.normpath is just string manipulation utility - unaware

[issue17415] Clarify docs of os.path.normpath()

2013-03-15 Thread Ezio Melotti
Ezio Melotti added the comment: I will correct that if you make me aware about it! Try to use meaningful titles, e.g. Clarify docs of os.path.normpath(). See http://docs.python.org/devguide/triaging.html for more informations. Also if you could provide patches that would be even better

[issue17415] Clarify docs of os.path.normpath()

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: The question is what is the 'this' that may change the patch meaning. It does not seem to me that changing '/' to '\' would do that. So I suspect 'this' refers to 'collapsing'. If so, I suggest the entry be: Normalize a pathname (but not the case -- use

[issue17415] Clarify docs of os.path.normpath()

2013-03-15 Thread Ezio Melotti
Ezio Melotti added the comment: Your suggestion -- assuming it's accurate -- looks good to me, however I would get rid of the exclamation mark and move the link to normcase at the end: Normalize a pathname by collapsing redundant separators and up-level references so that A//B, A/B/, A/./B

[issue7386] More precise document on os.path.normpath()

2010-08-02 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Fixed in r83547. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7386 ___

Re: os.path.normpath question

2010-06-08 Thread Duncan Booth
Bart xc68...@gmail.com wrote: I'm using this and ran across backslash issues in one of my paths. archpath = os.path.normpath('E:\foo\FTP\HLS\archive') was translating to: E:\lsfprod\law\uch_interfaces\FTP\HLSrchive which caused me to start using the 'raw' declaration before

os.path.normpath question

2010-06-07 Thread Bart
I'm using this and ran across backslash issues in one of my paths. archpath = os.path.normpath('E:\foo\FTP\HLS\archive') was translating to: E:\lsfprod\law\uch_interfaces\FTP\HLSrchive which caused me to start using the 'raw' declaration before the path string like

Re: os.path.normpath question

2010-06-07 Thread Peter Otten
Bart wrote: I'm using this and ran across backslash issues in one of my paths. archpath = os.path.normpath('E:\foo\FTP\HLS\archive') was translating to: E:\lsfprod\law\uch_interfaces\FTP\HLSrchive which caused me to start using the 'raw' declaration before the path string

[issue5827] os.path.normpath doesn't preserve unicode

2010-01-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed in r77442 (trunk) and r77443 (release26-maint), thanks! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue5827] os.path.normpath doesn't preserve unicode

2010-01-07 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5827 ___ ___

More precise document on os.path.normpath()

2009-11-23 Thread Peng Yu
After I tried os.path.normpath(), it is clear that the function doesn't return the trailing '/', if the path is a directory. But this fact is not documented. Should this be documented in future release of python. Also, I found the documentation of some functions in os.path are not clear. I have

Re: More precise document on os.path.normpath()

2009-11-23 Thread Benjamin Kaplan
On Mon, Nov 23, 2009 at 8:52 PM, Peng Yu pengyu...@gmail.com wrote: After I tried os.path.normpath(), it is clear that the function doesn't return the trailing '/', if the path is a directory. But this fact is not documented. Should this be documented in future release of python. Also, I

Re: More precise document on os.path.normpath()

2009-11-23 Thread Carl Banks
On Nov 23, 5:59 pm, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Mon, Nov 23, 2009 at 8:52 PM, Peng Yu pengyu...@gmail.com wrote: After I tried os.path.normpath(), it is clear that the function doesn't return the trailing '/', if the path is a directory. But this fact

Re: More precise document on os.path.normpath()

2009-11-23 Thread Lie Ryan
Peng Yu wrote: After I tried os.path.normpath(), it is clear that the function doesn't return the trailing '/', if the path is a directory. But this fact is not documented. Should this be documented in future release of python. Also, I found the documentation of some functions in os.path

[issue7386] More precise document on os.path.normpath()

2009-11-23 Thread pengyu.ut
New submission from pengyu.ut pengyu...@gmail.com: os.path.normpath() doesn't return the trailing '/', if the path is a directory. But the document doesn't mention this fact. I recommend document this feature. -- assignee: georg.brandl components: Documentation messages: 95661 nosy

[issue7387] More precise document on os.path.normpath()

2009-11-23 Thread pengyu.ut
New submission from pengyu.ut pengyu...@gmail.com: os.path.normpath() doesn't return the trailing '/', if the path is a directory. But the document doesn't mention this fact. I recommend document this feature. -- assignee: georg.brandl components: Documentation messages: 95662 nosy

[issue7387] More precise document on os.path.normpath()

2009-11-23 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7387 ___

[issue5827] os.path.normpath doesn't preserve unicode

2009-11-19 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: assertTrue() also accepts a 'msg' argument where to explain what went wrong in case of failure [1]. [1]: http://docs.python.org/library/unittest.html#unittest.TestCase.assertTrue -- ___ Python

[issue5827] os.path.normpath doesn't preserve unicode

2009-11-19 Thread Erik Carstensen
Erik Carstensen sandb...@virtutech.com added the comment: Also, assertTrue has an alias failUnless which I personally find more descriptive (I don't know if either form is preferred for inclusion in Python though). -- ___ Python tracker

[issue5827] os.path.normpath doesn't preserve unicode

2009-11-19 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: failUnless is deprecated in Python3.1 [1]. The assert* methods are preferred over the fail* ones that are now deprecated. [1]: http://docs.python.org/3.1/library/unittest.html#unittest.TestCase.failUnless --

[issue5827] os.path.normpath doesn't preserve unicode

2009-11-18 Thread Matt Giuca
Matt Giuca matt.gi...@gmail.com added the comment: Thanks Ezio. I've updated the patch to incorporate your suggestions. Note that I too have only tested it on Linux, but I tested both posixpath and ntpath (and there is no OS-specific code, except for the filenames themselves). I'm not sure if

[issue7315] os.path.normpath doesn't normalize ../path/something.py

2009-11-14 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: If your current directory is (e.g.) /home/user, then ../xyz will not bring you back to it. (xyz/.. would.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7315

[issue7315] os.path.normpath doesn't normalize ../path/something.py

2009-11-13 Thread James
New submission from James purplei...@gmail.com: os.path.normpath doesn't normalize paths that start with ../ you would expect the final output line in the secpnd run to read: normpath: badnormpath.py instead of: normpath: ../tmp/badnormpath.py example: ja...@home:~$ cd tmp/ ja...@home:~/tmp

[issue7315] os.path.normpath doesn't normalize ../path/something.py

2009-11-13 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: normpath() doesn't look at the file system. It cannot know that your current directory is ~/tmp, so it cannot know that . and ../tmp are the same directory. -- nosy: +georg.brandl resolution: - wont fix status: open - closed

[issue7315] os.path.normpath doesn't normalize ../path/something.py

2009-11-13 Thread James
James purplei...@gmail.com added the comment: i looked at the source for normpath. i know that it doesn't look at the filesystem. assuming you're not currently sitting at the root directory, in all? cases ../xyz brings you back to where you started. we expect normpath to clean up a path

[issue5827] os.path.normpath doesn't preserve unicode

2009-11-13 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Thanks for the patch, I tried it on Linux and it seems to solve the problem. A few comments about it: 1) I'd change all the self.assertEqual(type(posixpath.normpath(u)), unicode) to self.assertTrue(isinstance(posixpath.normpath(u),

[issue6764] os.path.join should call os.path.normpath on result

2009-08-22 Thread Michael Foord
: os.path.normpath(os.path.join('/foo', '..')) '/' Because of this code gets littered with annoyingly long chained calls which are a pain to both read and write. Is there any problem with join always calling normpath on it's result? -- components: Library (Lib) keywords: easy messages

[issue6764] os.path.join should call os.path.normpath on result

2009-08-22 Thread Martin v . Löwis
might be incorrect. -- nosy: +loewis title: os.path.join should call os.path.normpath on result - os.path.join should call os.path.normpath on result ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6764

[issue6764] os.path.join should call os.path.normpath on result

2009-08-22 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Damn. :-) Detecting the case where the normpath'd location is the same means hitting the filesystem - and the current version just does string manipulation so it doesn't seem like an acceptable change. Still, compared to other languages

[issue665336] win32 os.path.normpath not correct for leading slash cases

2009-07-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: On Windows, os.path.normpath(r\\x\y\z) must return the string unchanged, because this is the syntax for UNC paths: \\server\share\file.txt Closing as invalid. -- nosy: +amaury.forgeotdarc resolution: - invalid status: open

[issue5827] os.path.normpath doesn't preserve unicode

2009-04-23 Thread Matt Giuca
New submission from Matt Giuca matt.gi...@gmail.com: In the Python 2.x branch, os.path.normpath will sometimes return a str even if given a unicode. This is not an issue in the Python 3.0 branch. This happens specifically when it throws away all string data and constructs its own

[issue5827] os.path.normpath doesn't preserve unicode

2009-04-23 Thread Matt Giuca
Changes by Matt Giuca matt.gi...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5827 ___ ___ Python-bugs-list

[issue1707768] os.path.normpath changes path (chops of trailing slash)

2009-04-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: The amount of discussion on this bug is already an indication that the proposed change is questionable. Combine this with backwards-compatibility concerns, and it's enough reason not to change this. -- nosy: +georg.brandl resolution: -

[issue1707768] os.path.normpath changes path (chops of trailing slash)

2009-03-30 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: -- keywords: +patch stage: - test needed type: - behavior versions: +Python 2.6, Python 3.0 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1707768

[issue665336] win32 os.path.normpath not correct for leading slash cases

2009-02-12 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: -- components: +Windows stage: - test needed type: - behavior versions: +Python 2.6 -Python 2.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue665336

os.path.normpath() for URLs?

2008-08-04 Thread Robert Dailey
Hi, I'm currently trying to parse relative URLs, but I want to make them absolute. In other words, I want to normalize the URLs. However, I don't want to have to write this logic myself if it is already provided. I was thinking of somehow tricking os.path.normpath() as a last resort

[issue2289] os.path.normpath over-normalizes

2008-03-16 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: This is a documented feature: normpath(path) Normalize a pathname. ... It should be understood that this may change the meaning of the path if it contains symbolic links! See http://docs.python.org/lib/module-os.path.html .

[issue2289] os.path.normpath over-normalizes

2008-03-16 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Closing as Won't fix. -- nosy: +georg.brandl resolution: - wont fix status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2289 __

[issue2289] os.path.normpath over-normalizes

2008-03-14 Thread John Love-Jensen
New submission from John Love-Jensen [EMAIL PROTECTED]: I found a bug (or at least a shortcoming) in Python's os.path.normpath routine. It overly normalizes, at least for Unix and Unix-like systems (including Mac), and Windows. Example: x = os.path.join(., dog, .., cupcake.txt) print x x

os.path.normpath bug?

2007-06-14 Thread billiejoex
Hi there, I've noticed that os.path.normpath does not collapse redundant separators if they're located at the beginning of the string: print os.path.normpath('/a//b//c') \a\b\c print os.path.normpath('//a//b//c') \\a\b\c Is it intentional or is it a bug? -- http://mail.python.org/mailman

Re: os.path.normpath bug?

2007-06-14 Thread Michael Hoffman
billiejoex wrote: Hi there, I've noticed that os.path.normpath does not collapse redundant separators if they're located at the beginning of the string: print os.path.normpath('/a//b//c') \a\b\c print os.path.normpath('//a//b//c') \\a\b\c Is it intentional or is it a bug? Intentional

Re: os.path.normpath bug?

2007-06-14 Thread billiejoex
On 14 Giu, 22:35, Michael Hoffman [EMAIL PROTECTED] wrote: Intentional. http://en.wikipedia.org/wiki/Path_(computing)#Universal_Naming_Conven... -- Michael Hoffman Got it. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

[ python-Bugs-1707768 ] os.path.normpath changes path (chops of trailing slash)

2007-05-08 Thread SourceForge.net
thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Robert Siemer (siemer) Assigned to: Nobody/Anonymous (nobody) Summary: os.path.normpath changes

[ python-Bugs-1707768 ] os.path.normpath changes path (chops of trailing slash)

2007-05-08 Thread SourceForge.net
, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Robert Siemer (siemer) Assigned to: Nobody/Anonymous (nobody) Summary: os.path.normpath changes path

[ python-Bugs-1707768 ] os.path.normpath changes path (chops of trailing slash)

2007-05-08 Thread SourceForge.net
thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Robert Siemer (siemer) Assigned to: Nobody/Anonymous (nobody) Summary: os.path.normpath changes

[ python-Bugs-1707768 ] os.path.normpath changes path (chops of trailing slash)

2007-05-06 Thread SourceForge.net
, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Robert Siemer (siemer) Assigned to: Nobody/Anonymous (nobody) Summary: os.path.normpath changes path

[ python-Bugs-1707768 ] os.path.normpath changes path (chops of trailing slash)

2007-05-05 Thread SourceForge.net
, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Robert Siemer (siemer) Assigned to: Nobody/Anonymous (nobody) Summary: os.path.normpath changes path

  1   2   >