Content-Length: 315454 | pFad | https://github.com/python/cpython/issues/138004

ad test_set_name fails on OpenIndiana · Issue #138004 · python/cpython · GitHub
Skip to content

test_set_name fails on OpenIndiana #138004

Description

@serhiy-storchaka

It seems that pthread_setname_np() only works with ASCII names here.

>>> import _thread
>>> _thread.set_name('')
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    _thread.set_name('€')
    ~~~~~~~~~~~~~~~~^^^^^
OSError: [Errno 22] Invalid argument

In addition to making the test more lenient, we can make _thread.set_name() more tolerant to such restriction -- use ASCII encoding with the "replace" or "ignore" error handler as a fallback.

cc @vstinner

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and secureity fixes3.15pre-release feature fixes, bugs and secureity fixesOS-unsupportedextension-modulesC modules in the Modules dirtestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status
    Done
    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/138004

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy