Created on 2014-06-30 03:12 by Matt.Bachmann, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| error_message.patch | Matt.Bachmann, 2014-06-30 03:25 | review | ||
| os_path_typeerrors.patch | serhiy.storchaka, 2014-09-27 12:41 | review | ||
| os_path_typeerrors_2.patch | serhiy.storchaka, 2014-09-27 13:21 | review | ||
| Messages (6) | |||
|---|---|---|---|
| msg221939 - (view) | Author: Matt Bachmann (Matt.Bachmann) * | Date: 2014-06-30 03:12 | |
Howdy!
I encountered this error when accidently passing in mixed types to reldir
>>> import os
>>> os.path.relpath('/Users/bachmann', b'.')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/posixpath.py", line 451, in relpath
start_list = [x for x in abspath(start).split(sep) if x]
TypeError: Type str doesn't support the buffer API
When this mistake is done in join we get a helpful error message.
I simply borrowed this logic and put in in relpath. Is this useful?
|
|||
| msg221940 - (view) | Author: Matt Bachmann (Matt.Bachmann) * | Date: 2014-06-30 03:25 | |
Includes change and tests. The test is similar so I just broke out the logic |
|||
| msg227668 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2014-09-27 12:41 | |
Error message for posixpath.join() was fixed and enhanced in issue22034. Here is a patch which extends this enhancement to relpath() and to other os.path implementations (ntpath and macpath). |
|||
| msg227671 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2014-09-27 13:21 | |
Ah, tests fail when Python runs without the -bb option. Here is fixed path. |
|||
| msg228449 - (view) | Author: Roundup Robot (python-dev) | Date: 2014-10-04 12:10 | |
New changeset 2ba2ee5713bd by Serhiy Storchaka in branch 'default': Issue #21883: os.path.join() and os.path.relpath() now raise a TypeError with https://hg.python.org/cpython/rev/2ba2ee5713bd |
|||
| msg228457 - (view) | Author: Roundup Robot (python-dev) | Date: 2014-10-04 13:18 | |
New changeset 85de13b746ac by Serhiy Storchaka in branch 'default': Fixed tests on Windows for issue #21883. https://hg.python.org/cpython/rev/85de13b746ac |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:05 | admin | set | github: 66082 |
| 2014-10-04 13:18:52 | python-dev | set | messages: + msg228457 |
| 2014-10-04 12:12:37 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2014-10-04 12:10:37 | python-dev | set | nosy:
+ python-dev messages: + msg228449 |
| 2014-09-27 13:21:51 | serhiy.storchaka | set | files:
+ os_path_typeerrors_2.patch messages: + msg227671 |
| 2014-09-27 12:41:38 | serhiy.storchaka | set | files:
+ os_path_typeerrors.patch messages: + msg227668 |
| 2014-09-27 10:57:21 | serhiy.storchaka | set | assignee: serhiy.storchaka stage: patch review nosy:
+ serhiy.storchaka |
| 2014-06-30 03:25:44 | Matt.Bachmann | set | files:
+ error_message.patch messages: + msg221940 |
| 2014-06-30 03:25:15 | Matt.Bachmann | set | files: - error_message.patch |
| 2014-06-30 03:13:30 | Matt.Bachmann | set | files:
+ error_message.patch keywords: + patch |
| 2014-06-30 03:12:55 | Matt.Bachmann | create | |