Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-itemloaders for openSUSE:Factory checked in at 2024-04-21 20:27:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-itemloaders (Old) and /work/SRC/openSUSE:Factory/.python-itemloaders.new.26366 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-itemloaders" Sun Apr 21 20:27:55 2024 rev:5 rq:1169389 version:1.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-itemloaders/python-itemloaders.changes 2024-01-07 21:40:06.215585412 +0100 +++ /work/SRC/openSUSE:Factory/.python-itemloaders.new.26366/python-itemloaders.changes 2024-04-21 20:29:29.514789591 +0200 @@ -1,0 +2,9 @@ +Sat Apr 20 15:44:50 UTC 2024 - Dirk Müller <[email protected]> + +- update to 1.2.0: + * Added official support for Python 3.12 and PyPy 3.10 + * Removed official support for Python 3.7 + * Improved performance of ``itemloaders.utils.arg_to_iter`` + * Fixed test expectations on recent Python versions + +------------------------------------------------------------------- Old: ---- itemloaders-1.1.0-gh.tar.gz New: ---- itemloaders-1.2.0-gh.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-itemloaders.spec ++++++ --- /var/tmp/diff_new_pack.BMkJS6/_old 2024-04-21 20:29:31.494862279 +0200 +++ /var/tmp/diff_new_pack.BMkJS6/_new 2024-04-21 20:29:31.498862426 +0200 @@ -16,12 +16,9 @@ # -%{?!python_module:%define python_module() python3-%{**}} -%define skip_python2 1 -# Scrapy and thus itemadapter on TW have disabled python36 due to uvloop -%define skip_python36 1 +%{?sle15_python_module_pythons} Name: python-itemloaders -Version: 1.1.0 +Version: 1.2.0 Release: 0 Summary: Base library for scrapy's ItemLoader License: BSD-3-Clause ++++++ itemloaders-1.1.0-gh.tar.gz -> itemloaders-1.2.0-gh.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.1.0/.bumpversion.cfg new/itemloaders-1.2.0/.bumpversion.cfg --- old/itemloaders-1.1.0/.bumpversion.cfg 2023-04-21 10:54:24.000000000 +0200 +++ new/itemloaders-1.2.0/.bumpversion.cfg 2024-04-18 11:51:35.000000000 +0200 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.1.0 +current_version = 1.2.0 commit = True tag = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.1.0/.github/workflows/main.yml new/itemloaders-1.2.0/.github/workflows/main.yml --- old/itemloaders-1.1.0/.github/workflows/main.yml 2023-04-21 10:54:24.000000000 +0200 +++ new/itemloaders-1.2.0/.github/workflows/main.yml 2024-04-18 11:51:35.000000000 +0200 @@ -6,33 +6,34 @@ pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: "3.11" - - uses: pre-commit/[email protected] + python-version: "3.12" + - uses: pre-commit/[email protected] tests: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: include: - - python-version: 3 + - python-version: '3.12' # Keep in sync with .readthedocs.yml env: TOXENV: docs - - python-version: 3 + - python-version: '3.12' env: TOXENV: twinecheck - - python-version: 3.7 - env: - TOXENV: py - python-version: 3.8 env: TOXENV: py - python-version: 3.9 env: TOXENV: py - - python-version: pypy-3.7 + - python-version: pypy-3.9 + env: + TOXENV: py + - python-version: pypy-3.10 env: TOXENV: py - python-version: 3.9 @@ -44,15 +45,18 @@ - python-version: '3.11' env: TOXENV: py + - python-version: '3.12' + env: + TOXENV: py steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install system libraries if: contains(matrix.python-version, 'pypy') run: | sudo apt-get update sudo apt-get install libxml2-dev libxslt-dev - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.1.0/.github/workflows/publish.yml new/itemloaders-1.2.0/.github/workflows/publish.yml --- old/itemloaders-1.1.0/.github/workflows/publish.yml 2023-04-21 10:54:24.000000000 +0200 +++ new/itemloaders-1.2.0/.github/workflows/publish.yml 2024-04-18 11:51:35.000000000 +0200 @@ -6,21 +6,19 @@ publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3 + python-version: 3.12 - name: Install dependencies run: | python -m pip install --upgrade pip - pip install --upgrade setuptools wheel twine + pip install --upgrade build twine - name: Build run: | - python setup.py sdist bdist_wheel + python -m build - name: Upload - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - run: | - twine upload dist/* + uses: pypa/[email protected] + with: + password: ${{ secrets.PYPI_TOKEN }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.1.0/.pre-commit-config.yaml new/itemloaders-1.2.0/.pre-commit-config.yaml --- old/itemloaders-1.1.0/.pre-commit-config.yaml 2023-04-21 10:54:24.000000000 +0200 +++ new/itemloaders-1.2.0/.pre-commit-config.yaml 2024-04-18 11:51:35.000000000 +0200 @@ -1,16 +1,16 @@ default_language_version: - python: python3.10 + python: python3.12 repos: - hooks: - id: black language_version: python3 repo: https://github.com/ambv/black - rev: 23.3.0 + rev: 24.4.0 - hooks: - id: isort language_version: python3 repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 - hooks: - id: flake8 language_version: python3 @@ -21,4 +21,4 @@ - flake8-docstrings - flake8-string-format repo: https://github.com/pycqa/flake8 - rev: 6.0.0 + rev: 7.0.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.1.0/.readthedocs.yml new/itemloaders-1.2.0/.readthedocs.yml --- old/itemloaders-1.1.0/.readthedocs.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/itemloaders-1.2.0/.readthedocs.yml 2024-04-18 11:51:35.000000000 +0200 @@ -0,0 +1,14 @@ +version: 2 +formats: all +sphinx: + configuration: docs/conf.py + +build: + os: ubuntu-22.04 + tools: + python: "3.12" # Keep in sync with .github/workflows/main.yml + +python: + install: + - requirements: docs/requirements.txt + - path: . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.1.0/docs/release-notes.rst new/itemloaders-1.2.0/docs/release-notes.rst --- old/itemloaders-1.1.0/docs/release-notes.rst 2023-04-21 10:54:24.000000000 +0200 +++ new/itemloaders-1.2.0/docs/release-notes.rst 2024-04-18 11:51:35.000000000 +0200 @@ -5,6 +5,21 @@ Release notes ============= +.. _release-1.2.0: + +itemloaders 1.2.0 (2024-04-18) +------------------------------ + +- Added official support for Python 3.12 and PyPy 3.10 (:gh:`75`) + +- Removed official support for Python 3.7 (:gh:`72`) + +- Improved performance of ``itemloaders.utils.arg_to_iter`` (:gh:`51`) + +- Fixed test expectations on recent Python versions (:gh:`77`) + +- Improved CI (:gh:`78`) + .. _release-1.1.0: itemloaders 1.1.0 (2023-04-21) @@ -29,10 +44,10 @@ itemloaders 1.0.6 (2022-08-29) ------------------------------ -Fixes a regression introduced in 1.0.5 that would cause the ``re`` parameter of -:meth:`ItemLoader.add_xpath` and similar methods to be passed to lxml, which -would trigger an exception when the value of ``re`` was a compiled pattern and -not a string (:gh:`56`) +- Fixes a regression introduced in 1.0.5 that would cause the ``re`` parameter of + :meth:`ItemLoader.add_xpath` and similar methods to be passed to lxml, which + would trigger an exception when the value of ``re`` was a compiled pattern and + not a string (:gh:`56`) .. _release-1.0.5: @@ -112,7 +127,7 @@ itemloaders 1.0.0 (2020-05-18) ------------------------------ -Initial release, based on a part of the :doc:`Scrapy <scrapy:index>` code base. +- Initial release, based on a part of the :doc:`Scrapy <scrapy:index>` code base. .. _itemadapter: https://github.com/scrapy/itemadapter#itemadapter diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.1.0/itemloaders/__init__.py new/itemloaders-1.2.0/itemloaders/__init__.py --- old/itemloaders-1.1.0/itemloaders/__init__.py 2023-04-21 10:54:24.000000000 +0200 +++ new/itemloaders-1.2.0/itemloaders/__init__.py 2024-04-18 11:51:35.000000000 +0200 @@ -3,6 +3,7 @@ See documentation in docs/topics/loaders.rst """ + from contextlib import suppress from itemadapter import ItemAdapter diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.1.0/itemloaders/processors.py new/itemloaders-1.2.0/itemloaders/processors.py --- old/itemloaders-1.1.0/itemloaders/processors.py 2023-04-21 10:54:24.000000000 +0200 +++ new/itemloaders-1.2.0/itemloaders/processors.py 2024-04-18 11:51:35.000000000 +0200 @@ -3,6 +3,7 @@ See documentation in docs/topics/loaders.rst """ + from collections import ChainMap from itemloaders.common import wrap_loader_context diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.1.0/itemloaders/utils.py new/itemloaders-1.2.0/itemloaders/utils.py --- old/itemloaders-1.1.0/itemloaders/utils.py 2023-04-21 10:54:24.000000000 +0200 +++ new/itemloaders-1.2.0/itemloaders/utils.py 2024-04-18 11:51:35.000000000 +0200 @@ -2,30 +2,27 @@ Copy/paste from scrapy source at the moment, to ensure tests are working. Refactoring to come later """ + import inspect from functools import partial +from typing import Generator -from itemadapter import is_item -_ITERABLE_SINGLE_VALUES = str, bytes +def arg_to_iter(arg): + """Return an iterable based on *arg*. + If *arg* is a list, a tuple or a generator, it will be returned as is. -def arg_to_iter(arg): - """Convert an argument to an iterable. The argument can be a None, single - value, or an iterable. + If *arg* is ``None``, an empty list will be returned. - Exception: if arg is a dict, [arg] will be returned + If *arg* is anything else, a list will be returned with *arg* as its only + item, i.e. ``[arg]``. """ if arg is None: return [] - elif ( - hasattr(arg, "__iter__") - and not isinstance(arg, _ITERABLE_SINGLE_VALUES) - and not is_item(arg) - ): + if isinstance(arg, (list, tuple, Generator)): return arg - else: - return [arg] + return [arg] def get_func_args(func, stripself=False): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.1.0/setup.py new/itemloaders-1.2.0/setup.py --- old/itemloaders-1.1.0/setup.py 2023-04-21 10:54:24.000000000 +0200 +++ new/itemloaders-1.2.0/setup.py 2024-04-18 11:51:35.000000000 +0200 @@ -5,7 +5,7 @@ setup( name="itemloaders", - version="1.1.0", + version="1.2.0", url="https://github.com/scrapy/itemloaders", project_urls={ "Documentation": "https://itemloaders.readthedocs.io/", @@ -27,15 +27,15 @@ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ], - python_requires=">=3.7", + python_requires=">=3.8", install_requires=[ # before updating these versions, be sure they are not higher than # scrapy's requirements diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.1.0/tests/test_utils_python.py new/itemloaders-1.2.0/tests/test_utils_python.py --- old/itemloaders-1.1.0/tests/test_utils_python.py 2023-04-21 10:54:24.000000000 +0200 +++ new/itemloaders-1.2.0/tests/test_utils_python.py 2024-04-18 11:51:35.000000000 +0200 @@ -48,8 +48,11 @@ self.assertEqual(get_func_args(" ".join, stripself=True), ["iterable"]) if platform.python_implementation() == "CPython": - # doesn't work on CPython: https://bugs.python.org/issue42785 - self.assertEqual(get_func_args(operator.itemgetter(2)), []) + # This didn't work on older versions of CPython: https://github.com/python/cpython/issues/86951 + self.assertIn( + get_func_args(operator.itemgetter(2), stripself=True), + [[], ["args", "kwargs"]], + ) elif platform.python_implementation() == "PyPy": self.assertEqual( get_func_args(operator.itemgetter(2), stripself=True), ["obj"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.1.0/tox.ini new/itemloaders-1.2.0/tox.ini --- old/itemloaders-1.1.0/tox.ini 2023-04-21 10:54:24.000000000 +0200 +++ new/itemloaders-1.2.0/tox.ini 2024-04-18 11:51:35.000000000 +0200 @@ -1,5 +1,5 @@ [tox] -envlist = py35,py36,py37,py38,py39,py310 +envlist = py38,py39,py310,py311,py312 [testenv] deps = @@ -40,8 +40,8 @@ [testenv:twinecheck] basepython = python3 deps = - twine==4.0.2 - build==0.10.0 + twine==5.0.0 + build==1.2.1 commands = python -m build --sdist twine check dist/*
