From: Waylan L. <way...@ic...> - 2014-08-22 20:29:01
|
While we're talking about deprecating things related to extensions, I would like to deprecate support for the `mdx_*` naming convention of third party extensions. I updated the docs [over a year ago][1] suggesting that this might happen. As we support passing in instances of extension classes and strings using dot notation, I don't see any reason to keep this around except that some existing third party exceptions still use it. Although, the ones that do appear to not be regularly maintained which suggests they are not too popular. Any objections? And while I have your attention, I have also considered deprecating the special treatment of the included extensions. In order words, one would need to do `extensions=['markdown.extensions.extra']` (which has worked for some time, btw) rather than `extensions=['extra']. However, I feel less strongly about this and I realize that this would require almost all our users to change their code upon updating. Perhaps it would be sufficient to change the docs so that any mention of the special treatment is omitted (the docs would suggest that all 'named extensions' would use dot notation). Any thoughts? Waylan Limberg [1]: https://github.com/waylan/Python-Markdown/commit/8aa2fc7b5138fd97ded7dd1e70103532a9fd6583 |
From: Frederik D. <fd...@gm...> - 2014-08-22 21:43:59
|
> I would like to deprecate support for the `mdx_*` naming convention Sounds like a good idea to me - though I'm not sure I'm qualified to assess that. (My only extension is [Markdown Checklist].) > I have also considered deprecating the special treatment of the > included extensions. I'd very much welcome that as well. > this would require almost all our users to change their code In that case, allow me to suggest an alternative approach: If there was an explicit designation-package mapping for shortcuts (QName[^1]-style), the core extensions could continue to be used just as they are now without the need for special treatment within the code base. That is, the default mapping might look like this: { # designation: package reference 'extra': 'markdown.extensions.extra', 'wikilinks': 'markdown.extensions.wikilinks', ... } Thus `extensions=['extra']` would resolve - via mechanisms yet to be determined[^2] - to `extensions=['markdown.extensions.extra']`. This also seems to go well with the YAML/JSON config file suggested in the adjacent thread. (Note that it's been a while since I've dug into the source, so this proposal might not be practical for one reason or another.) [^1]: http://en.wikipedia.org/wiki/QName [^2]: it might be as simple as prefixing designations with a colon to allow for dotless package references - or, even simpler (for users anyway), use the mapping only if the respective designation cannot be imported [Markdown Checklist]: https://github.com/FND/markdown-checklist |
From: Dave P. <dav...@gm...> - 2014-08-23 06:57:55
|
No objection to either proposal. Uniformity and extensibility are good. Is there an 'ideas bucket' for future changes please? regards Dave P On 22 August 2014 21:28, Waylan Limberg <way...@ic...> wrote: > While we're talking about deprecating things related to extensions, I would > like to deprecate support for the `mdx_*` naming convention of third party > extensions. I updated the docs [over a year ago][1] suggesting that this > might happen. As we support passing in instances of extension classes and > strings using dot notation, I don't see any reason to keep this around > except that some existing third party exceptions still use it. Although, the > ones that do appear to not be regularly maintained which suggests they are > not too popular. > > Any objections? > > And while I have your attention, I have also considered deprecating the > special treatment of the included extensions. In order words, one would need > to do `extensions=['markdown.extensions.extra']` (which has worked for some > time, btw) rather than `extensions=['extra']. However, I feel less strongly > about this and I realize that this would require almost all our users to > change their code upon updating. Perhaps it would be sufficient to change > the docs so that any mention of the special treatment is omitted (the docs > would suggest that all 'named extensions' would use dot notation). Any > thoughts? > > Waylan Limberg > > > [1]: > https://github.com/waylan/Python-Markdown/commit/8aa2fc7b5138fd97ded7dd1e70103532a9fd6583 > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk |
From: Waylan L. <way...@ic...> - 2014-08-23 23:16:45
|
-----Original Message----- From: Dave Pawson [mailto:dav...@gm...] Sent: Saturday, August 23, 2014 2:49 AM To: Waylan Limberg Cc: python-markdown-discuss Subject: Re: [Python-markdown-discuss] Also Deprecating mdx_* extension names? > No objection to either proposal. Uniformity and extensibility are good. Thanks for the feedback. > Is there an 'ideas bucket' for future changes please? This list is a good place to start. And github [1] issues and pull requests provide a good way to file a request where it will be easily found again. Of course, I prefer to keep github for actionable items, so if you just want to discuss possibilities, then this list really is the best place. Waylan Limberg [1]: http:/github.com/waylan/Python-Markdown/ |