From: Adam T. <aa-...@us...> - 2022-01-26 00:37:11
|
--- ** [patches:#192] Codebase modernisation** **Status:** open **Group:** None **Created:** Wed Jan 26, 2022 12:37 AM UTC by Adam Turner **Last Updated:** Wed Jan 26, 2022 12:37 AM UTC **Owner:** nobody This follows on from the Python 2.x cleanup work. The total diff looks quite large, but the marjority of these are mechanical search / replace changes -- viewing by commit or in groups of commits may be best. https://github.com/AA-Turner/docutils/pull/12 // https://github.com/AA-Turner/docutils/pull/12.patch I kept things seperate so that it would be easier to extract and rebase changes that you don't want to merge (hopefully there aren't any of these!). A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2022-01-26 22:35:42
|
Thank you for the patch set. I spent the day reviewing and implementing. Not changed: * some set/dict literals where the "tratidional" form seems more clear, * error catching: here we should check for the most appropriate (sub)class to use, * deprecated and generated modules, * assignments before return, when they improve code readability. * the recommonmark test (works here as-is, fails with proposed changes) What recommonmark version do you use for the test? Which OS? --- ** [patches:#192] Codebase modernisation** **Status:** open **Group:** None **Created:** Wed Jan 26, 2022 12:37 AM UTC by Adam Turner **Last Updated:** Wed Jan 26, 2022 12:37 AM UTC **Owner:** nobody This follows on from the Python 2.x cleanup work. The total diff looks quite large, but the marjority of these are mechanical search / replace changes -- viewing by commit or in groups of commits may be best. https://github.com/AA-Turner/docutils/pull/12 // https://github.com/AA-Turner/docutils/pull/12.patch I kept things seperate so that it would be easier to extract and rebase changes that you don't want to merge (hopefully there aren't any of these!). A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Adam T. <aa-...@us...> - 2022-01-26 22:42:24
|
Thanks! I really appreciate it. > error catching: here we should check for the most appropriate (sub)class to use, OK. Python 3 did change IO and Environment errors to be identical to OSError -- but as you say the exception hierarchy was reworked so e.g. FileNotFoundError or whatever may be more appropriate. > the recommonmark test As currently it is just a no-op statement. (I don't have recommonmark set up for docutils on my laptop, which is probably why I missed that tests fail -- sorry!) Perhaps just remove? > some set/dict literals where the "tratidional" form seems more clear, OK. For html4css1 Line 159, perhaps `special_characters = _html_base.HTMLTranslator.special_characters.copy()` if you don't like the `{**...}` form? It makes that the intention is to copy much clearer. A --- ** [patches:#192] Codebase modernisation** **Status:** open **Group:** None **Created:** Wed Jan 26, 2022 12:37 AM UTC by Adam Turner **Last Updated:** Wed Jan 26, 2022 10:35 PM UTC **Owner:** nobody This follows on from the Python 2.x cleanup work. The total diff looks quite large, but the marjority of these are mechanical search / replace changes -- viewing by commit or in groups of commits may be best. https://github.com/AA-Turner/docutils/pull/12 // https://github.com/AA-Turner/docutils/pull/12.patch I kept things seperate so that it would be easier to extract and rebase changes that you don't want to merge (hopefully there aren't any of these!). A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Adam T. <aa-...@us...> - 2022-01-26 23:29:20
|
@milde I noticed you removed some extra `u` characters and some combining marks compared to my original patch. Patch to fix (along with some other things): https://github.com/AA-Turner/docutils/pull/13 // https://github.com/AA-Turner/docutils/pull/13.patch A --- ** [patches:#192] Codebase modernisation** **Status:** open **Group:** None **Created:** Wed Jan 26, 2022 12:37 AM UTC by Adam Turner **Last Updated:** Wed Jan 26, 2022 10:42 PM UTC **Owner:** nobody This follows on from the Python 2.x cleanup work. The total diff looks quite large, but the marjority of these are mechanical search / replace changes -- viewing by commit or in groups of commits may be best. https://github.com/AA-Turner/docutils/pull/12 // https://github.com/AA-Turner/docutils/pull/12.patch I kept things seperate so that it would be easier to extract and rebase changes that you don't want to merge (hopefully there aren't any of these!). A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Adam T. <aa-...@us...> - 2022-01-26 23:35:40
|
(The some other things are some str.join generator expression changes, removing one more set of parens, and the copy change above. In the str.join part, there is a redundant code block removed -- `nested_tags` is never used) --- ** [patches:#192] Codebase modernisation** **Status:** open **Group:** None **Created:** Wed Jan 26, 2022 12:37 AM UTC by Adam Turner **Last Updated:** Wed Jan 26, 2022 11:29 PM UTC **Owner:** nobody This follows on from the Python 2.x cleanup work. The total diff looks quite large, but the marjority of these are mechanical search / replace changes -- viewing by commit or in groups of commits may be best. https://github.com/AA-Turner/docutils/pull/12 // https://github.com/AA-Turner/docutils/pull/12.patch I kept things seperate so that it would be easier to extract and rebase changes that you don't want to merge (hopefully there aren't any of these!). A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2022-01-27 14:36:46
|
On 2022-01-26, Adam Turner wrote: > I noticed you removed some extra `u` characters and some > combining marks compared to my original patch. > Patch to fix (along with some other things) Thank you for the fixup. > The some other things are some str.join generator expression changes, Here, I did also some refactoring to avoid hard to read "parenthesis clusters" like ~~~ ... + % (self.name, ' < '.join((path, *(pth for pth, opt + in reversed(include_log)))))) ~~~ > removing one more set of parens In the context of keyword arguments, I prefer the parentheses over a space because of operator precedence cf https://www.python.org/dev/peps/pep-0008/#other-recommendations Thanks again. --- ** [patches:#192] Codebase modernisation** **Status:** open **Group:** None **Created:** Wed Jan 26, 2022 12:37 AM UTC by Adam Turner **Last Updated:** Wed Jan 26, 2022 11:35 PM UTC **Owner:** nobody This follows on from the Python 2.x cleanup work. The total diff looks quite large, but the marjority of these are mechanical search / replace changes -- viewing by commit or in groups of commits may be best. https://github.com/AA-Turner/docutils/pull/12 // https://github.com/AA-Turner/docutils/pull/12.patch I kept things seperate so that it would be easier to extract and rebase changes that you don't want to merge (hopefully there aren't any of these!). A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Adam T. <aa-...@us...> - 2022-01-27 17:24:28
|
> avoid hard to read "parenthesis clusters" Thanks! I tried to be as minimal as possible in the patch, agree with this change though. A --- ** [patches:#192] Codebase modernisation** **Status:** open **Group:** None **Created:** Wed Jan 26, 2022 12:37 AM UTC by Adam Turner **Last Updated:** Thu Jan 27, 2022 05:15 PM UTC **Owner:** nobody This follows on from the Python 2.x cleanup work. The total diff looks quite large, but the marjority of these are mechanical search / replace changes -- viewing by commit or in groups of commits may be best. https://github.com/AA-Turner/docutils/pull/12 // https://github.com/AA-Turner/docutils/pull/12.patch I kept things seperate so that it would be easier to extract and rebase changes that you don't want to merge (hopefully there aren't any of these!). A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2022-01-27 17:12:31
|
On 2022-01-26, Adam Turner wrote: >> error catching: here we should check for the most appropriate >> (sub)class to use, Done in [r8989]. > (I don't have recommonmark set up for docutils on my laptop, which is > probably why I missed that tests fail -- sorry!) Perhaps just remove? The recommonmark test are skipped unless a matching version is installed. They test the wrapper that normalises/fixes the doctree returned from recommonmark. IMO, we should keep the test as long as we are supporting "recommonmark" (which currently is the only compatible Markdown parser packed in Debian/stable). --- ** [patches:#192] Codebase modernisation** **Status:** open **Group:** None **Created:** Wed Jan 26, 2022 12:37 AM UTC by Adam Turner **Last Updated:** Wed Jan 26, 2022 11:35 PM UTC **Owner:** nobody This follows on from the Python 2.x cleanup work. The total diff looks quite large, but the marjority of these are mechanical search / replace changes -- viewing by commit or in groups of commits may be best. https://github.com/AA-Turner/docutils/pull/12 // https://github.com/AA-Turner/docutils/pull/12.patch I kept things seperate so that it would be easier to extract and rebase changes that you don't want to merge (hopefully there aren't any of these!). A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Adam T. <aa-...@us...> - 2022-01-27 17:15:04
|
> Perhaps just remove? Sorry, I meant remove the change I proposed! A --- ** [patches:#192] Codebase modernisation** **Status:** open **Group:** None **Created:** Wed Jan 26, 2022 12:37 AM UTC by Adam Turner **Last Updated:** Wed Jan 26, 2022 11:35 PM UTC **Owner:** nobody This follows on from the Python 2.x cleanup work. The total diff looks quite large, but the marjority of these are mechanical search / replace changes -- viewing by commit or in groups of commits may be best. https://github.com/AA-Turner/docutils/pull/12 // https://github.com/AA-Turner/docutils/pull/12.patch I kept things seperate so that it would be easier to extract and rebase changes that you don't want to merge (hopefully there aren't any of these!). A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2022-05-03 11:03:46
|
Are there possible improvements left or can we close this ticket? --- ** [patches:#192] Codebase modernisation** **Status:** open **Group:** None **Created:** Wed Jan 26, 2022 12:37 AM UTC by Adam Turner **Last Updated:** Thu Jan 27, 2022 05:24 PM UTC **Owner:** nobody This follows on from the Python 2.x cleanup work. The total diff looks quite large, but the marjority of these are mechanical search / replace changes -- viewing by commit or in groups of commits may be best. https://github.com/AA-Turner/docutils/pull/12 // https://github.com/AA-Turner/docutils/pull/12.patch I kept things seperate so that it would be easier to extract and rebase changes that you don't want to merge (hopefully there aren't any of these!). A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Adam T. <aa-...@us...> - 2022-05-03 11:14:17
|
There are always improvements! But this issue specifically about 2.7 cleanup I think can be closed. A --- ** [patches:#192] Codebase modernisation** **Status:** open **Group:** None **Created:** Wed Jan 26, 2022 12:37 AM UTC by Adam Turner **Last Updated:** Tue May 03, 2022 10:48 AM UTC **Owner:** nobody This follows on from the Python 2.x cleanup work. The total diff looks quite large, but the marjority of these are mechanical search / replace changes -- viewing by commit or in groups of commits may be best. https://github.com/AA-Turner/docutils/pull/12 // https://github.com/AA-Turner/docutils/pull/12.patch I kept things seperate so that it would be easier to extract and rebase changes that you don't want to merge (hopefully there aren't any of these!). A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Günter M. <mi...@us...> - 2022-05-10 21:07:47
|
- **status**: open --> closed-fixed - **Comment**: A large part of the proposed cleanups are now implemented. Others are outdated after the drop of 2.7 support or not agreed on. Thanks for contributing. --- ** [patches:#192] Codebase modernisation** **Status:** closed-fixed **Group:** None **Created:** Wed Jan 26, 2022 12:37 AM UTC by Adam Turner **Last Updated:** Tue May 03, 2022 11:13 AM UTC **Owner:** nobody This follows on from the Python 2.x cleanup work. The total diff looks quite large, but the marjority of these are mechanical search / replace changes -- viewing by commit or in groups of commits may be best. https://github.com/AA-Turner/docutils/pull/12 // https://github.com/AA-Turner/docutils/pull/12.patch I kept things seperate so that it would be easier to extract and rebase changes that you don't want to merge (hopefully there aren't any of these!). A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |