thesimj / envyaml

Simple YAML configuration file parser
MIT License
78 stars 21 forks source link

Fix support for case-insensitive environment variables on Windows #49

Closed barneygale closed 1 year ago

barneygale commented 1 year ago

Ensure variable lookups hit os.environ itself, rather than a dict copy

Fixes #47

barneygale commented 1 year ago

Note that ChainMap was added in Python 3.3, but the metadata for this package suggests it still supports Python 2.7. I wonder if dropping Python 2 support in EnvYAML would be advisable?

barneygale commented 1 year ago

Hey @thesimj, sorry to bother, would you be willing to review this and put out a new release if it looks good? Thank you!

thesimj commented 1 year ago

Hey @barneygale thanks for your contribution and commitment, but I think inserting case-insensitive environment variables could be dangerous for users. This could lead to unpredictable behaviors in env vars settings and other things we need to drop support for Python 2.7 (and we should drop it at some point).

barneygale commented 1 year ago

Do you consider os.environ dangerous and unpredictable? :/