-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
Fixed writer_name deprecation warning in docutils 0.22+. #19684
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Perfect timing 🎯
From the release notes:
Remove the "reader_name", "parser_name", and "writer_name" arguments of core.Publisher.init() and the core.publish_*() convenience functions as well as the "parser_name" argument of Reader.init() in Docutils 2.0. Since Docutils 0.22, you may use "reader", "parser", and "writer" arguments for component names as well as instances.
I initially merged this and backported it to 5.2.x to avoid test failures (or any issues) with docutils 0.22+, since we do not currently pin the dependency beyond requiring 0.19 or higher. However, after a closer look, this is actually a backward incompatible change for 5.2.x — docutils < 0.22 does not support this usage and breaks as a result. To address this, I’m proposing PR #19690, which ensures the docutils.core.publish_parts call works across versions 0.19 through 0.22+ without raising errors. I think we should consider applying this to main (possibly targeting main first and then backporting it), which would allow us to maintain compatibility without needing to bump the minimum docutils version to 0.22+ for Django 6.0 (i.e. we would not need to land PR #19686 for now, IMHO). @felixxm @sarahboyce do you have a preference? |
I created ticket-36535 to keep track of this issue. |
I missed this, sorry. I can fix it if you want. |
Personally, I'd not bother about the |
No worries! I think I have a PR with a fix: #19690 The question is whether we want to target |
Ok, this is a fair point and we may avoid future headaches by bumping minimum supported version to 0.22 on 6.0 and above. Let's keep the other PR targeting 5.2.x only. |
https://pypi.org/project/docutils/0.22/