Skip to content

Commit 61c4aeb

Browse files
committed
[GR-24106] Implement codecs for all Java-supported encodings
PullRequest: graalpython/1022
2 parents 33401cb + e07d12d commit 61c4aeb

17 files changed

+780
-170
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,5 @@ Python3.g4.stamp
8080
*.jfr
8181

8282
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/antlr/.antlr/
83+
graalpython/lib-python/3/test/data
84+
!graalpython/lib-python/3/test/data/README

graalpython/com.oracle.graal.python.test/src/tests/test_imports.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -145,9 +145,6 @@ def test_imp_cached_imports():
145145
spec = finder.find_spec("encodings", None)
146146
assert spec.submodule_search_locations
147147

148-
spec = finder.find_spec("encodings.utf_8", None)
149-
assert not spec.submodule_search_locations
150-
151148

152149
def test_import_package_all() :
153150
import package1
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GB18030.test_chunkcoding
2+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GB18030.test_customreplace_encode
3+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GB18030.test_incrementalencoder
4+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GB18030.test_streamwriter
5+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GB18030.test_streamwriter_reset_no_pending
6+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GB18030.test_xmlcharrefreplace
7+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GB2312.test_chunkcoding
8+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GB2312.test_incrementalencoder
9+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GB2312.test_streamwriter
10+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GB2312.test_streamwriter_reset_no_pending
11+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GBK.test_chunkcoding
12+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GBK.test_incrementalencoder
13+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GBK.test_streamwriter
14+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_GBK.test_streamwriter_reset_no_pending
15+
*graalpython.lib-python.3.test.test_codecencodings_cn.Test_HZ.test_streamwriter_reset_no_pending
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*graalpython.lib-python.3.test.test_codecencodings_hk.Test_Big5HKSCS.test_streamwriter_reset_no_pending
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1+
*graalpython.lib-python.3.test.test_codecencodings_iso2022.Test_ISO2022_JP.test_chunkcoding
2+
*graalpython.lib-python.3.test.test_codecencodings_iso2022.Test_ISO2022_JP.test_streamwriter_reset_no_pending
3+
*graalpython.lib-python.3.test.test_codecencodings_iso2022.Test_ISO2022_JP2.test_chunkcoding
4+
*graalpython.lib-python.3.test.test_codecencodings_iso2022.Test_ISO2022_JP2.test_streamwriter_reset_no_pending
15
*graalpython.lib-python.3.test.test_codecencodings_iso2022.Test_ISO2022_KR.test_chunkcoding
6+
*graalpython.lib-python.3.test.test_codecencodings_iso2022.Test_ISO2022_KR.test_streamwriter_reset_no_pending
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*graalpython.lib-python.3.test.test_codecencodings_jp.Test_CP932.test_chunkcoding
2+
*graalpython.lib-python.3.test.test_codecencodings_jp.Test_CP932.test_incrementalencoder
3+
*graalpython.lib-python.3.test.test_codecencodings_jp.Test_CP932.test_streamwriter
4+
*graalpython.lib-python.3.test.test_codecencodings_jp.Test_CP932.test_streamwriter_reset_no_pending
5+
*graalpython.lib-python.3.test.test_codecencodings_jp.Test_EUC_JP_COMPAT.test_chunkcoding
6+
*graalpython.lib-python.3.test.test_codecencodings_jp.Test_EUC_JP_COMPAT.test_incrementalencoder
7+
*graalpython.lib-python.3.test.test_codecencodings_jp.Test_EUC_JP_COMPAT.test_streamwriter
8+
*graalpython.lib-python.3.test.test_codecencodings_jp.Test_EUC_JP_COMPAT.test_streamwriter_reset_no_pending
9+
*graalpython.lib-python.3.test.test_codecencodings_jp.Test_SJISX0213.test_streamwriter_reset_no_pending
10+
*graalpython.lib-python.3.test.test_codecencodings_jp.Test_SJIS_COMPAT.test_chunkcoding
11+
*graalpython.lib-python.3.test.test_codecencodings_jp.Test_SJIS_COMPAT.test_incrementalencoder
12+
*graalpython.lib-python.3.test.test_codecencodings_jp.Test_SJIS_COMPAT.test_streamwriter
13+
*graalpython.lib-python.3.test.test_codecencodings_jp.Test_SJIS_COMPAT.test_streamwriter_reset_no_pending
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*graalpython.lib-python.3.test.test_codecencodings_kr.Test_CP949.test_streamwriter_reset_no_pending
2+
*graalpython.lib-python.3.test.test_codecencodings_kr.Test_EUCKR.test_streamwriter_reset_no_pending
3+
*graalpython.lib-python.3.test.test_codecencodings_kr.Test_JOHAB.test_chunkcoding
4+
*graalpython.lib-python.3.test.test_codecencodings_kr.Test_JOHAB.test_incrementalencoder
5+
*graalpython.lib-python.3.test.test_codecencodings_kr.Test_JOHAB.test_streamwriter
6+
*graalpython.lib-python.3.test.test_codecencodings_kr.Test_JOHAB.test_streamwriter_reset_no_pending
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*graalpython.lib-python.3.test.test_codecencodings_tw.Test_Big5.test_chunkcoding
2+
*graalpython.lib-python.3.test.test_codecencodings_tw.Test_Big5.test_incrementalencoder
3+
*graalpython.lib-python.3.test.test_codecencodings_tw.Test_Big5.test_streamwriter
4+
*graalpython.lib-python.3.test.test_codecencodings_tw.Test_Big5.test_streamwriter_reset_no_pending
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*graalpython.lib-python.3.test.test_codecmaps_cn.TestGB18030Map.test_errorhandle
22
*graalpython.lib-python.3.test.test_codecmaps_cn.TestGB18030Map.test_mapping_supplemental
33
*graalpython.lib-python.3.test.test_codecmaps_cn.TestGB2312Map.test_errorhandle
4+
*graalpython.lib-python.3.test.test_codecmaps_cn.TestGB2312Map.test_mapping_file
45
*graalpython.lib-python.3.test.test_codecmaps_cn.TestGB2312Map.test_mapping_supplemental
56
*graalpython.lib-python.3.test.test_codecmaps_cn.TestGBKMap.test_errorhandle
67
*graalpython.lib-python.3.test.test_codecmaps_cn.TestGBKMap.test_mapping_supplemental
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
*graalpython.lib-python.3.test.test_codecmaps_kr.TestCP949Map.test_errorhandle
22
*graalpython.lib-python.3.test.test_codecmaps_kr.TestCP949Map.test_mapping_supplemental
33
*graalpython.lib-python.3.test.test_codecmaps_kr.TestEUCKRMap.test_errorhandle
4+
*graalpython.lib-python.3.test.test_codecmaps_kr.TestEUCKRMap.test_mapping_file
45
*graalpython.lib-python.3.test.test_codecmaps_kr.TestEUCKRMap.test_mapping_supplemental
56
*graalpython.lib-python.3.test.test_codecmaps_kr.TestJOHABMap.test_errorhandle
7+
*graalpython.lib-python.3.test.test_codecmaps_kr.TestJOHABMap.test_mapping_file
68
*graalpython.lib-python.3.test.test_codecmaps_kr.TestJOHABMap.test_mapping_supplemental

0 commit comments

Comments
 (0)