[Snyk] Security upgrade wheel from 0.30.0 to 0.38.0 (#887)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Snyk bot <github+bot@snyk.io>
single_channel
Glenn Jocher 2 years ago committed by GitHub
parent c9893810c7
commit 365c2ef481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -37,6 +37,7 @@ seaborn>=0.11.0
ipython # interactive notebook ipython # interactive notebook
psutil # system utilization psutil # system utilization
thop>=0.1.1 # FLOPs computation thop>=0.1.1 # FLOPs computation
wheel>=0.38.0 # Snyk vulnerability fix
# albumentations>=1.0.3 # albumentations>=1.0.3
# pycocotools>=2.0.6 # COCO mAP # pycocotools>=2.0.6 # COCO mAP
# roboflow # roboflow

@ -41,14 +41,22 @@ setup(
'dev': 'dev':
['check-manifest', 'pytest', 'pytest-cov', 'coverage', 'mkdocs', 'mkdocstrings[python]', 'mkdocs-material']}, ['check-manifest', 'pytest', 'pytest-cov', 'coverage', 'mkdocs', 'mkdocstrings[python]', 'mkdocs-material']},
classifiers=[ classifiers=[
"Intended Audience :: Developers", "Intended Audience :: Science/Research", "Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3", "Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3",
"Topic :: Software Development", "Topic :: Scientific/Engineering", "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Image Recognition", "Operating System :: POSIX :: Linux", "Topic :: Scientific/Engineering :: Image Recognition",
"Operating System :: MacOS", "Operating System :: Microsoft :: Windows"], "Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Development Status :: 4 - Beta",],
keywords="machine-learning, deep-learning, vision, ML, DL, AI, YOLO, YOLOv3, YOLOv5, YOLOv8, HUB, Ultralytics", keywords="machine-learning, deep-learning, vision, ML, DL, AI, YOLO, YOLOv3, YOLOv5, YOLOv8, HUB, Ultralytics",
entry_points={ entry_points={
'console_scripts': ['yolo = ultralytics.yolo.cfg:entrypoint', 'ultralytics = ultralytics.yolo.cfg:entrypoint']}) 'console_scripts': ['yolo = ultralytics.yolo.cfg:entrypoint', 'ultralytics = ultralytics.yolo.cfg:entrypoint']})

@ -122,7 +122,7 @@ def get_cfg(cfg: Union[str, Path, Dict, SimpleNamespace] = DEFAULT_CFG, override
f"Valid '{k}' values are between 0.0 and 1.0.") f"Valid '{k}' values are between 0.0 and 1.0.")
elif k in CFG_INT_KEYS and not isinstance(v, int): elif k in CFG_INT_KEYS and not isinstance(v, int):
raise TypeError(f"'{k}={v}' is of invalid type {type(v).__name__}. " raise TypeError(f"'{k}={v}' is of invalid type {type(v).__name__}. "
f"'{k}' must be an int (i.e. '{k}=0')") f"'{k}' must be an int (i.e. '{k}=8')")
elif k in CFG_BOOL_KEYS and not isinstance(v, bool): elif k in CFG_BOOL_KEYS and not isinstance(v, bool):
raise TypeError(f"'{k}={v}' is of invalid type {type(v).__name__}. " raise TypeError(f"'{k}={v}' is of invalid type {type(v).__name__}. "
f"'{k}' must be a bool (i.e. '{k}=True' or '{k}=False')") f"'{k}' must be a bool (i.e. '{k}=True' or '{k}=False')")

@ -18,6 +18,7 @@ from typing import Union
import cv2 import cv2
import numpy as np import numpy as np
import pandas as pd import pandas as pd
import requests
import torch import torch
import yaml import yaml
@ -345,8 +346,31 @@ def get_git_branch():
return None # if not git dir or on error return None # if not git dir or on error
def get_latest_pypi_version(package_name='ultralytics'):
"""
Returns the latest version of a PyPI package without downloading or installing it.
Parameters:
package_name (str): The name of the package to find the latest version for.
Returns:
str: The latest version of the package.
"""
response = requests.get(f"https://pypi.org/pypi/{package_name}/json")
if response.status_code == 200:
return response.json()["info"]["version"]
return None
def get_default_args(func): def get_default_args(func):
# Get func() default arguments """Returns a dictionary of default arguments for a function.
Args:
func (callable): The function to inspect.
Returns:
dict: A dictionary where each key is a parameter name, and each value is the default value of that parameter.
"""
signature = inspect.signature(func) signature = inspect.signature(func)
return {k: v.default for k, v in signature.parameters.items() if v.default is not inspect.Parameter.empty} return {k: v.default for k, v in signature.parameters.items() if v.default is not inspect.Parameter.empty}

Loading…
Cancel
Save