Skip to content
This repository was archived by the owner on Apr 11, 2025. It is now read-only.

Commit 30bcd26

Browse files
authored
Deprecate Project
1 parent af3fa16 commit 30bcd26

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

camelot/__init__.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
import logging
2+
import warnings
3+
4+
def _issue_deprecation_warning():
5+
"""Issues a deprecation warning about the library's status."""
6+
message = (
7+
"pypdf_table_extraction is deprecated and no longer actively maintained. "
8+
"Please use camelot-py instead: https://github.com/camelot-dev/camelot"
9+
)
10+
warnings.warn(message, DeprecationWarning, stacklevel=2)
11+
12+
# Issue the warning when the module is imported
13+
_issue_deprecation_warning()
214

315
from .__version__ import __version__ # noqa D100, F400
416
from .io import read_pdf
517
from .plotting import PlotMethods
618

7-
819
# set up logging
920
logger = logging.getLogger("camelot")
10-
11-
format_string = "%(asctime)s - %(levelname)s - %(message)s"
12-
formatter = logging.Formatter(format_string, datefmt="%Y-%m-%dT%H:%M:%S")
13-
handler = logging.StreamHandler()
14-
handler.setFormatter(formatter)
15-
16-
logger.addHandler(handler)
17-
18-
# instantiate plot method
19-
plot = PlotMethods()

0 commit comments

Comments
 (0)