marrow / cinje

A Pythonic and ultra fast template engine DSL.
MIT License
33 stars 0 forks source link

Automatically register the encoding using a "pth" file. #13

Open amcgregor opened 8 years ago

amcgregor commented 8 years ago

This allows us to execute the encoding import and registration on Python startup.

An example approach can be seen in the setup.py for pytest-cov.

amcgregor commented 8 years ago

This would appear to be an anti-feature. While it does in theory provide some convenience for users of the library, the headaches involving the astoundingly stupid mechanism of pth files outweigh the benefit. Add one and the test coverage requires wrapping in a call to pytest-cov in order to capture the initial import, but only if our file is named something like zzpluralzalpha.pth in order to ensure ours sorts lexicographically after pytest.pth. Patches welcome, but I won't overly encourage this.

ionelmc commented 8 years ago

Is this „patches welcome” or „closed/nope”? Reopen if you want patches.

amcgregor commented 8 years ago

This is "patches welcome" but not "help wanted". I'm not going to encourage this kind of terribly fragile feature, but there's not much I can do to stop someone from writing it and submitting a pull request. (Pull requests are their own tickets.)