Bug 2368969

Summary: python-wcwidth fails to build with Python 3.14: DeprecationWarning: codecs.open() is deprecated. Use open() instead.
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-wcwidthAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aurelien, aviso, ksurma, me, mhroncok, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-wcwidth-0.2.13-11.fc43 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-05-28 15:07:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2322407    

Description Karolina Surma 2025-05-28 14:44:46 UTC
python-wcwidth fails to build with Python 3.14.0b2.

_____________________ test_recommended_emoji_zwj_sequences _____________________

    @pytest.mark.skipif(NARROW_ONLY, reason="Some sequences in text file are not compatible with 'narrow' builds")
    def test_recommended_emoji_zwj_sequences():
        """
        Test wcswidth of all of the unicode.org-published emoji-zwj-sequences.txt
        """
        # given,
>       lines, sequences = read_sequences_from_file('emoji-zwj-sequences.txt')

tests/test_emojis.py:164: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_emojis.py:149: in read_sequences_from_file
    fp = codecs.open(os.path.join(os.path.dirname(__file__), filename), 'r', encoding='utf-8')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

filename = '/builddir/build/BUILD/python-wcwidth-0.2.13-build/wcwidth-0.2.13/tests/emoji-zwj-sequences.txt'
mode = 'r', encoding = 'utf-8', errors = 'strict', buffering = -1

>   ???
E   DeprecationWarning: codecs.open() is deprecated. Use open() instead.

<frozen codecs>:916: DeprecationWarning
___________________ test_recommended_variation_16_sequences ____________________

    def test_recommended_variation_16_sequences():
        """
        Test wcswidth of all of the unicode.org-published emoji-variation-sequences.txt
        """
        # given,
>       lines, sequences = read_sequences_from_file('emoji-variation-sequences.txt')

tests/test_emojis.py:190: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_emojis.py:149: in read_sequences_from_file
    fp = codecs.open(os.path.join(os.path.dirname(__file__), filename), 'r', encoding='utf-8')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

filename = '/builddir/build/BUILD/python-wcwidth-0.2.13-build/wcwidth-0.2.13/tests/emoji-variation-sequences.txt'
mode = 'r', encoding = 'utf-8', errors = 'strict', buffering = -1

>   ???
E   DeprecationWarning: codecs.open() is deprecated. Use open() instead.

<frozen codecs>:916: DeprecationWarning
=========================== short test summary info ============================
FAILED tests/test_emojis.py::test_recommended_emoji_zwj_sequences - DeprecationWarning: codecs.open() is deprecated. Use open() instead.
FAILED tests/test_emojis.py::test_recommended_variation_16_sequences - DeprecationWarning: codecs.open() is deprecated. Use open() instead.
=================== 2 failed, 36 passed, 1 skipped in 0.15s ====================

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14-b1/fedora-rawhide-x86_64/09093401-python-wcwidth/

For all our attempts to build python-wcwidth with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14-b1/package/python-wcwidth/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14-b1/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.