Skip to content

Commit

Permalink
global: make imports compatible with python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
zzacharo committed Sep 30, 2024
1 parent 3182caa commit 2626cff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion cds_dojson/marc21/fields/videos/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@

import os
import re
from collections import defaultdict
try:
from collections import defaultdict
except ImportError:
# python 3.12 has moved the collections base classes to `collections.abc` module
from collections.abc import defaultdict
from copy import deepcopy

import arrow
Expand Down
6 changes: 5 additions & 1 deletion cds_dojson/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
import functools
import json
import os
from collections import defaultdict
try:
from collections import defaultdict
except ImportError:
# python 3.12 has moved the collections base classes to `collections.abc` module
from collections.abc import defaultdict

import arrow
import six
Expand Down

0 comments on commit 2626cff

Please sign in to comment.