Repository: scrapy/scrapy (branch: simplify-attempt2)
Commit date: 2023-12-10T17:38:48Z

Workflow file: .github/workflows/checks.yml (Checks)
name: Checks
on: [push, pull_request]

concurrency:
  group: ${{github.workflow}}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  checks:
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    strategy:
      fail-fast: false
      matrix:
        include:
        - python-version: "3.12"
          env:
            TOXENV: pylint
        - python-version: 3.8
          env:
            TOXENV: typing
        - python-version: "3.11"  # Keep in sync with .readthedocs.yml
          env:
            TOXENV: docs
        - python-version: "3.12"
          env:
            TOXENV: twinecheck

    steps:
    - uses: actions/checkout@v4

    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python-version }}

    - name: Run check
      env: ${{ matrix.env }}
      run: |
        pip install -U tox
        tox

  pre-commit:
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    steps:
    - uses: actions/checkout@v4
    - uses: pre-commit/action@v3.0.0

env:
  PIP_INDEX_URL: http://localhost:8629/2023-12-10
  UV_INDEX_URL: http://localhost:8629/2023-12-10


Failed build logs:
step_name: checks (3.12, pylint)/4_Run check.txt
log: ##[group]Run pip install -U tox
[36;1mpip install -U tox[0m
[36;1mtox[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.12.0/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib
  TOXENV: pylint
##[endgroup]
Collecting tox
  Downloading tox-4.11.4-py3-none-any.whl.metadata (5.0 kB)
Collecting cachetools>=5.3.1 (from tox)
  Downloading cachetools-5.3.2-py3-none-any.whl.metadata (5.2 kB)
Collecting chardet>=5.2 (from tox)
  Downloading chardet-5.2.0-py3-none-any.whl.metadata (3.4 kB)
Collecting colorama>=0.4.6 (from tox)
  Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting filelock>=3.12.3 (from tox)
  Downloading filelock-3.13.1-py3-none-any.whl.metadata (2.8 kB)
Collecting packaging>=23.1 (from tox)
  Downloading packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
Collecting platformdirs>=3.10 (from tox)
  Downloading platformdirs-4.1.0-py3-none-any.whl.metadata (11 kB)
Collecting pluggy>=1.3 (from tox)
  Downloading pluggy-1.3.0-py3-none-any.whl.metadata (4.3 kB)
Collecting pyproject-api>=1.6.1 (from tox)
  Downloading pyproject_api-1.6.1-py3-none-any.whl.metadata (2.8 kB)
Collecting virtualenv>=20.24.3 (from tox)
  Downloading virtualenv-20.25.0-py3-none-any.whl.metadata (4.5 kB)
Collecting distlib<1,>=0.3.7 (from virtualenv>=20.24.3->tox)
  Downloading distlib-0.3.7-py2.py3-none-any.whl.metadata (5.1 kB)
Downloading tox-4.11.4-py3-none-any.whl (153 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.0/154.0 kB 19.9 MB/s eta 0:00:00
Downloading cachetools-5.3.2-py3-none-any.whl (9.3 kB)
Downloading chardet-5.2.0-py3-none-any.whl (199 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.4/199.4 kB 51.7 MB/s eta 0:00:00
Downloading filelock-3.13.1-py3-none-any.whl (11 kB)
Downloading packaging-23.2-py3-none-any.whl (53 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.0/53.0 kB 16.5 MB/s eta 0:00:00
Downloading platformdirs-4.1.0-py3-none-any.whl (17 kB)
Downloading pluggy-1.3.0-py3-none-any.whl (18 kB)
Downloading pyproject_api-1.6.1-py3-none-any.whl (12 kB)
Downloading virtualenv-20.25.0-py3-none-any.whl (3.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.8/3.8 MB 117.4 MB/s eta 0:00:00
Downloading distlib-0.3.7-py2.py3-none-any.whl (468 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 kB 82.7 MB/s eta 0:00:00
Installing collected packages: distlib, pluggy, platformdirs, packaging, filelock, colorama, chardet, cachetools, virtualenv, pyproject-api, tox
Successfully installed cachetools-5.3.2 chardet-5.2.0 colorama-0.4.6 distlib-0.3.7 filelock-3.13.1 packaging-23.2 platformdirs-4.1.0 pluggy-1.3.0 pyproject-api-1.6.1 tox-4.11.4 virtualenv-20.25.0
pylint: install_deps> python -I -m pip install -ctests/upper-constraints.txt boto3 google-cloud-storage 'markupsafe<2.1.0' 'mitmproxy<8,>=4.0.4; python_version < "3.9" and implementation_name != "pypy"' Pillow pylint==3.0.1 robotexclusionrulesparser 'Twisted[http2]' -r tests/requirements.txt
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: freeze> python -m pip freeze --all
.pkg: pip==23.3.1,setuptools==69.0.2,wheel==0.42.0
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
pylint: install_package_deps> python -I -m pip install -ctests/upper-constraints.txt 'PyDispatcher>=2.0.5; platform_python_implementation == "CPython"' 'PyPyDispatcher>=2.1.0; platform_python_implementation == "PyPy"' 'Twisted>=18.9.0' 'cryptography>=36.0.0' 'cssselect>=0.9.1' 'itemadapter>=0.1.0' 'itemloaders>=1.0.1' 'lxml>=4.4.1' packaging 'parsel>=1.5.0' 'protego>=0.1.15' 'pyOpenSSL>=21.0.0' 'queuelib>=1.4.2' 'service-identity>=18.1.0' setuptools tldextract 'w3lib>=1.17.0' 'zope.interface>=5.1.0'
pylint: install_package> python -I -m pip install -ctests/upper-constraints.txt --force-reinstall --no-deps /home/runner/work/scrapy/scrapy/.tox/.tmp/package/1/Scrapy-2.11.0.tar.gz
pylint: freeze> python -m pip freeze --all
pylint: annotated-types==0.6.0,astroid==3.0.1,asttokens==2.4.1,attrs==23.1.0,Automat==22.10.0,blessed==1.20.0,boto3==1.33.11,botocore==1.33.11,bpython==0.24,Brotli==1.1.0,cachetools==5.3.2,Cerberus==1.3.5,certifi==2023.11.17,cffi==1.16.0,charset-normalizer==3.3.2,constantly==23.10.4,coverage==7.3.2,cryptography==41.0.7,cssselect==1.2.0,curtsies==0.4.2,cwcwidth==0.1.9,decorator==5.1.1,dill==0.3.7,distlib==0.3.7,docopt==0.6.2,execnet==2.0.2,executing==2.0.1,filelock==3.13.1,google-api-core==2.15.0,google-auth==2.25.2,google-cloud-core==2.4.1,google-cloud-storage==2.13.0,google-crc32c==1.5.0,google-resumable-media==2.6.0,googleapis-common-protos==1.62.0,greenlet==3.0.2,h2==4.1.0,hpack==4.0.0,hyperframe==6.0.1,hyperlink==21.0.0,idna==3.6,incremental==22.10.0,iniconfig==2.0.0,ipython==8.18.1,isort==5.13.0,itemadapter==0.8.0,itemloaders==1.1.0,jedi==0.19.1,jmespath==1.0.1,lxml==4.9.3,MarkupSafe==2.0.1,matplotlib-inline==0.1.6,mccabe==0.7.0,packaging==23.2,parsel==1.8.1,parso==0.8.3,pep517==0.13.1,pexpect==4.9.0,Pillow==10.1.0,pip==23.3.1,pip-api==0.0.30,pipreqs==0.4.13,platformdirs==4.1.0,plette==0.4.4,pluggy==1.3.0,priority==1.3.0,prompt-toolkit==3.0.41,Protego==0.3.0,protobuf==4.25.1,ptyprocess==0.7.0,pure-eval==0.2.2,pyasn1==0.5.1,pyasn1-modules==0.3.0,pycparser==2.21,pydantic==2.5.2,pydantic_core==2.14.5,PyDispatcher==2.0.7,pyftpdlib==1.5.9,Pygments==2.17.2,pylint==3.0.1,pyOpenSSL==23.3.0,pytest==7.4.3,pytest-cov==4.0.0,pytest-xdist==3.5.0,python-dateutil==2.8.2,pyxdg==0.28,queuelib==1.6.2,requests==2.31.0,requests-file==1.5.1,requirementslib==3.0.0,robotexclusionrulesparser==1.7.1,rsa==4.9,s3transfer==0.8.2,Scrapy @ file:///home/runner/work/scrapy/scrapy/.tox/.tmp/package/1/Scrapy-2.11.0.tar.gz#sha256=badae26f961983adc76ef32b8b07c6ba5b979a31f891e5f2e57590381cc5b815,service-identity==23.1.0,setuptools==69.0.2,six==1.16.0,stack-data==0.6.3,sybil==6.0.2,testfixtures==7.2.2,tldextract==5.1.1,tomlkit==0.12.3,traitlets==5.14.0,Twisted==23.10.0,typing_extensions==4.9.0,urllib3==2.0.7,uvloop==0.19.0,w3lib==2.1.2,wcwidth==0.2.12,yarg==0.1.9,zope.interface==6.1,zstandard==0.22.0
pylint: commands[0]> pylint conftest.py docs extras scrapy setup.py tests
<unknown>:230: SyntaxWarning: invalid escape sequence '\d'
************* Module scrapy.crawler
scrapy/crawler.py:112:37: W1117: 'crawler' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
************* Module scrapy.core.engine
scrapy/core/engine.py:361:20: W1117: 'crawler' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
************* Module scrapy.core.scheduler
scrapy/core/scheduler.py:325:15: W1117: 'crawler' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
scrapy/core/scheduler.py:336:12: W1117: 'crawler' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
************* Module scrapy.core.downloader.contextfactory
scrapy/core/downloader/contextfactory.py:168:26: W1117: 'objcls' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
scrapy/core/downloader/contextfactory.py:168:26: W1117: 'crawler' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
scrapy/core/downloader/contextfactory.py:174:26: W1117: 'objcls' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
scrapy/core/downloader/contextfactory.py:174:26: W1117: 'crawler' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
************* Module scrapy.core.downloader.handlers
scrapy/core/downloader/handlers/__init__.py:58:17: W1117: 'objcls' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
scrapy/core/downloader/handlers/__init__.py:58:17: W1117: 'crawler' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
************* Module scrapy.core.downloader.handlers.http10
scrapy/core/downloader/handlers/http10.py:33:37: W1117: 'objcls' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
scrapy/core/downloader/handlers/http10.py:33:37: W1117: 'crawler' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
************* Module scrapy.core.downloader.handlers.s3
scrapy/core/downloader/handlers/s3.py:53:24: W1117: 'objcls' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
scrapy/core/downloader/handlers/s3.py:53:24: W1117: 'crawler' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
************* Module tests.test_downloader_handlers
tests/test_downloader_handlers.py:831:22: W1117: 'objcls' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
tests/test_downloader_handlers.py:831:22: W1117: 'crawler' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
tests/test_downloader_handlers.py:861:17: W1117: 'objcls' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
tests/test_downloader_handlers.py:861:17: W1117: 'crawler' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
tests/test_downloader_handlers.py:888:12: W1117: 'objcls' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
tests/test_downloader_handlers.py:888:12: W1117: 'crawler' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
************* Module tests.test_webclient
tests/test_webclient.py:473:33: W1117: 'settings' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)
tests/test_webclient.py:485:33: W1117: 'settings' will be included in '**kwargs' since a positional-only parameter with this name already exists (kwarg-superseded-by-positional-arg)

-----------------------------------
Your code has been rated at 9.99/10

pylint: exit 4 (53.83 seconds) /home/runner/work/scrapy/scrapy> pylint conftest.py docs extras scrapy setup.py tests pid=2037
.pkg: _exit> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  pylint: FAIL code 4 (100.80=setup[46.97]+cmd[53.83] seconds)
  evaluation failed :( (100.88 seconds)
##[error]Process completed with exit code 4.

step_name: checks (3.8, typing)/4_Run check.txt
log: ##[group]Run pip install -U tox
[36;1mpip install -U tox[0m
[36;1mtox[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib
  TOXENV: typing
##[endgroup]
Collecting tox
  Downloading tox-4.11.4-py3-none-any.whl.metadata (5.0 kB)
Collecting cachetools>=5.3.1 (from tox)
  Downloading cachetools-5.3.2-py3-none-any.whl.metadata (5.2 kB)
Collecting chardet>=5.2 (from tox)
  Downloading chardet-5.2.0-py3-none-any.whl.metadata (3.4 kB)
Collecting colorama>=0.4.6 (from tox)
  Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting filelock>=3.12.3 (from tox)
  Downloading filelock-3.13.1-py3-none-any.whl.metadata (2.8 kB)
Collecting packaging>=23.1 (from tox)
  Downloading packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
Collecting platformdirs>=3.10 (from tox)
  Downloading platformdirs-4.1.0-py3-none-any.whl.metadata (11 kB)
Collecting pluggy>=1.3 (from tox)
  Downloading pluggy-1.3.0-py3-none-any.whl.metadata (4.3 kB)
Collecting pyproject-api>=1.6.1 (from tox)
  Downloading pyproject_api-1.6.1-py3-none-any.whl.metadata (2.8 kB)
Collecting tomli>=2.0.1 (from tox)
  Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting virtualenv>=20.24.3 (from tox)
  Downloading virtualenv-20.25.0-py3-none-any.whl.metadata (4.5 kB)
Collecting distlib<1,>=0.3.7 (from virtualenv>=20.24.3->tox)
  Downloading distlib-0.3.7-py2.py3-none-any.whl.metadata (5.1 kB)
Downloading tox-4.11.4-py3-none-any.whl (153 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.0/154.0 kB 8.4 MB/s eta 0:00:00
Downloading cachetools-5.3.2-py3-none-any.whl (9.3 kB)
Downloading chardet-5.2.0-py3-none-any.whl (199 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.4/199.4 kB 32.2 MB/s eta 0:00:00
Downloading filelock-3.13.1-py3-none-any.whl (11 kB)
Downloading packaging-23.2-py3-none-any.whl (53 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.0/53.0 kB 17.1 MB/s eta 0:00:00
Downloading platformdirs-4.1.0-py3-none-any.whl (17 kB)
Downloading pluggy-1.3.0-py3-none-any.whl (18 kB)
Downloading pyproject_api-1.6.1-py3-none-any.whl (12 kB)
Downloading virtualenv-20.25.0-py3-none-any.whl (3.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.8/3.8 MB 82.9 MB/s eta 0:00:00
Downloading distlib-0.3.7-py2.py3-none-any.whl (468 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 kB 79.6 MB/s eta 0:00:00
Installing collected packages: distlib, tomli, pluggy, platformdirs, packaging, filelock, colorama, chardet, cachetools, virtualenv, pyproject-api, tox
Successfully installed cachetools-5.3.2 chardet-5.2.0 colorama-0.4.6 distlib-0.3.7 filelock-3.13.1 packaging-23.2 platformdirs-4.1.0 pluggy-1.3.0 pyproject-api-1.6.1 tomli-2.0.1 tox-4.11.4 virtualenv-20.25.0

[notice] A new release of pip is available: 23.0.1 -> 23.3.1
[notice] To update, run: pip install --upgrade pip
typing: install_deps> python -I -m pip install -ctests/upper-constraints.txt mypy==1.6.1 types-attrs==19.1.0 types-lxml==2023.10.21 types-Pillow==10.1.0.0 types-Pygments==2.16.0.0 types-pyOpenSSL==23.3.0.0 types-setuptools==68.2.0.0 typing-extensions==4.8.0 'w3lib>=2.1.2'
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: freeze> python -m pip freeze --all
.pkg: pip==23.3.1,setuptools==69.0.2,wheel==0.42.0
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
typing: install_package_deps> python -I -m pip install -ctests/upper-constraints.txt 'PyDispatcher>=2.0.5; platform_python_implementation == "CPython"' 'PyPyDispatcher>=2.1.0; platform_python_implementation == "PyPy"' 'Twisted>=18.9.0' 'cryptography>=36.0.0' 'cssselect>=0.9.1' 'itemadapter>=0.1.0' 'itemloaders>=1.0.1' 'lxml>=4.4.1' packaging 'parsel>=1.5.0' 'protego>=0.1.15' 'pyOpenSSL>=21.0.0' 'queuelib>=1.4.2' 'service-identity>=18.1.0' setuptools tldextract 'w3lib>=1.17.0' 'zope.interface>=5.1.0'
typing: install_package> python -I -m pip install -ctests/upper-constraints.txt --force-reinstall --no-deps /home/runner/work/scrapy/scrapy/.tox/.tmp/package/1/Scrapy-2.11.0.tar.gz
typing: freeze> python -m pip freeze --all
typing: attrs==23.1.0,Automat==22.10.0,certifi==2023.11.17,cffi==1.16.0,charset-normalizer==3.3.2,constantly==23.10.4,cryptography==41.0.7,cssselect==1.2.0,filelock==3.13.1,hyperlink==21.0.0,idna==3.6,incremental==22.10.0,itemadapter==0.8.0,itemloaders==1.1.0,jmespath==1.0.1,lxml==4.9.3,mypy==1.6.1,mypy-extensions==1.0.0,packaging==23.2,parsel==1.8.1,pip==23.3.1,Protego==0.3.0,pyasn1==0.5.1,pyasn1-modules==0.3.0,pycparser==2.21,PyDispatcher==2.0.7,pyOpenSSL==23.3.0,queuelib==1.6.2,requests==2.31.0,requests-file==1.5.1,Scrapy @ file:///home/runner/work/scrapy/scrapy/.tox/.tmp/package/1/Scrapy-2.11.0.tar.gz#sha256=ebe501ee4a51f734f99dff82a0f62429c4051d3976e2377b4c07e9f5fb55d533,service-identity==23.1.0,setuptools==69.0.2,six==1.16.0,tldextract==5.1.1,tomli==2.0.1,Twisted==23.10.0,types-attrs==19.1.0,types-beautifulsoup4==4.12.0.7,types-docutils==0.20.0.3,types-html5lib==1.1.11.15,types-lxml==2023.10.21,types-Pillow==10.1.0.0,types-Pygments==2.16.0.0,types-pyOpenSSL==23.3.0.0,types-setuptools==68.2.0.0,typing_extensions==4.8.0,urllib3==2.1.0,w3lib==2.1.2,wheel==0.42.0,zope.interface==6.1
typing: commands[0]> mypy scrapy tests
scrapy/core/downloader/handlers/__init__.py:58: error: Too few arguments for "build_from_crawler"  [call-arg]
scrapy/core/engine.py:361: error: Too few arguments for "build_from_crawler"  [call-arg]
scrapy/crawler.py:112: error: Too few arguments for "build_from_crawler"  [call-arg]
Found 3 errors in 3 files (checked 333 source files)
typing: exit 1 (8.99 seconds) /home/runner/work/scrapy/scrapy> mypy scrapy tests pid=1984
.pkg: _exit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  typing: FAIL code 1 (25.59=setup[16.60]+cmd[8.99] seconds)
  evaluation failed :( (25.71 seconds)
##[error]Process completed with exit code 1.


Changed files:
scrapy/core/downloader/contextfactory.py
scrapy/core/downloader/handlers/__init__.py
scrapy/core/downloader/handlers/http10.py
scrapy/core/downloader/handlers/s3.py
scrapy/core/engine.py
scrapy/core/scheduler.py
scrapy/crawler.py
tests/test_downloader_handlers.py
tests/test_webclient.py

Fix diff:
diff --git a/scrapy/core/downloader/contextfactory.py b/scrapy/core/downloader/contextfactory.py
index 9047a5b83..05d6e7a09 100644
--- a/scrapy/core/downloader/contextfactory.py
+++ b/scrapy/core/downloader/contextfactory.py
@@ -166,14 +166,14 @@ def load_context_factory_from_settings(settings, crawler):
     # try method-aware context factory
     try:
         context_factory = build_from_crawler(
-            objcls=context_factory_cls,
-            crawler=crawler,
+            context_factory_cls,
+            crawler,
             method=ssl_method,
         )
     except TypeError:
         context_factory = build_from_crawler(
-            objcls=context_factory_cls,
-            crawler=crawler,
+            context_factory_cls,
+            crawler,
         )
         msg = (
             f"{settings['DOWNLOADER_CLIENTCONTEXTFACTORY']} does not accept "
diff --git a/scrapy/core/downloader/handlers/__init__.py b/scrapy/core/downloader/handlers/__init__.py
index 466393b80..416669b7f 100644
--- a/scrapy/core/downloader/handlers/__init__.py
+++ b/scrapy/core/downloader/handlers/__init__.py
@@ -56,8 +56,8 @@ class DownloadHandlers:
             if skip_lazy and getattr(dhcls, "lazy", True):
                 return None
             dh = build_from_crawler(
-                objcls=dhcls,
-                crawler=self._crawler,
+                dhcls,
+                self._crawler,
             )
         except NotConfigured as ex:
             self._notconfigured[scheme] = str(ex)
diff --git a/scrapy/core/downloader/handlers/http10.py b/scrapy/core/downloader/handlers/http10.py
index 817a420c0..b6ac7a251 100644
--- a/scrapy/core/downloader/handlers/http10.py
+++ b/scrapy/core/downloader/handlers/http10.py
@@ -31,8 +31,8 @@ class HTTP10DownloadHandler:
         host, port = to_unicode(factory.host), factory.port
         if factory.scheme == b"https":
             client_context_factory = build_from_crawler(
-                objcls=self.ClientContextFactory,
-                crawler=self._crawler,
+                self.ClientContextFactory,
+                self._crawler,
             )
             return reactor.connectSSL(host, port, factory, client_context_factory)
         return reactor.connectTCP(host, port, factory)
diff --git a/scrapy/core/downloader/handlers/s3.py b/scrapy/core/downloader/handlers/s3.py
index a37f29aac..1f7533759 100644
--- a/scrapy/core/downloader/handlers/s3.py
+++ b/scrapy/core/downloader/handlers/s3.py
@@ -51,8 +51,8 @@ class S3DownloadHandler:
             )
 
         _http_handler = build_from_crawler(
-            objcls=httpdownloadhandler,
-            crawler=crawler,
+            httpdownloadhandler,
+            crawler,
         )
         self._download_http = _http_handler.download_request
 
diff --git a/scrapy/core/engine.py b/scrapy/core/engine.py
index 281dc8a54..545cd401f 100644
--- a/scrapy/core/engine.py
+++ b/scrapy/core/engine.py
@@ -358,7 +358,7 @@ class ExecutionEngine:
             raise RuntimeError(f"No free spider slot when opening {spider.name!r}")
         logger.info("Spider opened", extra={"spider": spider})
         nextcall = CallLaterOnce(self._next_request)
-        scheduler = build_from_crawler(self.scheduler_cls, crawler=self.crawler)
+        scheduler = build_from_crawler(self.scheduler_cls, self.crawler)
         start_requests = yield self.scraper.spidermw.process_start_requests(
             start_requests, spider
         )
diff --git a/scrapy/core/scheduler.py b/scrapy/core/scheduler.py
index bf027e1f9..f41b83a67 100644
--- a/scrapy/core/scheduler.py
+++ b/scrapy/core/scheduler.py
@@ -324,7 +324,7 @@ class Scheduler(BaseScheduler):
         """Create a new priority queue instance, with in-memory storage"""
         return build_from_crawler(
             self.pqclass,
-            crawler=self.crawler,
+            self.crawler,
             downstream_queue_cls=self.mqclass,
             key="",
         )
@@ -335,7 +335,7 @@ class Scheduler(BaseScheduler):
         state = self._read_dqs_state(self.dqdir)
         q = build_from_crawler(
             self.pqclass,
-            crawler=self.crawler,
+            self.crawler,
             downstream_queue_cls=self.dqclass,
             key=self.dqdir,
             startprios=state,
diff --git a/scrapy/crawler.py b/scrapy/crawler.py
index b7a6df2f3..844d5f759 100644
--- a/scrapy/crawler.py
+++ b/scrapy/crawler.py
@@ -111,7 +111,7 @@ class Crawler:
 
         self.request_fingerprinter = build_from_crawler(
             load_object(self.settings["REQUEST_FINGERPRINTER_CLASS"]),
-            crawler=self,
+            self,
         )
 
         reactor_class: str = self.settings["TWISTED_REACTOR"]
diff --git a/tests/test_downloader_handlers.py b/tests/test_downloader_handlers.py
index 37a53643b..dd07d33f1 100644
--- a/tests/test_downloader_handlers.py
+++ b/tests/test_downloader_handlers.py
@@ -829,8 +829,8 @@ class S3AnonTestCase(unittest.TestCase):
         skip_if_no_boto()
         crawler = get_crawler()
         self.s3reqh = build_from_crawler(
-            objcls=S3DownloadHandler,
-            crawler=crawler,
+            S3DownloadHandler,
+            crawler,
             httpdownloadhandler=HttpDownloadHandlerMock,
             # anon=True, # implicit
         )
@@ -859,8 +859,8 @@ class S3TestCase(unittest.TestCase):
         skip_if_no_boto()
         crawler = get_crawler()
         s3reqh = build_from_crawler(
-            objcls=S3DownloadHandler,
-            crawler=crawler,
+            S3DownloadHandler,
+            crawler,
             aws_access_key_id=self.AWS_ACCESS_KEY_ID,
             aws_secret_access_key=self.AWS_SECRET_ACCESS_KEY,
             httpdownloadhandler=HttpDownloadHandlerMock,
@@ -886,8 +886,8 @@ class S3TestCase(unittest.TestCase):
         try:
             crawler = get_crawler()
             build_from_crawler(
-                objcls=S3DownloadHandler,
-                crawler=crawler,
+                S3DownloadHandler,
+                crawler,
                 extra_kw=True,
             )
         except Exception as e:
diff --git a/tests/test_webclient.py b/tests/test_webclient.py
index a69d9c1b0..d4b6ba15b 100644
--- a/tests/test_webclient.py
+++ b/tests/test_webclient.py
@@ -471,7 +471,7 @@ class WebClientCustomCiphersSSLTestCase(WebClientSSLTestCase):
         s = "0123456789" * 10
         settings = Settings({"DOWNLOADER_CLIENT_TLS_CIPHERS": self.custom_ciphers})
         client_context_factory = build_from_settings(
-            ScrapyClientContextFactory, settings=settings
+            ScrapyClientContextFactory, settings
         )
         return getPage(
             self.getURL("payload"), body=s, contextFactory=client_context_factory
@@ -483,7 +483,7 @@ class WebClientCustomCiphersSSLTestCase(WebClientSSLTestCase):
             {"DOWNLOADER_CLIENT_TLS_CIPHERS": "ECDHE-RSA-AES256-GCM-SHA384"}
         )
         client_context_factory = build_from_settings(
-            ScrapyClientContextFactory, settings=settings
+            ScrapyClientContextFactory, settings
         )
         d = getPage(
             self.getURL("payload"), body=s, contextFactory=client_context_factory