Skip to content

Commit

Permalink
python 3.10: fix Mapping imports
Browse files Browse the repository at this point in the history
  • Loading branch information
RayPlante committed Jun 22, 2024
1 parent be57f55 commit 117c199
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 11 deletions.
3 changes: 2 additions & 1 deletion python/nistoar/doi/datacite.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
DataCite services.
"""
import re
from collections import OrderedDict, Mapping
from collections import OrderedDict
from collections.abc import Mapping
from copy import deepcopy
from io import StringIO
import requests
Expand Down
3 changes: 2 additions & 1 deletion python/nistoar/id/persist.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
locking to prevent two processes from acquiring the same ID.
"""
import os, logging, json
from collections import Mapping
from collections import OrderedDict
from collections.abc import Mapping
from copy import deepcopy
from .minter import IDRegistry, IDMinter, NoidMinter, NIST_ARK_NAAN
import pynoid as noid, filelock
Expand Down
3 changes: 2 additions & 1 deletion python/nistoar/nerdm/convert/latest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
Module for converting a NERDm record to the latest schema versions.
"""
import re
from collections import OrderedDict, Mapping
from collections import OrderedDict
from collections.abc import Mapping
from copy import deepcopy
from urllib.parse import urlparse

Expand Down
3 changes: 2 additions & 1 deletion python/nistoar/nerdm/convert/pod.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
Classes and functions for converting from and to the NERDm schema
"""
import os, json, re
from collections import OrderedDict, Mapping
from collections import OrderedDict
from collections.abc import Mapping

from ... import jq
from ...doi import resolve, is_DOI
Expand Down
3 changes: 2 additions & 1 deletion python/nistoar/nerdm/convert/rmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
as a version-specific ID.
"""
import re
from collections import OrderedDict, Mapping
from collections import OrderedDict
from collections.abc import Mapping
from urllib.parse import urljoin
from copy import deepcopy

Expand Down
3 changes: 2 additions & 1 deletion python/nistoar/nerdm/validate.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""
tools for validating NERDm metadata
"""
from collections import Mapping
from collections import OrderedDict
from collections.abc import Mapping

import ejsonschema as ejs
from ejsonschema import ValidationError, RefResolutionError
Expand Down
3 changes: 2 additions & 1 deletion python/nistoar/rmm/mongo/nerdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"""
# import pandas as pd
import json, os, sys, warnings
from collections import Mapping
from collections import OrderedDict
from collections.abc import Mapping

from .loader import (Loader, RecordIngestError, JSONEncodingError,
UpdateWarning, LoadLog)
Expand Down
2 changes: 1 addition & 1 deletion python/tests/nistoar/doi/resolving/test_crossref.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os, sys, pdb, shutil, logging, json
import unittest as test
from collections import Mapping
from collections.abc import Mapping
# from nistoar.tests import *

import nistoar.doi.resolving.crossref as res
Expand Down
2 changes: 1 addition & 1 deletion python/tests/nistoar/doi/resolving/test_datacite.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os, sys, pdb, shutil, logging, json
import unittest as test
from collections import Mapping
from collections.abc import Mapping
# from nistoar.tests import *

import nistoar.doi.resolving.datacite as res
Expand Down
3 changes: 2 additions & 1 deletion python/tests/nistoar/doi/sim_datacite_srv.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import json, os, sys, re, hashlib, json, logging, random
from datetime import datetime
from wsgiref.headers import Headers
from collections import OrderedDict, Mapping
from collections import OrderedDict
from collections.abc import Mapping
from copy import deepcopy
from urllib.parse import parse_qs

Expand Down
2 changes: 1 addition & 1 deletion python/tests/nistoar/nerdm/test_validate.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest, pdb, os, json
from collections import Mapping
from collections.abc import Mapping

import ejsonschema as ejs

Expand Down

0 comments on commit 117c199

Please sign in to comment.