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

fix __doc__ is None in optimized mode #373

Merged
merged 3 commits into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Deprecations:
Changes:
^^^^^^^^

*none*
- Fixed ``structlog`` when running in optimized mode (PYTHONOPTIMIZE=2).
Irvenae marked this conversation as resolved.
Show resolved Hide resolved


----
Expand Down
6 changes: 5 additions & 1 deletion src/structlog/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@
__version__ = "21.4.0.dev0"

__title__ = "structlog"
__description__ = __doc__.strip()
if __doc__ is None:
__description__ = ""
Irvenae marked this conversation as resolved.
Show resolved Hide resolved
else:
__description__ = __doc__.strip()

__uri__ = "https://www.structlog.org/"

__author__ = "Hynek Schlawack"
Expand Down