mirror of https://github.com/scrapy/scrapy.git
commit
b4bad97eae
|
|
@ -12,7 +12,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- python-version: "3.12"
|
- python-version: "3.13"
|
||||||
env:
|
env:
|
||||||
TOXENV: pylint
|
TOXENV: pylint
|
||||||
- python-version: "3.9"
|
- python-version: "3.9"
|
||||||
|
|
@ -24,7 +24,7 @@ jobs:
|
||||||
- python-version: "3.12" # Keep in sync with .readthedocs.yml
|
- python-version: "3.12" # Keep in sync with .readthedocs.yml
|
||||||
env:
|
env:
|
||||||
TOXENV: docs
|
TOXENV: docs
|
||||||
- python-version: "3.12"
|
- python-version: "3.13"
|
||||||
env:
|
env:
|
||||||
TOXENV: twinecheck
|
TOXENV: twinecheck
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.12
|
python-version: "3.13"
|
||||||
- run: |
|
- run: |
|
||||||
pip install --upgrade build twine
|
pip install --upgrade build twine
|
||||||
python -m build
|
python -m build
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,10 @@ jobs:
|
||||||
- python-version: "3.12"
|
- python-version: "3.12"
|
||||||
env:
|
env:
|
||||||
TOXENV: py
|
TOXENV: py
|
||||||
- python-version: "3.12"
|
- python-version: "3.13"
|
||||||
|
env:
|
||||||
|
TOXENV: py
|
||||||
|
- python-version: "3.13"
|
||||||
env:
|
env:
|
||||||
TOXENV: asyncio
|
TOXENV: asyncio
|
||||||
- python-version: pypy3.9
|
- python-version: pypy3.9
|
||||||
|
|
@ -51,10 +54,10 @@ jobs:
|
||||||
env:
|
env:
|
||||||
TOXENV: botocore-pinned
|
TOXENV: botocore-pinned
|
||||||
|
|
||||||
- python-version: "3.12"
|
- python-version: "3.13"
|
||||||
env:
|
env:
|
||||||
TOXENV: extra-deps
|
TOXENV: extra-deps
|
||||||
- python-version: "3.12"
|
- python-version: "3.13"
|
||||||
env:
|
env:
|
||||||
TOXENV: botocore
|
TOXENV: botocore
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,10 @@ jobs:
|
||||||
- python-version: "3.12"
|
- python-version: "3.12"
|
||||||
env:
|
env:
|
||||||
TOXENV: py
|
TOXENV: py
|
||||||
- python-version: "3.12"
|
- python-version: "3.13"
|
||||||
|
env:
|
||||||
|
TOXENV: py
|
||||||
|
- python-version: "3.13"
|
||||||
env:
|
env:
|
||||||
TOXENV: asyncio
|
TOXENV: asyncio
|
||||||
|
|
||||||
|
|
|
||||||
1
setup.py
1
setup.py
|
|
@ -62,6 +62,7 @@ setup(
|
||||||
"Programming Language :: Python :: 3.10",
|
"Programming Language :: Python :: 3.10",
|
||||||
"Programming Language :: Python :: 3.11",
|
"Programming Language :: Python :: 3.11",
|
||||||
"Programming Language :: Python :: 3.12",
|
"Programming Language :: Python :: 3.12",
|
||||||
|
"Programming Language :: Python :: 3.13",
|
||||||
"Programming Language :: Python :: Implementation :: CPython",
|
"Programming Language :: Python :: Implementation :: CPython",
|
||||||
"Programming Language :: Python :: Implementation :: PyPy",
|
"Programming Language :: Python :: Implementation :: PyPy",
|
||||||
"Topic :: Internet :: WWW/HTTP",
|
"Topic :: Internet :: WWW/HTTP",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import functools
|
import functools
|
||||||
import operator
|
import operator
|
||||||
import platform
|
import platform
|
||||||
|
import sys
|
||||||
|
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
|
|
||||||
|
|
@ -238,16 +239,18 @@ class UtilsPythonTestCase(unittest.TestCase):
|
||||||
self.assertEqual(get_func_args(str.split, stripself=True), ["sep", "maxsplit"])
|
self.assertEqual(get_func_args(str.split, stripself=True), ["sep", "maxsplit"])
|
||||||
self.assertEqual(get_func_args(" ".join, stripself=True), ["iterable"])
|
self.assertEqual(get_func_args(" ".join, stripself=True), ["iterable"])
|
||||||
|
|
||||||
if platform.python_implementation() == "CPython":
|
if sys.version_info >= (3, 13) or platform.python_implementation() == "PyPy":
|
||||||
# This didn't work on older versions of CPython: https://github.com/python/cpython/issues/86951
|
# the correct and correctly extracted signature
|
||||||
|
self.assertEqual(
|
||||||
|
get_func_args(operator.itemgetter(2), stripself=True), ["obj"]
|
||||||
|
)
|
||||||
|
elif platform.python_implementation() == "CPython":
|
||||||
|
# ["args", "kwargs"] is a correct result for the pre-3.13 incorrect function signature
|
||||||
|
# [] is an incorrect result on even older CPython (https://github.com/python/cpython/issues/86951)
|
||||||
self.assertIn(
|
self.assertIn(
|
||||||
get_func_args(operator.itemgetter(2), stripself=True),
|
get_func_args(operator.itemgetter(2), stripself=True),
|
||||||
[[], ["args", "kwargs"]],
|
[[], ["args", "kwargs"]],
|
||||||
)
|
)
|
||||||
elif platform.python_implementation() == "PyPy":
|
|
||||||
self.assertEqual(
|
|
||||||
get_func_args(operator.itemgetter(2), stripself=True), ["obj"]
|
|
||||||
)
|
|
||||||
|
|
||||||
def test_without_none_values(self):
|
def test_without_none_values(self):
|
||||||
self.assertEqual(without_none_values([1, None, 3, 4]), [1, 3, 4])
|
self.assertEqual(without_none_values([1, None, 3, 4]), [1, 3, 4])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue