Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  Under GraalPy, accessing Response.apparent_encoding may raise LookupError due 
to missing _codecs_jp backend for the euc_jis_2004 codec. This is an 
interpreter-specific limitation: the codec module encodings.euc_jis_2004 
exists, but its native backend is not implemented in GraalPy. CPython fully 
supports euc_jis_2004, which is why the test passes there, but GraalPy fails 
when charset detection probes multibyte encodings. To keep the test suite 
robust across interpreters, access to apparent_encoding must be guarded or 
skipped under GraalPy.
  
    ____________ CharsetTestCase.test_invalid_charset (charset='utf16') 
____________
    
../../../hostedtoolcache/GraalPy/24.1.2/arm64/lib/python3.11/importlib/__init__.py:211:
 in import_module
        ???
    
../../../hostedtoolcache/GraalPy/24.1.2/arm64/lib/python3.11/site-packages/charset_normalizer/utils.py:259:
 in is_multi_byte_encoding
        importlib.import_module("encodings.{}".format(name)).IncrementalDecoder,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
../../../hostedtoolcache/GraalPy/24.1.2/arm64/lib/python3.11/importlib/__init__.py:126:
 in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 
    
        #
        # euc_jis_2004.py: Python Unicode Codec for EUC_JIS_2004
        #
        # Written by Hye-Shik Chang <[email protected]>
        #
        
        import _codecs_jp, codecs
        import _multibytecodec as mbc
        
    >   codec = _codecs_jp.getcodec('euc_jis_2004')
        
        class Codec(codecs.Codec):
            encode = codec.encode
            decode = codec.decode
        
        class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
                                 codecs.IncrementalEncoder):
            codec = codec
        
        class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
                                 codecs.IncrementalDecoder):
            codec = codec
        
        class StreamReader(Codec, mbc.MultibyteStreamReader, 
codecs.StreamReader):
            codec = codec
        class StreamReader(Codec, mbc.MultibyteStreamReader, 
codecs.StreamReader):
            codec = codec
        
        class StreamWriter(Codec, mbc.MultibyteStreamWriter, 
codecs.StreamWriter):
            codec = codec
        
        def getregentry():
            return codecs.CodecInfo(
                name='euc_jis_2004',
                encode=Codec().encode,
                decode=Codec().decode,
                incrementalencoder=IncrementalEncoder,
                incrementaldecoder=IncrementalDecoder,
                streamreader=StreamReader,
                streamwriter=StreamWriter,
    E           LookupError: no such codec is supported.
    
    
../../../hostedtoolcache/GraalPy/24.1.2/arm64/lib/python3.11/encodings/euc_jis_2004.py:10:
 LookupError

TASK DETAIL
  https://phabricator.wikimedia.org/T414220

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to