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.
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.
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)
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.
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.
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.
We must do this, because py.test adjusts sys.path to make
'tests.test_foo' importable [*]. When py.test does this, the
'linkcheck' directory at the top of the git tree is the one that gets
imported in the tests. If we've told pip to use develop mode, all's
fine. If we haven't, then we're going to get errors because extension
modules like _network.so get installed into
.tox/*/lib/*/site-packages/linkcheck/network and not into
./linkcheck/network/
[*] http://doc.pytest.org/en/latest/goodpractices.html#choosing-a-test-layout-import-rules