Skip to content

Commit 9557d78

Browse files
authored
Merge pull request #262 from scrapy/relnotes-1.7
Release notes for 1.7.0
2 parents 1942f6d + 64ae356 commit 9557d78

File tree

8 files changed

+35
-21
lines changed

8 files changed

+35
-21
lines changed

.github/workflows/checks.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ jobs:
88
fail-fast: false
99
matrix:
1010
include:
11-
- python-version: "3.10"
11+
- python-version: "3.11"
1212
env:
1313
TOXENV: security
14-
- python-version: "3.10"
14+
- python-version: "3.11"
1515
env:
1616
TOXENV: flake8
17-
- python-version: "3.10"
17+
- python-version: "3.11"
1818
env:
1919
TOXENV: pylint
20-
- python-version: "3.10" # Keep in sync with .readthedocs.yml
20+
- python-version: "3.11" # Keep in sync with .readthedocs.yml
2121
env:
2222
TOXENV: docs
23-
- python-version: "3.10"
23+
- python-version: "3.11"
2424
env:
2525
TOXENV: typing
26-
- python-version: "3.10"
26+
- python-version: "3.11"
2727
env:
2828
TOXENV: black
2929

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- python-version: "3.10"
2121
env:
2222
TOXENV: py
23-
- python-version: "3.11.0-rc.2"
23+
- python-version: "3.11"
2424
env:
2525
TOXENV: py
2626
- python-version: pypy3.9

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build:
88
tools:
99
# For available versions, see:
1010
# https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python
11-
python: "3.10" # Keep in sync with .github/workflows/checks.yml
11+
python: "3.11" # Keep in sync with .github/workflows/checks.yml
1212
python:
1313
install:
1414
- requirements: docs/requirements.txt

NEWS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,21 @@
33
History
44
-------
55

6+
1.7.0 (Not released yet)
7+
~~~~~~~~~~~~~~~~~~~~~~~~
8+
69
* Add PEP 561-style type information
10+
* Support for Python 2.7, 3.5 and 3.6 is removed
11+
* Support for Python 3.9-3.11 is added
12+
* Very large documents (with deep nesting or long tag content) can now be
13+
parsed, and ``Selector`` now takes a new argument ``huge_tree`` to disable
14+
this
15+
* Support for new features of cssselect 1.2.0 is added
16+
* The ``Selector.remove()`` and ``SelectorList.remove()`` methods are
17+
deprecated and replaced with the new ``Selector.drop()`` and
18+
``SelectorList.drop()`` methods which don't delete text after the dropped
19+
elements when used in the HTML mode.
20+
721

822
1.6.0 (2020-05-07)
923
~~~~~~~~~~~~~~~~~~

conftest.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
"cssselect": ("https://cssselect.readthedocs.io/en/latest", None),
127127
"python": ("https://docs.python.org/3", None),
128128
"requests": ("https://requests.kennethreitz.org/en/latest", None),
129+
"lxml": ("https://lxml.de/apidoc/", None),
129130
}
130131

131132

parsel/selector.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,15 @@ class Selector:
301301
If ``type`` is ``None``, the selector defaults to ``"html"``.
302302
303303
``base_url`` allows setting a URL for the document. This is needed when looking up external entities with relative paths.
304-
See [`lxml` documentation](https://lxml.de/api/index.html) ``lxml.etree.fromstring`` for more information.
304+
See the documentation for :func:`lxml.etree.fromstring` for more information.
305+
306+
``huge_tree`` controls the lxml/libxml2 feature that forbids parsing
307+
certain large documents to protect from possible memory exhaustion. The
308+
argument is ``True`` by default if the installed lxml version supports it,
309+
which disables the protection to allow parsing such documents. Set it to
310+
``False`` if you want to enable the protection.
311+
See `this lxml FAQ entry <https://lxml.de/FAQ.html#is-lxml-vulnerable-to-xml-bombs>`_
312+
for more information.
305313
"""
306314

307315
__slots__ = [

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ deps =
1818
{[testenv]deps}
1919
flake8==5.0.4
2020
commands =
21-
flake8 {posargs: parsel tests conftest.py setup.py}
21+
flake8 {posargs: parsel tests setup.py}
2222

2323
[testenv:typing]
2424
deps =
@@ -35,13 +35,13 @@ deps =
3535
{[testenv]deps}
3636
pylint==2.15.4
3737
commands =
38-
pylint docs parsel tests conftest.py setup.py
38+
pylint docs parsel tests setup.py
3939

4040
[testenv:black]
4141
deps =
4242
black==22.10.0
4343
commands =
44-
black --line-length=79 --check {posargs:parsel tests conftest.py setup.py}
44+
black --line-length=79 --check {posargs:parsel tests setup.py}
4545

4646
[docs]
4747
changedir = docs

0 commit comments

Comments
 (0)