Skip to content

Commit

Permalink
Merge pull request #534 from gpshead/patch-1
Browse files Browse the repository at this point in the history
Only call uuid._load_system_functions() if it exists.
  • Loading branch information
bblommers authored Mar 2, 2024
2 parents 4225fba + d75458f commit 12e54da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion freezegun/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
uuid_generate_time_attr = '_uuid_generate_time'
except AttributeError:
# noinspection PyUnresolvedReferences
uuid._load_system_functions()
if hasattr(uuid, '_load_system_functions'):
# A no-op after Python ~3.9, being removed in 3.13.
uuid._load_system_functions()
# noinspection PyUnresolvedReferences
real_uuid_generate_time = uuid._generate_time_safe
uuid_generate_time_attr = '_generate_time_safe'
Expand Down

0 comments on commit 12e54da

Please sign in to comment.