Skip to content

Commit

Permalink
Remove need for domdf_python_tools as a dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed May 13, 2022
1 parent 713f8b4 commit 43ecdfe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions handy_archives/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@
# stdlib
import datetime
import os
import pathlib
import shutil
import sys
import tarfile
import zipfile
from typing import IO, Optional, Type, TypeVar, Union, cast

# 3rd party
from domdf_python_tools.typing import PathLike

__author__: str = "Dominic Davis-Foster"
__copyright__: str = "2021 Dominic Davis-Foster"
__license__: str = "MIT License"
Expand All @@ -47,6 +45,7 @@
__all__ = ["unpack_archive", "TarFile", "ZipFile", "is_tarfile"]

_Self = TypeVar("_Self")
PathLike = Union[str, pathlib.Path, os.PathLike]

if "wheel" not in shutil._UNPACK_FORMATS: # type: ignore[attr-defined]
shutil.register_unpack_format(
Expand Down Expand Up @@ -340,7 +339,7 @@ def write_file(
zinfo.compress_type = self.compression

if sys.version_info >= (3, 7): # pragma: no cover (<py37)
zinfo._compresslevel = self.compresslevel
zinfo._compresslevel = self.compresslevel # type: ignore[attr-defined]

st = os.stat(filename)
zinfo.external_attr = (st.st_mode & 0xFFFF) << 16 # Unix attributes
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers = [
"Topic :: System :: Archiving :: Compression",
"Typing :: Typed",
]
dependencies = [ "domdf-python-tools>=3.1.0",]
dependencies = []
dynamic = []

[[project.authors]]
Expand Down Expand Up @@ -153,7 +153,7 @@ license-key = "MIT"
package = "handy_archives"

[tool.mypy]
python_version = "3.6"
python_version = "3.7"
namespace_packages = true
check_untyped_defs = true
warn_unused_ignores = true
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
domdf-python-tools>=3.1.0

0 comments on commit 43ecdfe

Please sign in to comment.