Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PYTHONOPTIMIZE 2 is breaking import of pottery #702

Open
FairyTail2000 opened this issue Sep 22, 2023 · 2 comments
Open

PYTHONOPTIMIZE 2 is breaking import of pottery #702

FairyTail2000 opened this issue Sep 22, 2023 · 2 comments
Assignees
Labels

Comments

@FairyTail2000
Copy link

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
Copy link
Author

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

@brainix brainix self-assigned this Sep 22, 2023
@brainix brainix added the bug label Sep 22, 2023
@gourneau
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants