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 2022-09-29 18:14:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-itemloaders (Old) and /work/SRC/openSUSE:Factory/.python-itemloaders.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-itemloaders" Thu Sep 29 18:14:21 2022 rev:3 rq:1006901 version:1.0.6 Changes: -------- --- /work/SRC/openSUSE:Factory/python-itemloaders/python-itemloaders.changes 2021-10-30 23:14:52.439110378 +0200 +++ /work/SRC/openSUSE:Factory/.python-itemloaders.new.2275/python-itemloaders.changes 2022-09-29 18:15:10.847469344 +0200 @@ -1,0 +2,7 @@ +Thu Sep 29 02:56:10 UTC 2022 - Yogalakshmi Arunachalam <[email protected]> + +- Update to v1.0.6 + Fixes a regression introduced in 1.0.5 that would cause the re parameter of 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 (#56). + +------------------------------------------------------------------- Old: ---- itemloaders-1.0.4-gh.tar.gz New: ---- itemloaders-1.0.6-gh.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-itemloaders.spec ++++++ --- /var/tmp/diff_new_pack.9l84rC/_old 2022-09-29 18:15:11.303470238 +0200 +++ /var/tmp/diff_new_pack.9l84rC/_new 2022-09-29 18:15:11.311470253 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-itemloaders # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,7 +21,7 @@ # Scrapy and thus itemadapter on TW have disabled python36 due to uvloop %define skip_python36 1 Name: python-itemloaders -Version: 1.0.4 +Version: 1.0.6 Release: 0 Summary: Base library for scrapy's ItemLoader License: BSD-3-Clause ++++++ itemloaders-1.0.4-gh.tar.gz -> itemloaders-1.0.6-gh.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.0.4/.bumpversion.cfg new/itemloaders-1.0.6/.bumpversion.cfg --- old/itemloaders-1.0.4/.bumpversion.cfg 2020-11-12 20:20:26.000000000 +0100 +++ new/itemloaders-1.0.6/.bumpversion.cfg 2022-08-29 12:00:30.000000000 +0200 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.0.4 +current_version = 1.0.6 commit = True tag = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.0.4/.github/workflows/main.yml new/itemloaders-1.0.6/.github/workflows/main.yml --- old/itemloaders-1.0.4/.github/workflows/main.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/itemloaders-1.0.6/.github/workflows/main.yml 2022-08-29 12:00:30.000000000 +0200 @@ -0,0 +1,54 @@ +name: CI +on: +- pull_request +- push +jobs: + tests: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - python-version: 3 + env: + TOXENV: docs + - python-version: 3.6 + env: + TOXENV: py + - 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 + env: + TOXENV: py + - python-version: 3.9 + env: + TOXENV: extra-deps + - python-version: '3.10' + env: + TOXENV: py + steps: + - uses: actions/checkout@v2 + - 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 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --upgrade tox codecov + - name: Run tests + env: ${{ matrix.env }} + run: tox + - name: Publish coverage data + uses: codecov/codecov-action@v1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.0.4/.github/workflows/publish.yml new/itemloaders-1.0.6/.github/workflows/publish.yml --- old/itemloaders-1.0.4/.github/workflows/publish.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/itemloaders-1.0.6/.github/workflows/publish.yml 2022-08-29 12:00:30.000000000 +0200 @@ -0,0 +1,26 @@ +name: Publish on PyPI +on: + release: + types: [created] +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --upgrade setuptools wheel twine + - name: Build + run: | + python setup.py sdist bdist_wheel + - name: Upload + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + twine upload dist/* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.0.4/.travis.yml new/itemloaders-1.0.6/.travis.yml --- old/itemloaders-1.0.4/.travis.yml 2020-11-12 20:20:26.000000000 +0100 +++ new/itemloaders-1.0.6/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,44 +0,0 @@ -language: python - -branches: - only: - - master - - /^v\d\.\d\.\d+$/ - -matrix: - include: - - python: 3.7 - env: TOXENV=docs - - - python: 3.6 - env: TOXENV=py - - python: 3.7 - env: TOXENV=py - - python: 3.8 - env: TOXENV=py PYPI_RELEASE_JOB=true - - - python: pypy3 - env: TOXENV=pypy3 - - - python: 3.8 - env: TOXENV=extra-deps - -install: -- pip install -U tox codecov - -script: tox - -after_success: -- codecov - -deploy: - on: - branch: master - tags: true - condition: "$PYPI_RELEASE_JOB == true" - repo: scrapy/itemloaders - provider: pypi - distributions: "sdist bdist_wheel" - user: __token__ - password: - secure: ivS69RMcje0a6J0ZMZ8897Nbg2sQ+NxAuqQNsYwU9N4tU76n7c2l9TPoKZCVKyruBUYSKCLZeDEKEtqbv2JNR1YGuSwBCw9Dlo6UDZr6YthBnb0LST9H0llD/w0s1Z9Wpe4azwNxZUPs5/AJEXdYh/3yPYP86fjW8+TZx071Nyg1VdgOXedXcS46RdoZHLXQZQW+Zdz43y0AzxGYaGBPF/VrrHQ3GQZ1FOr0l4hyLWlFSR8Ce2C1px0GVa4IJ3fibpQhr+4YvlSrbgWK3OElieG1OUa5T/jEJwoGr4DjVLjd9Fd2yE3huWy8af7O01Ja26DHcKOfBd3lN19UB0Pv2hLJW9a4dCkbI2PIZa54cpw5FuNPU2C6mCdFMAL8uks9+132vCnNwM7Npt17vMJISz87ylOZM3cctjnQwYKzeGcPS7MdbLrTMXeILC7Ag+4fkYONaBYpYZ+dyCiHFSAJyql7O5pOeLPK9hdJmINYsuGW3rSq/WIbJxS7xmydsIOQwSzOfVhqreLAZiFxvDbXXTsUyQj7vfMbd26RJFq0Vlg+QybNGKcIEx47CvclOgzK7iT5oYkM0M6AaRkXIplrpynypqTlUprim9aN4PPQMBO64Xk6+us2ka0SMup+7JhcoIE4t2AjOwK3DvWMImldV9fvO1UqA49ypHdOdt67JVk= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.0.4/README.rst new/itemloaders-1.0.6/README.rst --- old/itemloaders-1.0.4/README.rst 2020-11-12 20:20:26.000000000 +0100 +++ new/itemloaders-1.0.6/README.rst 2022-08-29 12:00:30.000000000 +0200 @@ -10,9 +10,9 @@ :target: https://pypi.python.org/pypi/itemloaders :alt: Supported Python Versions -.. image:: https://travis-ci.com/scrapy/itemloaders.svg?branch=master - :target: https://travis-ci.com/scrapy/itemloaders - :alt: Build Status +.. image:: https://github.com/scrapy/itemloaders/workflows/CI/badge.svg?branch=master + :target: https://github.com/scrapy/itemloaders/actions?workflow=CI + :alt: CI Status .. image:: https://codecov.io/github/scrapy/itemloaders/coverage.svg?branch=master :target: https://codecov.io/gh/scrapy/itemloaders diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.0.4/docs/conf.py new/itemloaders-1.0.6/docs/conf.py --- old/itemloaders-1.0.4/docs/conf.py 2020-11-12 20:20:26.000000000 +0100 +++ new/itemloaders-1.0.6/docs/conf.py 2022-08-29 12:00:30.000000000 +0200 @@ -48,7 +48,7 @@ # General information about the project. project = 'itemloaders' -copyright = '2020???{}, Scrapinghub'.format(datetime.now().year) +copyright = '2020???{}, Zyte Group Ltd'.format(datetime.now().year) # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -187,7 +187,7 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, document class [howto/manual]). latex_documents = [ - ('index', 'itemloaders.tex', 'itemloaders Documentation', 'Scrapinghub', 'manual'), + ('index', 'itemloaders.tex', 'itemloaders Documentation', 'Zyte', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.0.4/docs/release-notes.rst new/itemloaders-1.0.6/docs/release-notes.rst --- old/itemloaders-1.0.4/docs/release-notes.rst 2020-11-12 20:20:26.000000000 +0100 +++ new/itemloaders-1.0.6/docs/release-notes.rst 2022-08-29 12:00:30.000000000 +0200 @@ -5,14 +5,39 @@ Release notes ============= +.. _release-1.0.6: + +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`) + +.. _release-1.0.5: + +itemloaders 1.0.5 (2022-08-25) +------------------------------ + +- Allow additional args to be passed when calling :meth:`ItemLoader.add_xpath` (:gh:`48`) + +- Fixed missing space in an exception message (:gh:`47`) + +- Updated company name in author and copyright sections (:gh:`42`) + +- Added official support for Python 3.9 and improved PyPy compatibility (:gh:`44`) + +- Added official support for Python 3.10 (:gh:`53`) + .. _release-1.0.4: -itemloaders 1.0.4 (2020-11-NN) +itemloaders 1.0.4 (2020-11-12) ------------------------------ -- When adding a :class:`scrapy.item.Item` object as a value into an +- When adding a :class:`scrapy.item.scrapy.Item` object as a value into an :class:`ItemLoader` object, that item is now added *as is*, instead of - becoming a :class:`list` of keys from its :attr:`~scrapy.item.Item.fields` + becoming a :class:`list` of keys from its :attr:`scrapy.item.scrapy.Item.fields` (:gh:`28`, :gh:`29`) - Increased test coverage (:gh:`27`) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.0.4/itemloaders/__init__.py new/itemloaders-1.0.6/itemloaders/__init__.py --- old/itemloaders-1.0.4/itemloaders/__init__.py 2020-11-12 20:20:26.000000000 +0100 +++ new/itemloaders-1.0.6/itemloaders/__init__.py 2022-08-29 12:00:30.000000000 +0200 @@ -158,7 +158,7 @@ ) return subloader - def add_value(self, field_name, value, *processors, **kw): + def add_value(self, field_name, value, *processors, re=None, **kw): """ Process and then add the given ``value`` for the given field. @@ -180,7 +180,7 @@ loader.add_value('name', 'name: foo', TakeFirst(), re='name: (.+)') loader.add_value(None, {'name': 'foo', 'sex': 'male'}) """ - value = self.get_value(value, *processors, **kw) + value = self.get_value(value, *processors, re=re, **kw) if value is None: return if not field_name: @@ -189,12 +189,12 @@ else: self._add_value(field_name, value) - def replace_value(self, field_name, value, *processors, **kw): + def replace_value(self, field_name, value, *processors, re=None, **kw): """ Similar to :meth:`add_value` but replaces the collected data with the new value instead of adding it. """ - value = self.get_value(value, *processors, **kw) + value = self.get_value(value, *processors, re=re, **kw) if value is None: return if not field_name: @@ -214,7 +214,7 @@ self._values.pop(field_name, None) self._add_value(field_name, value) - def get_value(self, value, *processors, **kw): + def get_value(self, value, *processors, re=None, **kw): """ Process the given ``value`` by the given ``processors`` and keyword arguments. @@ -234,10 +234,9 @@ >>> loader.get_value('name: foo', TakeFirst(), str.upper, re='name: (.+)') 'FOO' """ - regex = kw.get('re', None) - if regex: + if re: value = arg_to_iter(value) - value = flatten(extract_regex(regex, x) for x in value) + value = flatten(extract_regex(re, x) for x in value) for proc in processors: if value is None: @@ -323,11 +322,11 @@ def _check_selector_method(self): if self.selector is None: raise RuntimeError( - "To use XPath or CSS selectors, %s" + "To use XPath or CSS selectors, %s " "must be instantiated with a selector" % self.__class__.__name__ ) - def add_xpath(self, field_name, xpath, *processors, **kw): + def add_xpath(self, field_name, xpath, *processors, re=None, **kw): """ Similar to :meth:`ItemLoader.add_value` but receives an XPath instead of a value, which is used to extract a list of strings from the @@ -347,16 +346,16 @@ """ values = self._get_xpathvalues(xpath, **kw) - self.add_value(field_name, values, *processors, **kw) + self.add_value(field_name, values, *processors, re=re, **kw) - def replace_xpath(self, field_name, xpath, *processors, **kw): + def replace_xpath(self, field_name, xpath, *processors, re=None, **kw): """ Similar to :meth:`add_xpath` but replaces collected data instead of adding it. """ values = self._get_xpathvalues(xpath, **kw) - self.replace_value(field_name, values, *processors, **kw) + self.replace_value(field_name, values, *processors, re=re, **kw) - def get_xpath(self, xpath, *processors, **kw): + def get_xpath(self, xpath, *processors, re=None, **kw): """ Similar to :meth:`ItemLoader.get_value` but receives an XPath instead of a value, which is used to extract a list of unicode strings from the @@ -378,14 +377,14 @@ """ values = self._get_xpathvalues(xpath, **kw) - return self.get_value(values, *processors, **kw) + return self.get_value(values, *processors, re=re, **kw) def _get_xpathvalues(self, xpaths, **kw): self._check_selector_method() xpaths = arg_to_iter(xpaths) - return flatten(self.selector.xpath(xpath).getall() for xpath in xpaths) + return flatten(self.selector.xpath(xpath, **kw).getall() for xpath in xpaths) - def add_css(self, field_name, css, *processors, **kw): + def add_css(self, field_name, css, *processors, re=None, **kw): """ Similar to :meth:`ItemLoader.add_value` but receives a CSS selector instead of a value, which is used to extract a list of unicode strings @@ -404,16 +403,16 @@ loader.add_css('price', 'p#price', re='the price is (.*)') """ values = self._get_cssvalues(css, **kw) - self.add_value(field_name, values, *processors, **kw) + self.add_value(field_name, values, *processors, re=re, **kw) - def replace_css(self, field_name, css, *processors, **kw): + def replace_css(self, field_name, css, *processors, re=None, **kw): """ Similar to :meth:`add_css` but replaces collected data instead of adding it. """ values = self._get_cssvalues(css, **kw) - self.replace_value(field_name, values, *processors, **kw) + self.replace_value(field_name, values, *processors, re=re, **kw) - def get_css(self, css, *processors, **kw): + def get_css(self, css, *processors, re=None, **kw): """ Similar to :meth:`ItemLoader.get_value` but receives a CSS selector instead of a value, which is used to extract a list of unicode strings @@ -434,7 +433,7 @@ loader.get_css('p#price', TakeFirst(), re='the price is (.*)') """ values = self._get_cssvalues(css, **kw) - return self.get_value(values, *processors, **kw) + return self.get_value(values, *processors, re=re, **kw) def _get_cssvalues(self, csss, **kw): self._check_selector_method() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.0.4/itemloaders/utils.py new/itemloaders-1.0.6/itemloaders/utils.py --- old/itemloaders-1.0.4/itemloaders/utils.py 2020-11-12 20:20:26.000000000 +0100 +++ new/itemloaders-1.0.6/itemloaders/utils.py 2022-08-29 12:00:30.000000000 +0200 @@ -32,7 +32,8 @@ def get_func_args(func, stripself=False): """Return the argument name list of a callable""" if inspect.isfunction(func): - func_args, _, _, _ = _getargspec_py23(func) + spec = inspect.getfullargspec(func) + func_args = spec.args + spec.kwonlyargs elif inspect.isclass(func): return get_func_args(func.__init__, True) elif inspect.ismethod(func): @@ -50,7 +51,7 @@ else: return get_func_args(func.__call__, True) else: - raise TypeError('%s is not callable' % type(func)) + raise TypeError(f'{type(func)} is not callable') if stripself: func_args.pop(0) return func_args diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.0.4/setup.py new/itemloaders-1.0.6/setup.py --- old/itemloaders-1.0.4/setup.py 2020-11-12 20:20:26.000000000 +0100 +++ new/itemloaders-1.0.6/setup.py 2022-08-29 12:00:30.000000000 +0200 @@ -5,7 +5,7 @@ setup( name='itemloaders', - version='1.0.4', + version='1.0.6', url='https://github.com/scrapy/itemloaders', project_urls={ 'Documentation': 'https://itemloaders.readthedocs.io/', @@ -14,8 +14,8 @@ description="Base library for scrapy's ItemLoader", long_description=long_description, long_description_content_type="text/x-rst", - author='Scrapinghub', - author_email='[email protected]', + author='Zyte', + author_email='[email protected]', license='BSD', packages=find_packages(exclude=('tests', 'tests.*')), include_package_data=True, @@ -30,6 +30,8 @@ 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', ], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.0.4/tests/test_selector_loader.py new/itemloaders-1.0.6/tests/test_selector_loader.py --- old/itemloaders-1.0.4/tests/test_selector_loader.py 2020-11-12 20:20:26.000000000 +0100 +++ new/itemloaders-1.0.6/tests/test_selector_loader.py 2022-08-29 12:00:30.000000000 +0200 @@ -1,3 +1,4 @@ +import re import unittest from parsel import Selector @@ -64,6 +65,19 @@ loader.add_xpath('name', '//div/text()', re='ma') self.assertEqual(loader.get_output_value('name'), ['Ma']) + loader = CustomItemLoader(selector=self.selector) + loader.add_xpath('name', '//div/text()', re=re.compile('ma')) + self.assertEqual(loader.get_output_value('name'), ['Ma']) + + + def test_add_xpath_variables(self): + loader = CustomItemLoader(selector=self.selector) + loader.add_xpath('name', 'id($id)/text()', id="id") + self.assertEqual(loader.get_output_value('name'), ['Marta']) + loader = CustomItemLoader(selector=self.selector) + loader.add_xpath('name', 'id($id)/text()', id="id2") + self.assertEqual(loader.get_output_value('name'), []) + def test_replace_xpath(self): loader = CustomItemLoader(selector=self.selector) self.assertTrue(loader.selector) @@ -106,6 +120,13 @@ loader.add_css('url', 'a::attr(href)', re='http://(.+)') self.assertEqual(loader.get_output_value('url'), ['www.scrapy.org']) + loader = CustomItemLoader(selector=self.selector) + loader.add_css('name', 'div::text', re=re.compile('ma')) + self.assertEqual(loader.get_output_value('name'), ['Ma']) + + loader.add_css('url', 'a::attr(href)', re=re.compile('http://(.+)')) + self.assertEqual(loader.get_output_value('url'), ['www.scrapy.org']) + def test_replace_css(self): loader = CustomItemLoader(selector=self.selector) self.assertTrue(loader.selector) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.0.4/tests/test_utils_python.py new/itemloaders-1.0.6/tests/test_utils_python.py --- old/itemloaders-1.0.4/tests/test_utils_python.py 2020-11-12 20:20:26.000000000 +0100 +++ new/itemloaders-1.0.6/tests/test_utils_python.py 2022-08-29 12:00:30.000000000 +0200 @@ -1,7 +1,8 @@ +import functools import operator import platform -import functools import unittest +from datetime import datetime from itemloaders.utils import get_func_args @@ -15,14 +16,17 @@ def f2(a, b=None, c=None): pass - class A(object): + def f3(a, b=None, *, c=None): + pass + + class A: def __init__(self, a, b, c): pass def method(self, a, b, c): pass - class Callable(object): + class Callable: def __call__(self, a, b, c): pass @@ -35,6 +39,7 @@ self.assertEqual(get_func_args(f1), ['a', 'b', 'c']) self.assertEqual(get_func_args(f2), ['a', 'b', 'c']) + self.assertEqual(get_func_args(f3), ['a', 'b', 'c']) self.assertEqual(get_func_args(A), ['a', 'b', 'c']) self.assertEqual(get_func_args(a.method), ['a', 'b', 'c']) self.assertEqual(get_func_args(partial_f1), ['b', 'c']) @@ -42,20 +47,21 @@ self.assertEqual(get_func_args(partial_f3), ['c']) self.assertEqual(get_func_args(cal), ['a', 'b', 'c']) self.assertEqual(get_func_args(object), []) - with self.assertRaises(TypeError): - get_func_args(None) if platform.python_implementation() == 'CPython': # TODO: how do we fix this to return the actual argument names? self.assertEqual(get_func_args(str.split), []) self.assertEqual(get_func_args(" ".join), []) self.assertEqual(get_func_args(operator.itemgetter(2)), []) - else: - self.assertEqual( - get_func_args(str.split, True), ['sep', 'maxsplit']) - self.assertEqual(get_func_args(" ".join, True), ['list']) - self.assertEqual( - get_func_args(operator.itemgetter(2), True), ['obj']) + elif platform.python_implementation() == 'PyPy': + self.assertEqual(get_func_args(str.split, stripself=True), ['sep', 'maxsplit']) + self.assertEqual(get_func_args(operator.itemgetter(2), stripself=True), ['obj']) + + build_date = datetime.strptime(platform.python_build()[1], '%b %d %Y') + if build_date >= datetime(2020, 4, 7): # PyPy 3.6-v7.3.1 + self.assertEqual(get_func_args(" ".join, stripself=True), ['iterable']) + else: + self.assertEqual(get_func_args(" ".join, stripself=True), ['list']) if __name__ == "__main__": diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itemloaders-1.0.4/tox.ini new/itemloaders-1.0.6/tox.ini --- old/itemloaders-1.0.4/tox.ini 2020-11-12 20:20:26.000000000 +0100 +++ new/itemloaders-1.0.6/tox.ini 2022-08-29 12:00:30.000000000 +0200 @@ -1,5 +1,5 @@ [tox] -envlist = py35,py36,py37,py38 +envlist = py35,py36,py37,py38,py39,py310 [testenv] deps =
