Commit graph

53 commits

Author SHA1 Message Date
Chris Mayo
86c3071405 Use pytest.mark.parametrize instead of parameterized 2024-09-03 19:27:13 +01:00
Chris Mayo
48496b3854 Use a geoip tox factor
GeoIP requires libGeoIP which tox deps cannot install.
Likewise the GeoLiteCountry database which is also required by
TestLocationInfo().

The last GeoIP release was in 2014, and libGeoIP has been EOL since 2022,
but it is still available in Debian/Ubuntu.
2024-08-27 19:34:28 +01:00
Chris Mayo
b6e2b4a0de Add Python 3.13 to supported versions 2024-08-21 19:34:37 +01:00
Chris Mayo
284969e7bb Raise minimum Python version to 3.9 2023-11-27 19:22:08 +00:00
Chris Mayo
219c17aa63 Use cryptography to generate certificate in TestHttps
Replacing deprecated use of pyOpenSSL.

linkchecker/tests/checker/test_https.py:45: DeprecationWarning: X509Extension support in pyOpenSSL is deprecated. You should use the APIs in cryptography.
   [crypto.X509Extension(b"subjectAltName", False, b"DNS:localhost")])
2023-11-07 19:30:59 +00:00
Chris Mayo
01947910cb pyftpdlib released with Python 3.12 support 2023-11-01 19:26:48 +00:00
Chris Mayo
e793e64c78 Add Python 3.12 2023-09-06 19:22:04 +01:00
Chris Mayo
b3429c4759 Remove support for nntp and telnet
Python is dropping nntplib and telnetlib.
2023-08-28 19:24:57 +01:00
Chris Mayo
f39f6a7dd9 Pass CI to tox testenv
Used since:
1cb7f3d78 ("Test on GitHub with httpbin from a container", 2023-06-05)
2023-06-10 17:31:09 +01:00
Chris Mayo
e6da68b7f6 Add linting with Pylint to build workflow 2023-05-03 19:24:53 +01:00
Chris Mayo
8820c8c0f0 Revert "Remove check-python-versions that needs setup.py"
Supports pyproject.toml since 0.21.

This reverts commit a214531030.
2023-05-03 19:24:53 +01:00
Chris Mayo
643364a655 Raise minimum Python version to 3.8 2023-01-17 19:23:29 +00:00
Chris Mayo
46c5712baf Add pdfminer.six to minimum version testing
20181108 is the version used by the current Debian oldstable.
Ubuntu 20.04 LTS has 20191020.

pdfminer installs cryptography, >= 38 breaks pyOpenSSL < 22 as found in
Ubuntu 20.04 LTS. Update docs job to use ubuntu-22.04 to avoid
failures.
2022-12-05 19:22:35 +00:00
Chris Mayo
f489660925 Test with minimum versions of requirements
Pick 1.8.1 as the minimum version of argcomplete. This is the version in
the current Debian oldstable and Ubuntu 20.04 LTS.
2022-11-30 19:21:06 +00:00
Chris Mayo
169e327d50 Add Python 3.11 2022-10-25 19:21:39 +01:00
Chris Mayo
a214531030 Remove check-python-versions that needs setup.py 2022-09-05 19:24:01 +01:00
Chris Mayo
1975613b44 Remove MANIFEST.in
All files stored in Git are included in the sdist, unless excluded with
tool.hatch.build.exclude.

Build artifacts listed in tool.hatch.build.artifacts are also included.
2022-09-05 19:24:01 +01:00
Chris Mayo
a67e8fd0f5 Test and recommend pdfminer.six for PdfParser
pdfminer is no longer actively maintained; distributions are now
packaging pdfminer.six as pdfminer.
2022-05-18 19:29:54 +01:00
Chris Mayo
34ba737710 Remove cchardet from Docker image, tox env and recommendation
Beautiful Soup 4.11 will use charset-normalizer.
2022-04-11 19:26:18 +01:00
Chris Mayo
5c0d66dd74 Raise minimum Python requirement to 3.7 2021-12-30 19:27:04 +00:00
Chris Mayo
702bf36f53
Merge pull request #571 from cjmayo/cchardet
Add guidance on character set detecting to install.txt
2021-12-06 19:28:55 +00:00
Chris Mayo
3b19680e97 Add guidance on character set detecting including cchardet 2021-12-06 19:24:26 +00:00
Chris Mayo
454ce0c3a5 Add a yamllint check for workflows 2021-11-30 19:45:17 +00:00
Chris Mayo
a70ff3f78a Test with Python 3.10 2021-10-18 19:46:31 +01:00
Chris Mayo
deed6ce231 Ensure chardet is installed when testing using tox
Beautiful Soup uses chardet, if installed, to detect character
encodings. This can lead to different test results based on whether
chardet is installed or not.

Requests < 2.26.0 requires chardet, but since 2.26.0 Requests requires
charset_normalizer.

Explicitly installing chardet maintains consistent test results.
2021-07-27 19:48:27 +01:00
Marius Gedminas
8b6cb66146 Convert .travis.yml to GitHub Actions
Also add tox -e check-python-versions because it was low-hanging fruit
and I wanted to be sure.
2021-05-19 16:30:02 +03:00
Chris Mayo
7c2036b68c Drop support for Beautiful Soup < 4.8.1
The minimum version supported was already 4.8.0 because of the use
of multi_valued_attributes [1].

