Skip to content

Commit

Permalink
Merge pull request #262 from scrapy/relnotes-1.7
Browse files Browse the repository at this point in the history
Release notes for 1.7.0
  • Loading branch information
kmike committed Nov 1, 2022
2 parents 1942f6d + 64ae356 commit 9557d78
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 21 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: "3.10"
- python-version: "3.11"
env:
TOXENV: security
- python-version: "3.10"
- python-version: "3.11"
env:
TOXENV: flake8
- python-version: "3.10"
- python-version: "3.11"
env:
TOXENV: pylint
- python-version: "3.10" # Keep in sync with .readthedocs.yml
- python-version: "3.11" # Keep in sync with .readthedocs.yml
env:
TOXENV: docs
- python-version: "3.10"
- python-version: "3.11"
env:
TOXENV: typing
- python-version: "3.10"
- python-version: "3.11"
env:
TOXENV: black

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- python-version: "3.10"
env:
TOXENV: py
- python-version: "3.11.0-rc.2"
- python-version: "3.11"
env:
TOXENV: py
- python-version: pypy3.9
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build:
tools:
# For available versions, see:
# https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python
python: "3.10" # Keep in sync with .github/workflows/checks.yml
python: "3.11" # Keep in sync with .github/workflows/checks.yml
python:
install:
- requirements: docs/requirements.txt
Expand Down
14 changes: 14 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,21 @@
History
-------

1.7.0 (Not released yet)
~~~~~~~~~~~~~~~~~~~~~~~~

* Add PEP 561-style type information
* Support for Python 2.7, 3.5 and 3.6 is removed
* Support for Python 3.9-3.11 is added
* Very large documents (with deep nesting or long tag content) can now be
parsed, and ``Selector`` now takes a new argument ``huge_tree`` to disable
this
* Support for new features of cssselect 1.2.0 is added
* The ``Selector.remove()`` and ``SelectorList.remove()`` methods are
deprecated and replaced with the new ``Selector.drop()`` and
``SelectorList.drop()`` methods which don't delete text after the dropped
elements when used in the HTML mode.


1.6.0 (2020-05-07)
~~~~~~~~~~~~~~~~~~
Expand Down
9 changes: 0 additions & 9 deletions conftest.py

This file was deleted.

1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"cssselect": ("https://cssselect.readthedocs.io/en/latest", None),
"python": ("https://docs.python.org/3", None),
"requests": ("https://requests.kennethreitz.org/en/latest", None),
"lxml": ("https://lxml.de/apidoc/", None),
}


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

__slots__ = [
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ deps =
{[testenv]deps}
flake8==5.0.4
commands =
flake8 {posargs: parsel tests conftest.py setup.py}
flake8 {posargs: parsel tests setup.py}

[testenv:typing]
deps =
Expand All @@ -35,13 +35,13 @@ deps =
{[testenv]deps}
pylint==2.15.4
commands =
pylint docs parsel tests conftest.py setup.py
pylint docs parsel tests setup.py

[testenv:black]
deps =
black==22.10.0
commands =
black --line-length=79 --check {posargs:parsel tests conftest.py setup.py}
black --line-length=79 --check {posargs:parsel tests setup.py}

[docs]
changedir = docs
Expand Down

0 comments on commit 9557d78

Please sign in to comment.