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.

classification
标题: Re locale test fails after installing Python 3.6.3 on ubuntu 16.04
类型: behavior Stage: resolved
Components: Installation, Library (Lib) Versions: Python 3.6
process
状态: closed Resolution: fixed
Dependencies: 后续: test_re is failing when local is set for `en_IN`
View: 29571
分配给: 抄送列表: sachin, serhiy.storchaka, vstinner, xtreak
优先级: normal 关键字:

Created on 2017-11-20 06:05 by sachin, last changed 2022-04-11 14:58 by admin. This issue is now closed.

文件
文件名 上传时间 Description 编辑
test.Screenshot from 2017-11-20 11-12-41.png sachin, 2017-11-20 06:05
Messages (4)
msg306529 - (view) Author: Sachin Pathave (sachin) * 日期: 2017-11-20 06:05
test failed when I run command $make test
FAILED (failures=1, skipped=1)
test test_re failed
2 tests failed again:
    test_re test_venv
msg325337 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) 日期: 2018-09-14 09:30
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
msg355306 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) 日期: 2019-10-24 09:09
Looking at the traceback in the screenshot this seems to be same as issue29571 happening on en_IN locale.
msg355324 - (view) Author: STINNER Victor (vstinner) * (Python committer) 日期: 2019-10-24 10:46
Yeah, that's a duplicate of bpo-29571 which has been fixed by:

New changeset 279657bac2856039ba422c18a3d7f227b455e9d6 by Victor Stinner in branch '3.7':
[3.7] bpo-29571: Fix test_re.test_locale_flag() (GH-12178)
https://github.com/python/cpython/commit/279657bac2856039ba422c18a3d7f227b455e9d6

Python 3.7.3 and newer include my fix.
历史
日期 用户 动作 参数
2022-04-11 14:58:54admin修改github: 76261
2019-10-24 10:46:11vstinner修改状态: open -> closed
后续: test_re is failing when local is set for `en_IN`
消息: + msg355324

resolution: fixed
stage: resolved
2019-10-24 09:09:30xtreak修改抄送: + vstinner
消息: + msg355306
2018-09-14 09:30:53xtreak修改抄送: + xtreak
消息: + msg325337
2017-11-24 19:31:55terry.reedy修改抄送: + serhiy.storchaka

type: resource usage -> behavior
components: + Installation, Library (Lib), - 2to3 (2.x to 3.x conversion tool)
标题: Error Installing Python 3.6.3 on ubuntu 16.04 -> Re locale test fails after installing Python 3.6.3 on ubuntu 16.04
2017-11-20 06:05:49sachin创建