Skip to content

Replace deprecated codecs.open() - #29

Open
grosscol wants to merge 1 commit into
mdomke:mainfrom
grosscol:patch-1
Open

Replace deprecated codecs.open()#29
grosscol wants to merge 1 commit into
mdomke:mainfrom
grosscol:patch-1

Conversation

@grosscol

@grosscol grosscol commented Aug 4, 2026

Copy link
Copy Markdown

Correct warnings generated when reading fixtures using python 3.13 and above. Specifically, pytest summaries will include text such as this:

  /home/grosscol/miniconda3/envs/bravo/lib/python3.14/site-packages/pytest_mongodb/plugin.py:115: DeprecationWarning: codecs.open() is deprecated. Use open() instead.                                                                                                                  
    with codecs.open(path, encoding="utf-8") as fp:

The originating issue from cpython where codecs.open() was deprecated is: python/cpython#133036.

Since pytest-mongodb is using keyword args to being with for this call, there are no argument ordering problems with this change.

Correct warnings generated when reading fixtures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant