Issue17923
Created on 2013-05-07 08:30 by delhallt, last changed 2014-08-12 15:41 by serhiy.storchaka. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| Python-2.7.4-glob.patch | delhallt, 2013-05-07 08:30 | |||
| Messages (9) | |||
|---|---|---|---|
| msg188635 - (view) | Author: Delhallt (delhallt) | Date: 2013-05-07 08:30 | |
test_glob's trailing_slash tests fails on AIX 6.1/Python 2.7.4: The code section for no_magic/slash case seems to be the issue. Attached patch resolves issue. FAIL: test_glob_directory_with_trailing_slash (test.test_glob.GlobTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/freeware/lib/python2.7/test/test_glob.py", line 120, in test_glob_directory_with_trailing_slash self.assertEqual(res, []) AssertionError: Lists differ: ['@test_7602318_tmp_dir/ZZZ/'] != [] First list contains 1 additional elements. First extra element 0: @test_7602318_tmp_dir/ZZZ/ - ['@test_7602318_tmp_dir/ZZZ/'] + [] ====================================================================== FAIL: test_glob_unicode_directory_with_trailing_slash (test.test_glob.GlobTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/freeware/lib/python2.7/test/test_glob.py", line 137, in test_glob_unicode_directory_with_trailing_slash self.assertEqual(res, []) AssertionError: Lists differ: [u'@test_7602318_tmp_dir/ZZZ/'... != [] First list contains 1 additional elements. First extra element 0: @test_7602318_tmp_dir/ZZZ/ - [u'@test_7602318_tmp_dir/ZZZ/'] + [] |
|||
| msg224440 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014-07-31 19:10 | |
Couldn't part of the patch be simplified to:-
if basename or os.path.isdir(dirname):
yield pathname
or have I misread it?
|
|||
| msg224784 - (view) | Author: Ezio Melotti (ezio.melotti) * | Date: 2014-08-04 23:18 | |
Someone on AIX should verify this patch and confirm that it fixes the issue (and if Python 3 is affected or not). |
|||
| msg224890 - (view) | Author: David Edelsohn (David.Edelsohn) * | Date: 2014-08-05 23:47 | |
I tried the patch with Python-2.7.8 and it fixes the test_glob failure. Thanks! |
|||
| msg224891 - (view) | Author: David Edelsohn (David.Edelsohn) * | Date: 2014-08-05 23:49 | |
The failure also occurs with Python 3 and the patch fixes test_glob for those releases. |
|||
| msg224892 - (view) | Author: Kubilay Kocak (koobs) | Date: 2014-08-05 23:52 | |
David, reproducible on 3.4 and default? We can use Version to reflect where changes need to be committed |
|||
| msg225175 - (view) | Author: David Edelsohn (David.Edelsohn) * | Date: 2014-08-11 00:50 | |
3.4 and default also. The failure occurs on all branches and default. |
|||
| msg225224 - (view) | Author: Roundup Robot (python-dev) | Date: 2014-08-12 09:58 | |
New changeset e430973149ed by Serhiy Storchaka in branch '2.7': Issue #17923: glob() patterns ending with a slash no longer match non-dirs on http://hg.python.org/cpython/rev/e430973149ed New changeset 5033589a752d by Serhiy Storchaka in branch '3.4': Issue #17923: glob() patterns ending with a slash no longer match non-dirs on http://hg.python.org/cpython/rev/5033589a752d New changeset 6a71d3c79653 by Serhiy Storchaka in branch 'default': Issue #17923: glob() patterns ending with a slash no longer match non-dirs on http://hg.python.org/cpython/rev/6a71d3c79653 |
|||
| msg225231 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2014-08-12 15:41 | |
Thank you Delhallt. Mark, yes, you are right, but the code can be simplified even more, to do less syscalls. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-08-12 15:41:55 | serhiy.storchaka | set | status: open -> closed resolution: fixed messages: + msg225231 stage: commit review -> resolved |
| 2014-08-12 09:58:28 | python-dev | set | nosy:
+ python-dev messages: + msg225224 |
| 2014-08-12 09:10:49 | serhiy.storchaka | set | assignee: serhiy.storchaka nosy:
+ serhiy.storchaka |
| 2014-08-11 02:15:38 | pitrou | set | versions: + Python 3.4, Python 3.5 |
| 2014-08-11 00:50:10 | David.Edelsohn | set | messages: + msg225175 |
| 2014-08-05 23:52:25 | koobs | set | nosy:
+ koobs messages: + msg224892 |
| 2014-08-05 23:49:35 | David.Edelsohn | set | messages: + msg224891 |
| 2014-08-05 23:47:24 | David.Edelsohn | set | messages: + msg224890 |
| 2014-08-04 23:24:35 | berker.peksag | set | nosy:
+ David.Edelsohn |
| 2014-08-04 23:18:46 | ezio.melotti | set | keywords:
+ easy messages:
+ msg224784 |
| 2014-07-31 19:10:15 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg224440 |
| 2013-05-10 17:53:17 | ezio.melotti | set | nosy:
+ ezio.melotti components:
+ Library (Lib) |
| 2013-05-07 08:30:10 | delhallt | create | |