Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix deprecation warning from tomli #2576

Closed

Conversation

MarcoGorelli
Copy link
Contributor

@MarcoGorelli MarcoGorelli commented Oct 29, 2021

Description

Checklist - did you ...

  • Add a CHANGELOG entry if necessary?
  • Add / update tests if necessary?
  • Add new / update outdated documentation?

Currently, running tests shows

  /Users/marcogorelli/black-dev/venv/lib/python3.8/site-packages/tomli/_parser.py:71: DeprecationWarning: Text file object support is deprecated in favor of binary file objects. Use `open("foo.toml", "rb")` to open the file in binary mode.
    warnings.warn(

From the tomli README:

The file must be opened in binary mode (with the "rb" flag). Binary mode will enforce decoding the file as UTF-8 with universal newlines disabled, both of which are required to correctly parse TOML. Support for text file objects is deprecated for removal in the next major release.

@hukkin
Copy link
Contributor

hukkin commented Oct 29, 2021

Dupe of #2408 😺

@MarcoGorelli
Copy link
Contributor Author

didn't notice that, thanks!

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.

2 participants