brainix / pottery

Redis for humans. 🌎🌍🌏
Apache License 2.0
1.08k stars 57 forks source link

PYTHONOPTIMIZE 2 is breaking import of pottery #702

Open FairyTail2000 opened 1 year ago

FairyTail2000 commented 1 year ago

Describe the bug The code crashes when importing pottery with PYTHONOPTIMIZE=2 set.

To Reproduce Steps to reproduce the behavior:

  1. import pottery
  2. set enviroment variable PYTHONOPTIMIZE=2
  3. run the script
  4. See error

Expected behavior Successful import

Environment (please complete the following information):

FairyTail2000 commented 1 year ago

Suggested patch: init.py: 36 - __description__: Final[str] = __doc__.split(sep='\n\n', maxsplit=1)[0] + __description__: Final[str] = __doc__.split(sep='\n\n', maxsplit=1)[0] if __doc__ else ''

gourneau commented 1 year ago

Some notes about PYTHONOPTIMIZE https://ziade.org/2015/11/25/should-i-use-pythonoptimize/