pottery icon indicating copy to clipboard operation
pottery copied to clipboard

PYTHONOPTIMIZE 2 is breaking import of pottery

Open FairyTail2000 opened this issue 1 year ago • 2 comments

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):

  • OS: Linux
  • Python version: 3.11.5
  • Redis version: not applicable

FairyTail2000 avatar Sep 22 '23 07:09 FairyTail2000

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 ''

FairyTail2000 avatar Sep 22 '23 07:09 FairyTail2000

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

gourneau avatar Sep 22 '23 20:09 gourneau