Loading changelog.txt +8 −0 Original line number Diff line number Diff line Changelog ========= 0.6.1 (Pending) -------------- - Fix crash in Python 3.12.4 trying to change which character set to use reading a file/stream that does not support the reconfigure() method. Typical error message `'_io.StringIO' object has no attribute 'reconfigure'` 0.6.0 (2024-05-05) -------------- - Remove support for Python 3.8 Loading python_ags4/AGS4.py +2 −2 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ def AGS4_to_dict(filepath_or_buffer, encoding='utf-8', get_line_numbers=False, r if _is_file_like(filepath_or_buffer): f = filepath_or_buffer f.seek(0) if hasattr(f, 'encoding') and getattr(f, 'encoding', None) != encoding: if hasattr(f, 'encoding') and getattr(f, 'encoding', None) != encoding and hasattr(f, 'reconfigure'): f.reconfigure(encoding=encoding) close_file = False else: Loading Loading @@ -726,7 +726,7 @@ def check_file(filepath_or_buffer, standard_AGS4_dictionary=None, rename_duplica if _is_file_like(filepath_or_buffer): f = filepath_or_buffer f.seek(0) if hasattr(f, 'encoding') and getattr(f, 'encoding', None) != encoding: if hasattr(f, 'encoding') and getattr(f, 'encoding', None) != encoding and hasattr(f, 'reconfigure'): f.reconfigure(encoding=encoding) close_file = False else: Loading Loading
changelog.txt +8 −0 Original line number Diff line number Diff line Changelog ========= 0.6.1 (Pending) -------------- - Fix crash in Python 3.12.4 trying to change which character set to use reading a file/stream that does not support the reconfigure() method. Typical error message `'_io.StringIO' object has no attribute 'reconfigure'` 0.6.0 (2024-05-05) -------------- - Remove support for Python 3.8 Loading
python_ags4/AGS4.py +2 −2 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ def AGS4_to_dict(filepath_or_buffer, encoding='utf-8', get_line_numbers=False, r if _is_file_like(filepath_or_buffer): f = filepath_or_buffer f.seek(0) if hasattr(f, 'encoding') and getattr(f, 'encoding', None) != encoding: if hasattr(f, 'encoding') and getattr(f, 'encoding', None) != encoding and hasattr(f, 'reconfigure'): f.reconfigure(encoding=encoding) close_file = False else: Loading Loading @@ -726,7 +726,7 @@ def check_file(filepath_or_buffer, standard_AGS4_dictionary=None, rename_duplica if _is_file_like(filepath_or_buffer): f = filepath_or_buffer f.seek(0) if hasattr(f, 'encoding') and getattr(f, 'encoding', None) != encoding: if hasattr(f, 'encoding') and getattr(f, 'encoding', None) != encoding and hasattr(f, 'reconfigure'): f.reconfigure(encoding=encoding) close_file = False else: Loading