Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5ab66a8

Browse filesBrowse files
basbloemsaatringofarhadthedev
authored
gh-62824: Add alias for iso-8859-8-i which is the same as iso-8859-8 (gh-134306)
Co-authored-by: David Goncalves <davegoncalves@gmail.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
1 parent 3246ea5 commit 5ab66a8
Copy full SHA for 5ab66a8

File tree

3 files changed

+11
-0
lines changed
Filter options

3 files changed

+11
-0
lines changed

‎Lib/encodings/aliases.py

Copy file name to clipboardExpand all lines: Lib/encodings/aliases.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,8 @@
405405
'iso_8859_8' : 'iso8859_8',
406406
'iso_8859_8_1988' : 'iso8859_8',
407407
'iso_ir_138' : 'iso8859_8',
408+
'iso_8859_8_i' : 'iso8859_8',
409+
'iso_8859_8_e' : 'iso8859_8',
408410

409411
# iso8859_9 codec
410412
'csisolatin5' : 'iso8859_9',

‎Lib/test/test_codecs.py

Copy file name to clipboardExpand all lines: Lib/test/test_codecs.py
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import copy
44
import io
55
import pickle
6+
import os
67
import sys
78
import unittest
89
import encodings
@@ -3107,6 +3108,13 @@ def test_aliases(self):
31073108
info = codecs.lookup(alias)
31083109
self.assertEqual(info.name, expected_name)
31093110

3111+
def test_alias_modules_exist(self):
3112+
encodings_dir = os.path.dirname(encodings.__file__)
3113+
for value in encodings.aliases.aliases.values():
3114+
codec_file = os.path.join(encodings_dir, value + ".py")
3115+
self.assertTrue(os.path.isfile(codec_file),
3116+
"Codec file not found: " + codec_file)
3117+
31103118
def test_quopri_stateless(self):
31113119
# Should encode with quotetabs=True
31123120
encoded = codecs.encode(b"space tab\teol \n", "quopri-codec")
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix aliases for ``iso8859_8`` encoding. Patch by Dave Goncalves.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.