Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -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
10 changes: 5 additions & 5 deletions gprofiler/metadata/py_module_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gprofiler/profilers/java.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading