当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
25 Star 1 Fork 13

src-openEuler / python2
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bugfix-test_locale-and-test_codecs.patch 1.67 KB
一键复制 编辑 原始数据 按行查看 历史
syyhao 提交于 2019-12-25 18:38 . fix some CVE and update spec
diff -uNrp a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
--- a/Lib/test/test_codecs.py 2019-12-21 15:08:05.068000000 +0800
+++ b/Lib/test/test_codecs.py 2019-12-21 15:17:35.536000000 +0800
@@ -1427,7 +1427,7 @@ class CodecsModuleTest(unittest.TestCase
def test_lookup_issue1813(self):
# Issue #1813: under Turkish locales, lookup of some codecs failed
# because 'I' is lowercased as a dotless "i"
- oldlocale = locale.getlocale(locale.LC_CTYPE)
+ oldlocale = locale.setlocale(locale.LC_CTYPE)
self.addCleanup(locale.setlocale, locale.LC_CTYPE, oldlocale)
try:
locale.setlocale(locale.LC_CTYPE, 'tr_TR')
diff -uNrp a/Lib/test/test_locale.py b/Lib/test/test_locale.py
--- a/Lib/test/test_locale.py 2019-12-21 15:08:05.060000000 +0800
+++ b/Lib/test/test_locale.py 2019-12-21 15:19:01.140000000 +0800
@@ -469,7 +469,7 @@ class TestMiscellaneous(unittest.TestCas
def test_getsetlocale_issue1813(self):
# Issue #1813: setting and getting the locale under a Turkish locale
- oldlocale = locale.getlocale()
+ oldlocale = locale.setlocale(locale.LC_CTYPE)
self.addCleanup(locale.setlocale, locale.LC_CTYPE, oldlocale)
for loc in ('tr_TR', 'tr_TR.UTF-8', 'tr_TR.ISO8859-9'):
try:
@@ -494,7 +494,7 @@ class TestMiscellaneous(unittest.TestCas
self.assertEqual(locale.normalize(u'en_US'), 'en_US.ISO8859-1')
def test_setlocale_unicode(self):
- oldlocale = locale.getlocale()
+ oldlocale = locale.setlocale(locale.LC_CTYPE)
self.addCleanup(locale.setlocale, locale.LC_CTYPE, oldlocale)
user_locale = locale.setlocale(locale.LC_CTYPE, '')
1
https://gitee.com/src-openeuler/python2.git
git@gitee.com:src-openeuler/python2.git
src-openeuler
python2
python2
master

搜索帮助