Fixed DeprecationWarning: pkg_resources is deprecated as an API. #3053

This commit is contained in:
morpheus65535 2025-10-21 23:07:15 -04:00
parent 1d0e0543c8
commit 680ead76f8
11 changed files with 24 additions and 17 deletions

View file

@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: python-anticaptcha
Version: 1.0.0
Version: 0.1.dev191+g6d2bad22e
Summary: Client library for solve captchas with Anticaptcha.com support.
Home-page: https://github.com/ad-m/python-anticaptcha
Author: Adam Dobrawy

View file

@ -0,0 +1,13 @@
python_anticaptcha-0.1.dev191+g6d2bad22e.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
python_anticaptcha-0.1.dev191+g6d2bad22e.dist-info/LICENSE.md,sha256=Yn5dZtOJWFEnvJF0vW0ZYLQLbia5fSeb0PXCH9R-V7A,1069
python_anticaptcha-0.1.dev191+g6d2bad22e.dist-info/METADATA,sha256=4qD2B6a5DDCxqjCZ4qHlvW01Cwg87yU37SRG29xs2BY,7912
python_anticaptcha-0.1.dev191+g6d2bad22e.dist-info/RECORD,,
python_anticaptcha-0.1.dev191+g6d2bad22e.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
python_anticaptcha-0.1.dev191+g6d2bad22e.dist-info/WHEEL,sha256=P2T-6epvtXQ2cBOE_U1K4_noqlJFN3tj15djMgEu4NM,110
python_anticaptcha-0.1.dev191+g6d2bad22e.dist-info/direct_url.json,sha256=Tj3EWYB7HC9ktc2UAVbtNje9zl7gGwLfgascMkfGMSM,151
python_anticaptcha-0.1.dev191+g6d2bad22e.dist-info/top_level.txt,sha256=SxRL0T_eHr7l9jCC_cUsakrZOHLejPt4NzTtrBrNZPo,19
python_anticaptcha/__init__.py,sha256=AA2G5cXb7U1jrrkg46jeY857xfv6mFtFowFWGmrzOwI,848
python_anticaptcha/base.py,sha256=GTpMwJw9aPNwWDjdUK1iomXwI7_GkWGmcY4QlH_cDhE,7472
python_anticaptcha/compat.py,sha256=7qfpb9aV4ozirMSzefceKUjOq_zuzQxOGyUmDTcQ4HQ,278
python_anticaptcha/exceptions.py,sha256=LUJpa_OCfBcxl76mh9IyoSdVwNNEwRG144Bbq08ihSQ,1018
python_anticaptcha/tasks.py,sha256=IWftiNJRnDg48WPcC-YGjgaeSpDaKdxRwMt1RjxOTHo,10022

View file

@ -0,0 +1 @@
{"url": "https://github.com/morpheus65535/python-anticaptcha.git", "vcs_info": {"commit_id": "6d2bad22e9dba3d1bef291b73ce8d201991462ad", "vcs": "git"}}

View file

@ -1,12 +0,0 @@
python_anticaptcha-1.0.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
python_anticaptcha-1.0.0.dist-info/LICENSE.md,sha256=Yn5dZtOJWFEnvJF0vW0ZYLQLbia5fSeb0PXCH9R-V7A,1069
python_anticaptcha-1.0.0.dist-info/METADATA,sha256=tTPkRER34SSYilxofU7gVPw9rO7hcCGyj3uqsGTRUlA,7896
python_anticaptcha-1.0.0.dist-info/RECORD,,
python_anticaptcha-1.0.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
python_anticaptcha-1.0.0.dist-info/WHEEL,sha256=P2T-6epvtXQ2cBOE_U1K4_noqlJFN3tj15djMgEu4NM,110
python_anticaptcha-1.0.0.dist-info/top_level.txt,sha256=SxRL0T_eHr7l9jCC_cUsakrZOHLejPt4NzTtrBrNZPo,19
python_anticaptcha/__init__.py,sha256=aRIFM_ejKZtxZ8tRgTN4BiQZWYPt5jBW83IT0i6lzXw,747
python_anticaptcha/base.py,sha256=GTpMwJw9aPNwWDjdUK1iomXwI7_GkWGmcY4QlH_cDhE,7472
python_anticaptcha/compat.py,sha256=7qfpb9aV4ozirMSzefceKUjOq_zuzQxOGyUmDTcQ4HQ,278
python_anticaptcha/exceptions.py,sha256=LUJpa_OCfBcxl76mh9IyoSdVwNNEwRG144Bbq08ihSQ,1018
python_anticaptcha/tasks.py,sha256=IWftiNJRnDg48WPcC-YGjgaeSpDaKdxRwMt1RjxOTHo,10022

View file

@ -1,5 +1,9 @@
from .base import AnticaptchaClient
from pkg_resources import get_distribution, DistributionNotFound
try:
from importlib.metadata import version, PackageNotFoundError
except ImportError:
# Python < 3.8 fallback
from importlib_metadata import version, PackageNotFoundError
from .tasks import (
NoCaptchaTaskProxylessTask,
RecaptchaV2TaskProxyless,
@ -23,7 +27,7 @@ from .exceptions import AnticaptchaException
AnticatpchaException = AnticaptchaException
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
__version__ = version(__name__)
except PackageNotFoundError:
# package is not installed
pass

View file

@ -123,7 +123,8 @@ Js2Py==0.74
pydantic<=1.10.14 # newer version require other compiled dependency
pyjsparser==2.7.1
pyparsing<=3.1.4 # newer version doesn't support Python 3.8 anymore
python-anticaptcha==1.0.0
# python-anticaptcha==1.0.0 # include PR to fix DeprecationWarning: pkg_resources is deprecated as an API.
git+https://github.com/morpheus65535/python-anticaptcha.git
retry==0.9.2
six==1.17.0
wcwidth==0.2.13