pdfminer.six/tools
htInEdin dc530f3a6f
Use logger.warn instead of warnings.warn if warning cannot be prevented by user (#673)
* Use logging.Logger.warning instead of warning.warn in most cases, following
 the Python official guidance that warning.warn is directed at _developers_,
 not users

 * (pdfdocument.py) remove declarations of PDFTextExtractionNotAllowedWarning,
			PDFNoValidXRefWarning

 * (pdfpage.py) Don't import warning, don't use PDFTextExtractionNotAllowedWarning

 * (tools/dumppdf.py) Don't import warning, don't use PDFNoValidXRefWarning

 * (tests/test_tools_dumppdf.py) Don't import warning, check for logging.WARN rather
				  than PDFNoValidXRefWarning

* get name right

* make flake8 happy

* Keep warning classes such that this does not crash code when these warnings are explictly ignored

* Update changelog to include pr ref

* Small textual change

* Remove patch

* No need for testing if the warning is actually raised. The test_tootls_dumppdf.py are just test cases if these pdfs are supported.

* Use logger as name for logger

* Add docs to legacy warnings

* Use logger.Logger.warn for failed decompression

* Add reference to docs describing when to use logger and warnings

Co-authored-by: Henry S. Thompson <ht@home.hst.name>
Co-authored-by: Pieter Marsman <pietermarsman@gmail.com>
2022-01-26 20:41:12 +01:00
..
Makefile webapp fixed 2010-12-25 08:41:35 +00:00
__init__.py tools must be a module to enable scripts tests 2014-09-04 09:47:33 +02:00
conv_afm.py Add type annotations (#661) 2021-10-09 16:23:28 +02:00
conv_cmap.py Add type annotations (#661) 2021-10-09 16:23:28 +02:00
conv_glyphlist.py Add type annotations (#661) 2021-10-09 16:23:28 +02:00
dumppdf.py Use logger.warn instead of warnings.warn if warning cannot be prevented by user (#673) 2022-01-26 20:41:12 +01:00
pdf2txt.py pdf2txt: clean up construction of LAParams from arguments (#682) 2022-01-25 22:06:06 +01:00
pdfdiff.py Add type annotations (#661) 2021-10-09 16:23:28 +02:00
pdfstats.py Add type annotations (#661) 2021-10-09 16:23:28 +02:00
prof.py Add type annotations (#661) 2021-10-09 16:23:28 +02:00