diff --git a/dev-requirements.txt b/dev-requirements.txt index 6962087dc..1506c348a 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,16 +1,16 @@ pytest==7.0.1 flake8==6.0.0 -black==23.3.0 -mypy==0.971 +black==24.8.0 +mypy==1.5.1 isort==5.12.0 PyYAML==6.0 -docker==7.0.0 -types-requests==0.1.9 +docker==7.1.0 +types-requests~=2.32 types-dataclasses==0.6.6 types-psutil==5.8.19 types-PyYAML==6.0.3 -types-pkg-resources==0.1.3 -types-protobuf==3.19.22 +types-setuptools~=75.3.0 +types-protobuf~=5.29.1 types-toml==0.10.8 types-retry==0.9.9 types-beautifulsoup4==4.11.1 diff --git a/gprofiler/metadata/py_module_version.py b/gprofiler/metadata/py_module_version.py index 575d907d1..f9100a4d4 100644 --- a/gprofiler/metadata/py_module_version.py +++ b/gprofiler/metadata/py_module_version.py @@ -57,7 +57,7 @@ def _get_packages_dir(file_path: str) -> Optional[str]: def _get_metadata(dist: pkg_resources.Distribution) -> Dict[str, str]: """Based on pip._internal.utils.get_metadata""" metadata_name = "METADATA" - if isinstance(dist, pkg_resources.DistInfoDistribution) and dist.has_metadata(metadata_name): # type: ignore + if isinstance(dist, pkg_resources.DistInfoDistribution) and dist.has_metadata(metadata_name): metadata = dist.get_metadata(metadata_name) elif dist.has_metadata("PKG-INFO"): metadata_name = "PKG-INFO" @@ -120,7 +120,7 @@ def _files_from_legacy(dist: pkg_resources.Distribution) -> Optional[Iterator[st return None paths = (p for p in text.splitlines(keepends=False) if p) root = dist.location - info = dist.egg_info # type: ignore + info = dist.egg_info if root is None or info is None: return paths try: @@ -230,8 +230,8 @@ def _populate_packages_versions(packages_versions: Dict[str, Optional[Tuple[str, # This function resolves symlinks and makes paths absolute for comparison purposes which isn't required # for our usage. if hasattr(pkg_resources, "_normalize_cached"): - original__normalize_cache = pkg_resources._normalize_cached # type: ignore - pkg_resources._normalize_cached = lambda path: path # type: ignore + original__normalize_cache = pkg_resources._normalize_cached + pkg_resources._normalize_cached = lambda path: path else: global _warned_no__normalized_cached if not _warned_no__normalized_cached: @@ -261,7 +261,7 @@ def _populate_packages_versions(packages_versions: Dict[str, Optional[Tuple[str, packages_versions[module_path] = package_info finally: # Don't forget to restore the original implementation in case someone else uses this function - pkg_resources._normalize_cached = original__normalize_cache # type: ignore + pkg_resources._normalize_cached = original__normalize_cache _exceptions_logged = 0 diff --git a/gprofiler/profilers/java.py b/gprofiler/profilers/java.py index 3f1d3641d..7cdc85147 100644 --- a/gprofiler/profilers/java.py +++ b/gprofiler/profilers/java.py @@ -350,7 +350,7 @@ def get_java_version(process: Process, stop_event: Event) -> Optional[str]: def _run_java_version() -> "CompletedProcess[bytes]": return run_process( [ - cast(str, process_java_path), + cast(str, process_java_path), # type: ignore "-version", ], stop_event=stop_event, diff --git a/granulate-utils b/granulate-utils index dd8aa29b9..92999cb3b 160000 --- a/granulate-utils +++ b/granulate-utils @@ -1 +1 @@ -Subproject commit dd8aa29b9d68a05f55e6e1d89dfffab6879c8530 +Subproject commit 92999cb3bb380d38bb578d1fe40b2426cf8a08b7 diff --git a/requirements.txt b/requirements.txt index 6d178649e..94df731d7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ importlib-resources==5.1.0 psutil==5.9.8 -requests==2.31.0 +requests==2.32.3 ConfigArgParse==1.3 distro==1.7.0 -setuptools==65.5.1 # For pkg_resources +setuptools==75.3.1 # For pkg_resources packaging==23.1 pyelftools~=0.31 curlify==2.2.1