Test support for < 4.8.1 is the only code that needs removing [2].

[1] 3ff3d724 ("Use BeautifulSoup element attrs directly", 2020-04-03)
[2] 607328d5 ("Support Beautiful Soup line numbers", 2019-10-05)
2021-01-28 19:20:24 +00:00
Chris Mayo
e922dd0224 Stop using biplist
plistlib has supported binary files since Python 3.4.
2020-10-12 19:55:46 +01:00
Chris Mayo
26c15c5e67 Fix deprecation warning for resolver.query()
/home/travis/build/linkchecker/linkchecker/linkcheck/checker/mailtourl.py:321: DeprecationWarning: please use dns.resolver.resolve() instead
    answers = resolver.query(domain, 'MX')
2020-09-14 19:55:05 +01:00
Chris Mayo
70d749a967 Drop Python 3.5, add 3.9 2020-09-14 19:55:05 +01:00
Chris Mayo
10170b2966 Add a test for the LocationInfo plugin
Because the GeoIP database now requires registration to download the
result of the lookup using geoip-database is not going to change.
2020-07-07 17:25:28 +01:00
Chris Mayo
de5dccb0ce Enable tox flake8 checking for all Python files 2020-05-26 20:20:57 +01:00
Chris Mayo
02deff426b Check the main linkchecker executable from tox 2020-05-26 19:49:57 +01:00
Marius Gedminas
93612adcf7 Add check-manifest to CI
Closes #414.
2020-05-25 19:33:17 +03:00
Marius Gedminas
72e7c600f3 Add a 'tox -e flake8' 2020-05-19 19:24:22 +03:00
Chris Mayo
f5e7f3a382 Remove use of the future package
It was providing Python 2 compatibility.
2020-04-15 19:49:16 +01:00
Marius Gedminas
ccc0ee0464 Clean up travis and tox.ini
I want the Python 3.5 travis job to run just tox -e py35, without the
oldbs4 job, and without an explicit TOXENV setting that is awkward to
insert in the .travis.yml (also, it reorders the jobs putting 3.5 below
3.8 which annoys me).

I think I found a way of doing that by renaming py35-oldbs4 to oldbs4.
2020-03-30 14:46:44 +03:00
Marius Gedminas
894f0b0922 Split the oldbs4 into a separate Travis job (take 2)
The previous attempt did not work: the 3.5 build ran both toxenvs.
2020-03-23 16:45:46 +02:00
Marius Gedminas
ba5888f06a Split the oldbs4 into a separate Travis job 2020-03-23 16:40:22 +02:00
Marius Gedminas
6a50fe9d86 Add Python 3.8 to the build matrix 2020-03-23 11:00:25 +02:00
Chris Mayo
e46fb7fe9c Supports Python 3 Only
Needs miniboa >= 1.0.8 for telnet test on Python 3.7.
Test with older Beautiful Soup without line number support on
Python 3.5.

Resolve tox deprecation warning:
  Matching undeclared envs is deprecated. Be sure all the envs that Tox
  should run are declared in the tox config.
2019-10-05 19:38:57 +01:00
Chris Mayo
dee4be4b1d Enable https checking using a test server
Verification has to be turned off because we are using a
self-signed certificate.
2019-11-11 20:12:25 +00:00
Marius Gedminas
65f861901c Fix all Python 3 tox environments
Old pdfminer supports Python 2 only, new pdfminer supports Python 3
only.
2019-10-25 14:20:31 +03:00
Chris Mayo
a31289c97d Add pdfminer to tox.ini and dev-requirements.txt to enable pdf test 2019-10-21 20:06:44 +01:00
Marius Gedminas
42c75b5ef9 Move some pytest options into pytest.ini
This is so that I can run `tox -- -n 8` to run the tests in parallel, or
`tox -- tests/checker/test_misc.py::TestMisc::test_html5` to run just a
single test, without having to repeat all the other options.

I haven't moved --cov=linkcheck because I don't want coverage results
when I'm limiting the test run to a single test (they just make the
interesting bit -- the test result itself -- scroll up).

I've also added -ra to the default option list because then several
tests fail, I'd like to see a list of their names in one place, not
spead out between the huge tracebacks.
2019-10-21 17:42:29 +03:00
Petr Dlouhý
eaa7131523 enable and fix remaining bookmark tests
biplist module preferred for reading Safari bookmarks in
bookmarks/safari.py so install it for tox testing.
2019-09-16 20:08:01 +01:00
anarcat
e2f3ae78a3
Merge pull request #121 from PetrDlouhy/tests-parser-divided
Execute parser test by parametrized
2018-02-12 14:25:20 -05:00
Petr Dlouhý
0a13fae3b4 remove third party packages and use them as dependency 2018-01-09 23:25:27 +01:00
Petr Dlouhý
99b18eee6d execude parser test by parametrized 2018-01-09 23:15:09 +01:00
Petr Dlouhý
271c592756 report coverate to Coveralls 2017-02-14 09:47:31 +01:00