Skip to content

Commit

Permalink
fixing for 3.12 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ampledata committed Jun 20, 2024
1 parent 19e511d commit e2e346a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
7 changes: 3 additions & 4 deletions aiscot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# limitations under the License.
#

"""AISCOT: AIS to TAK Gateway - Display Ships in TAK."""
"""AISCOT: Display Ships in TAK - AIS to TAK Gateway"""

__version__ = "6.0.0-beta1"

Expand All @@ -40,8 +40,7 @@
from .ais_functions import get_known_craft

from .classes import AISWorker
except ImportError as exc:
except ImportError:
import warnings

warnings.warn(str(exc))
warnings.warn("Ignoring ImportError - Python 3.6 compat work-around.")
warnings.warn("COMPAT: Python 3.6. Ignoring ImportError.")
12 changes: 7 additions & 5 deletions aiscot/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@

import logging
import os
import pkg_resources

try:
from pkg_resources import resource_filename as find
except ImportError:
from importlib.resources import files as find


if bool(os.environ.get("DEBUG")):
Expand All @@ -46,11 +50,9 @@

DEFAULT_POLL_INTERVAL: int = 61

DEFAULT_MID_DB_FILE = pkg_resources.resource_filename(
DEFAULT_MID_DB_FILE = find(
__name__,
"data/MaritimeIdentificationDigits-bb62983a-cf0e-40a1-9431-cd54eaeb1c85.csv",
)

DEFAULT_SHIP_DB_FILE = pkg_resources.resource_filename(
__name__, "data/yadd_mmsi_ship_2023-02-11-001541.txt"
)
DEFAULT_SHIP_DB_FILE = find(__name__, "data/yadd_mmsi_ship_2023-02-11-001541.txt")
1 change: 0 additions & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ pytest-cov
pylint
flake8
black
pkg_resources
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ test =
pylint
flake8
black
pkg_resources
[isort]
profile = black

Expand Down

0 comments on commit e2e346a

Please sign in to comment.