Skip to content

Commit f96722c

Browse files
committed
Added Deprecation Warning
1 parent f482e96 commit f96722c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

captchatools/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from abc import ABC, abstractmethod
2424
from typing import Optional
2525
from . import exceptions as captchaExceptions
26+
from warnings import warn
2627
class Harvester(ABC):
2728
'''
2829
Represents a captcha harvester.
@@ -87,4 +88,5 @@ def new_harvester(**kwargs) -> Harvester:
8788

8889
# Just for backward compatibility
8990
def captcha_harvesters(**kwargs) -> Harvester:
91+
warn('This function is deprecated. Use the `new_harvester() function`', DeprecationWarning, stacklevel=2)
9092
return new_harvester(**kwargs)

0 commit comments

Comments
 (0)