Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re locale test fails after installing Python 3.6.3 on ubuntu 16.04 #76261

Closed
sachin mannequin opened this issue Nov 20, 2017 · 4 comments
Closed

Re locale test fails after installing Python 3.6.3 on ubuntu 16.04 #76261

sachin mannequin opened this issue Nov 20, 2017 · 4 comments
Labels
stdlib Python modules in the Lib dir topic-installation type-bug An unexpected behavior, bug, or error

Comments

@sachin
Copy link
Mannequin

sachin mannequin commented Nov 20, 2017

BPO 32080
Nosy @vstinner, @serhiy-storchaka, @tirkarthi
Superseder
  • bpo-29571: test_re is failing when local is set for en_IN
  • Files
  • test.Screenshot from 2017-11-20 11-12-41.png
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-10-24.10:46:11.295>
    created_at = <Date 2017-11-20.06:05:49.978>
    labels = ['library', 'type-bug', 'expert-installation']
    title = 'Re locale test fails after installing Python 3.6.3 on ubuntu 16.04'
    updated_at = <Date 2019-10-24.10:46:11.293>
    user = 'https://bugs.python.org/sachin'

    bugs.python.org fields:

    activity = <Date 2019-10-24.10:46:11.293>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-10-24.10:46:11.295>
    closer = 'vstinner'
    components = ['Installation', 'Library (Lib)']
    creation = <Date 2017-11-20.06:05:49.978>
    creator = 'sachin'
    dependencies = []
    files = ['47277']
    hgrepos = []
    issue_num = 32080
    keywords = []
    message_count = 4.0
    messages = ['306529', '325337', '355306', '355324']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'serhiy.storchaka', 'sachin', 'xtreak']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = '29571'
    type = 'behavior'
    url = 'https://bugs.python.org/issue32080'
    versions = ['Python 3.6']

    @sachin
    Copy link
    Mannequin Author

    sachin mannequin commented Nov 20, 2017

    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

    @sachin sachin mannequin added performance Performance or resource usage topic-2to3 labels Nov 20, 2017
    @terryjreedy terryjreedy added topic-installation stdlib Python modules in the Lib dir and removed topic-2to3 labels Nov 24, 2017
    @terryjreedy terryjreedy changed the title Error Installing Python 3.6.3 on ubuntu 16.04 Re locale test fails after installing Python 3.6.3 on ubuntu 16.04 Nov 24, 2017
    @terryjreedy terryjreedy added type-bug An unexpected behavior, bug, or error and removed performance Performance or resource usage labels Nov 24, 2017
    @tirkarthi
    Copy link
    Member

    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

    @tirkarthi
    Copy link
    Member

    Looking at the traceback in the screenshot this seems to be same as bpo-29571 happening on en_IN locale.

    @vstinner
    Copy link
    Member

    Yeah, that's a duplicate of bpo-29571 which has been fixed by:

    New changeset 279657b by Victor Stinner in branch '3.7':
    [3.7] bpo-29571: Fix test_re.test_locale_flag() (GH-12178)
    279657b

    Python 3.7.3 and newer include my fix.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir topic-installation type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants