This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年07月22日 09:33 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| posixpath_join_bytearray-3.4.diff | serhiy.storchaka, 2014年07月22日 09:33 | review | ||
| posixpath_join_bytearray-3.5.diff | serhiy.storchaka, 2014年07月22日 09:33 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg223654 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年07月22日 09:33 | |
posixpath.join() raises misleading exception in case when all arguments are bytearrays: >>> import posixpath >>> posixpath.join(bytearray(b'foo'), bytearray(b'bar')) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/serhiy/py/cpython/Lib/posixpath.py", line 91, in join "components.") from None TypeError: Can't mix strings and bytes in path components. This bug was introduced in issue15377 and misleading test which provoked it was added in issue15180. I proposed two patches. Patch for 3.4 only eliminates wrong specialcasing of bytearray (none of os.path methods work with bytearray). Patch for 3.5 also adds better error messages for wrong argument types of posixpath.join (of course we can apply it to 3.4 too). |
|||
| msg225261 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年08月13日 07:22 | |
Copied nosy list from issue15180 and issue15377. |
|||
| msg225441 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年08月17日 13:29 | |
Could anyone please make the review? |
|||
| msg225807 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年08月24日 09:24 | |
New changeset d9607a71456e by Serhiy Storchaka in branch '3.4': Issue #22034: Got rid of misleading error message for bytearray arguments in http://hg.python.org/cpython/rev/d9607a71456e New changeset db600c927b2b by Serhiy Storchaka in branch 'default': Issue #22034: Improve handling of wrong argument types in posixpath.join(). http://hg.python.org/cpython/rev/db600c927b2b |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:06 | admin | set | github: 66233 |
| 2014年08月24日 09:25:57 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2014年08月24日 09:24:43 | python-dev | set | nosy:
+ python-dev messages: + msg225807 |
| 2014年08月17日 13:29:49 | serhiy.storchaka | set | assignee: serhiy.storchaka messages: + msg225441 |
| 2014年08月13日 07:26:37 | georg.brandl | set | nosy:
- georg.brandl |
| 2014年08月13日 07:22:44 | serhiy.storchaka | set | nosy:
+ georg.brandl, terry.reedy, pitrou, eric.araujo, Arfrever, r.david.murray, chris.jerdonek messages: + msg225261 |
| 2014年07月22日 09:33:58 | serhiy.storchaka | set | files: + posixpath_join_bytearray-3.5.diff |
| 2014年07月22日 09:33:29 | serhiy.storchaka | create | |