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 xtreak
Recipients sachin, serhiy.storchaka, xtreak
Date 2018-09-14.09:30:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536917453.72.0.956365154283.issue32080@psf.upfronthosting.co.za>
In-reply-to
Content
Is it something specific to the environment? I tried the test on Ubuntu 16.04 on both master and on v3.6.3 with no errors. Maybe if you can execute the following code based on which the test is executed then it will be helpful to debug this.


import locale

foo, enc = locale.getlocale(locale.LC_CTYPE)
# Search non-ASCII letter
for i in range(128, 256):
    try:
        c = bytes([i]).decode(enc)
        sletter = c.lower()
        if sletter == c: continue
        bletter = sletter.encode(enc)
        if len(bletter) != 1: continue
        if bletter.decode(enc) != sletter: continue
        bpat = re.escape(bytes([i]))
        break
    except (UnicodeError, TypeError):
        pass
else:
    bletter = None
    bpat = b'A'
# Bytes patterns

print(bletter)
print(bpat)
print(foo)
print(enc)



Thanks
History
Date User Action Args
2018-09-14 09:30:53xtreaksetrecipients: + xtreak, serhiy.storchaka, sachin
2018-09-14 09:30:53xtreaksetmessageid: <1536917453.72.0.956365154283.issue32080@psf.upfronthosting.co.za>
2018-09-14 09:30:53xtreaklinkissue32080 messages
2018-09-14 09:30:53xtreakcreate