Skip to content

Fix settings file reading method in Settings.py #350

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

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

kofm
Copy link
Contributor

@kofm kofm commented Nov 8, 2024

  • Updated method from readfp to read_file for compatibility with Python 3.
  • No change in functionality; improves code compliance with current Python standards.

Should, in part, fix #341 and #346 (notmuch python bindings shoulb be updated, too)

- Updated method from `readfp` to `read_file` for compatibility with Python 3.
- No change in functionality; improves code compliance with current Python standards.
@GuillaumeSeren
Copy link
Collaborator

Hey @kofm
thank you for this patch,

I want to source the deprecation of readfp to read_file before merging this:
https://docs.python.org/3/whatsnew/changelog.html

But I am not sure, can you point me to some official doc page about this ?

@kofm
Copy link
Contributor Author

kofm commented Mar 23, 2025

@GuillaumeSeren
Copy link
Collaborator

Yep I think this is right:

configparser.ConfigParser no longer has a readfp method. Use read_file() instead.

Copy link
Collaborator

@GuillaumeSeren GuillaumeSeren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@GuillaumeSeren GuillaumeSeren merged commit 10dcc94 into afewmail:master Mar 28, 2025
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.

Issue on python-3.12 with configparser removed from python
2 participants