Skip to content

Commit 2d366e9

Browse files
mitsuhikomattrobenolt
authored andcommitted
Merge pull request #3788 from getsentry/bugfix/date-concurrency
Workaround for a concurrency bug with date parsing
1 parent 9486d13 commit 2d366e9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/sentry/runner/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@
1111
import click
1212
import sys
1313
import sentry
14+
import datetime
1415
from sentry.utils.imports import import_string
1516

17+
18+
# We need to run this here because of a concurrency bug in Python's locale
19+
# with the lazy initialization.
20+
datetime.datetime.strptime('', '')
21+
1622
# Parse out a pretty version for use with --version
1723
if sentry.__build__ is None:
1824
version_string = sentry.VERSION

src/sentry/wsgi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import os.path
1212
import sys
1313

14+
1415
# Add the project to the python path
1516
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
1617

0 commit comments

Comments
 (0)