classification
Title: test_undecodable_filename() in Lib/test/test_httpservers.py broken on APFS
Type: behavior Stage:
Components: macOS, Tests Versions: Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: howarthjw, mattbillenstein, ned.deily, ronaldoussoren, vstinner
Priority: normal Keywords:

Created on 2017-09-07 09:58 by howarthjw, last changed 2017-11-17 14:51 by vstinner.

Messages (2)
msg301580 - (view) Author: Jack Howarth (howarthjw) Date: 2017-09-07 09:58
The Python 3.x test suite produces a new regression on macOS 10.13 under the new APFS filesystem when executing the test_undecodable_filename() test from Lib/test/test_httpservers.py. The error appears as...

======================================================================
ERROR: test_undecodable_filename
(test.test_httpservers.SimpleHTTPServerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/howarth/Python-3.6.2/Lib/test/support/__init__.py",
line 601, in wrapper
    return func(*args, **kw)
  File "/Users/howarth/Python-3.6.2/Lib/test/test_httpservers.py",
line 380, in test_undecodable_filename
    with open(os.path.join(self.tempdir, filename), 'wb') as f:
OSError: [Errno 92] Illegal byte sequence:
'/var/folders/7g/1x2rsy3j40n1pydq931hzlkm0000gn/T/tmpomp1r36b/@test_58317_tmp\udce7w\udcf0.txt'

----------------------------------------------------------------------
Ran 59 tests in 3.207s

See https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/APFS_Guide/FAQ/FAQ.html

"""
APFS accepts only valid UTF-8 encoded filenames for creation, and preserves both case and normalization of the filename on disk in all variants..

Some differences between how APFS and HFS+ handle filenames include the following:
...
        • APFS doesn’t allow files to be created with filenames that contain unassigned codepoints in the Unicode 9.0 standard, whereas HFS+ does.
msg306006 - (view) Author: Matt Billenstein (mattbillenstein) Date: 2017-11-10 06:20
Reflected on the High Sierra buildbot now:  http://buildbot.python.org/all/#/builders/14/builds/162
History
Date User Action Args
2017-11-17 14:51:49vstinnersetnosy: + vstinner
2017-11-17 14:51:44vstinnerlinkissue32061 superseder
2017-11-10 09:46:45serhiy.storchakasettype: crash -> behavior
components: + Tests
versions: - Python 3.3, Python 3.4, Python 3.5
2017-11-10 09:45:27serhiy.storchakalinkissue32000 superseder
2017-11-10 06:20:37mattbillensteinsetnosy: + mattbillenstein
messages: + msg306006
2017-09-07 09:58:29howarthjwcreate