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.

Author Tim.Graham
Recipients Tim.Graham, eryksun, lazka, miss-islington, paul.moore, steve.dower, tim.golden, zach.ware
Date 2018-10-23.15:32:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1540308755.87.0.788709270274.issue31047@psf.upfronthosting.co.za>
In-reply-to
Content
I think this caused a behavior change:

Before (Python 3.6.6):
>>> from os.path import abspath
>>> abspath('/abc/')
'C:\\abc'

After (Python 3.6.7):
>>> abspath('/abc/')
'C:\\abc\\'

This causes a test failure in Django's safe_join() function: https://github.com/django/django/blob/10d82c85aa5f8bd6adff0db49798dd368455cdcf/django/utils/_os.py#L24-L47

https://github.com/django/django/blob/10d82c85aa5f8bd6adff0db49798dd368455cdcf/tests/utils_tests/test_os_utils.py#L10

Traceback (most recent call last):
  File "C:\Jenkins\workspace\django-windows\database\sqlite3\label\windows\python\Python36\tests\utils_tests\test_os_utils.py", line 10, in test_base_path_ends_with_sep
    drive, path = os.path.splitdrive(safe_join("/abc/", "abc"))
  File "C:\Jenkins\workspace\django-windows\database\sqlite3\label\windows\python\Python36\django\utils\_os.py", line 46, in safe_join
    'component ({})'.format(final_path, base_path))
django.core.exceptions.SuspiciousFileOperation: The joined path (C:\abc\abc) is located outside of the base path component (C:\abc\)
History
Date User Action Args
2018-10-23 15:32:35Tim.Grahamsetrecipients: + Tim.Graham, paul.moore, tim.golden, zach.ware, eryksun, steve.dower, lazka, miss-islington
2018-10-23 15:32:35Tim.Grahamsetmessageid: <1540308755.87.0.788709270274.issue31047@psf.upfronthosting.co.za>
2018-10-23 15:32:35Tim.Grahamlinkissue31047 messages
2018-10-23 15:32:35Tim.Grahamcreate