Skip to content

Deprecation Warnings using Python 3.14 #199

@bedwards254

Description

@bedwards254

Hello,

I keep getting these deprecation warnings at the end creating a bag using Python 3.14 - it doesn't seem to break anything but wanted to make sure it was noted in case it does start to.

C:\Users\[user]\AppData\Roaming\Python\Python314\site-packages\bagit.py:1255: DeprecationWarning: codecs.open() is deprecated. Use open() instead. with open_text_file(manifest_filename, "w", encoding=encoding) as manifest:
2026-03-03 12:07:49,077 - INFO - Creating bagit.txt C:\Users\[user]\AppData\Roaming\Python\Python314\site-packages\bagit.py:244: DeprecationWarning: codecs.open() is deprecated. Use open() instead. with open_text_file("bagit.txt", "w") as bagit_file:
2026-03-03 12:07:49,103 - INFO - Creating bag-info.txt C:\Users\[user]\AppData\Roaming\Python\Python314\site-packages\bagit.py:1214: DeprecationWarning: codecs.open() is deprecated. Use open() instead. with open_text_file(bag_info_path, "w") as f: 2026-03-03 12:07:49,126 - INFO - Creating [path]\tagmanifest-md5.txt
C:\Users\[user]\AppData\Roaming\Python\Python314\site-packages\bagit.py:1295: DeprecationWarning: codecs.open() is deprecated. Use open() instead. with open_text_file(
C:\Users\[user]\AppData\Roaming\Python\Python314\site-packages\bagit.py:1152: DeprecationWarning: codecs.open() is deprecated. Use open() instead. with open_text_file(tag_file_name, "r", encoding=encoding) as tag_file:
C:\Users\[user]\AppData\Roaming\Python\Python314\site-packages\bagit.py:641: DeprecationWarning: codecs.open() is deprecated. Use open() instead. with open_text_file(

I also get these warnings when I validate a bag (can put as a separate issue if needed!):

C:\Users\[user]\AppData\Roaming\Python\Python314\site-packages\bagit.py:1152: DeprecationWarning: codecs.open() is deprecated. Use open() instead. with open_text_file(tag_file_name, "r", encoding=encoding) as tag_file:
C:\Users\[user]\AppData\Roaming\Python\Python314\site-packages\bagit.py:641: DeprecationWarning: codecs.open() is deprecated. Use open() instead. with open_text_file(
C:\Users\[user]\AppData\Roaming\Python\Python314\site-packages\bagit.py:1412: DeprecationWarning: 'count' is passed as positional argument s = re.sub(r"%0D", "\r", s, re.IGNORECASE)
C:\Users\[user]\AppData\Roaming\Python\Python314\site-packages\bagit.py:1413: DeprecationWarning: 'count' is passed as positional argument s = re.sub(r"%0A", "\n", s, re.IGNORECASE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions