Skip to content

Commit

Permalink
walk back deprecation change
Browse files Browse the repository at this point in the history
  • Loading branch information
mbridak committed Nov 16, 2023
1 parent f5abb86 commit 6898276
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 22 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ I wish to thank those who've contributed to the project.

## Recent Changes

- [23-11-15.1] Replacing the depricated function turned out to be a poor decision.
- [23-11-15] Started working on Winter Field Day. (It doesn't work yet)
- [23-11-14] Removed depricated pkgutil.get_loader, Lets see what breaks.
- [23-11-13] Changed check_process() to only return True if python opened source file. Allows emacs to edit source file.
Expand Down
8 changes: 4 additions & 4 deletions not1mm/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import logging
import os

# import pkgutil
import pkgutil
import platform
import re
import socket
Expand Down Expand Up @@ -62,9 +62,9 @@
from not1mm.lib.versiontest import VersionTest

# DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14
# loader = pkgutil.get_loader("not1mm")
# WORKING_PATH = os.path.dirname(loader.get_filename())
WORKING_PATH = os.path.dirname(__loader__.get_filename())
loader = pkgutil.get_loader("not1mm")
WORKING_PATH = os.path.dirname(loader.get_filename())
# WORKING_PATH = os.path.dirname(__loader__.get_filename())

DATA_PATH = os.environ.get("XDG_DATA_HOME", str(Path.home() / ".local" / "share"))
DATA_PATH += "/not1mm"
Expand Down
8 changes: 4 additions & 4 deletions not1mm/bandmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import logging
import os

# import pkgutil
import pkgutil
import platform
import sys
import sqlite3
Expand All @@ -30,9 +30,9 @@
UPDATE_INTERVAL = 2000

# DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14
# loader = pkgutil.get_loader("not1mm")
# WORKING_PATH = os.path.dirname(loader.get_filename())
WORKING_PATH = os.path.dirname(__loader__.get_filename())
loader = pkgutil.get_loader("not1mm")
WORKING_PATH = os.path.dirname(loader.get_filename())
# WORKING_PATH = os.path.dirname(__loader__.get_filename())

if "XDG_DATA_HOME" in os.environ:
DATA_PATH = os.environ.get("XDG_DATA_HOME")
Expand Down
8 changes: 4 additions & 4 deletions not1mm/checkwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import logging

# import pkgutil
import pkgutil
import platform
import queue
import os
Expand All @@ -28,9 +28,9 @@
os.environ["QT_QPA_PLATFORMTHEME"] = "gnome"

# DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14
# loader = pkgutil.get_loader("not1mm")
# WORKING_PATH = os.path.dirname(loader.get_filename())
WORKING_PATH = os.path.dirname(__loader__.get_filename())
loader = pkgutil.get_loader("not1mm")
WORKING_PATH = os.path.dirname(loader.get_filename())
# WORKING_PATH = os.path.dirname(__loader__.get_filename())

if "XDG_DATA_HOME" in os.environ:
DATA_PATH = os.environ.get("XDG_DATA_HOME")
Expand Down
2 changes: 1 addition & 1 deletion not1mm/lib/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""It's the version"""
__version__ = "23.11.15"
__version__ = "23.11.15.1"
8 changes: 4 additions & 4 deletions not1mm/logwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import math
import os

# import pkgutil
import pkgutil
import platform
import queue
import sys
Expand All @@ -30,9 +30,9 @@
os.environ["QT_QPA_PLATFORMTHEME"] = "gnome"

# DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14
# loader = pkgutil.get_loader("not1mm")
# WORKING_PATH = os.path.dirname(loader.get_filename())
WORKING_PATH = os.path.dirname(__loader__.get_filename())
loader = pkgutil.get_loader("not1mm")
WORKING_PATH = os.path.dirname(loader.get_filename())
# WORKING_PATH = os.path.dirname(__loader__.get_filename())

if "XDG_DATA_HOME" in os.environ:
DATA_PATH = os.environ.get("XDG_DATA_HOME")
Expand Down
8 changes: 4 additions & 4 deletions not1mm/vfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import os

# import pkgutil
import pkgutil
import platform
import queue
import sys
Expand All @@ -29,9 +29,9 @@
os.environ["QT_QPA_PLATFORMTHEME"] = "gnome"

# DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14
# loader = pkgutil.get_loader("not1mm")
# WORKING_PATH = os.path.dirname(loader.get_filename())
WORKING_PATH = os.path.dirname(__loader__.get_filename())
loader = pkgutil.get_loader("not1mm")
WORKING_PATH = os.path.dirname(loader.get_filename())
# WORKING_PATH = os.path.dirname(__loader__.get_filename())

if "XDG_DATA_HOME" in os.environ:
DATA_PATH = os.environ.get("XDG_DATA_HOME")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "not1mm"
version = "23.11.15"
version = "23.11.15.1"
description = "NOT1MM Logger"
readme = "README.md"
requires-python = ">=3.9"
Expand Down

0 comments on commit 6898276

Please sign in to comment.