Skip to content

gherkin-official version bound raises DeprecationWarning on Python 3.13 #752

@The-Compiler

Description

@The-Compiler

Describe the bug

When using a @tag with Python 3.13 and warnings enabled:

$ pytest -Wall --no-header test_py313.py
============================= test session starts ==============================
collected 1 item                                                               

test_py313.py s                                                          [100%]

=============================== warnings summary ===============================
.tox/py313-pyqt67/lib/python3.13/site-packages/gherkin/gherkin_line.py:79
  /home/florian/proj/qutebrowser/git/.tox/py313-pyqt67/lib/python3.13/site-packages/gherkin/gherkin_line.py:79: DeprecationWarning: 'maxsplit' is passed as positional argument
    uncommented_line = re.split(r"\s#", self._trimmed_line_text.strip(), 2)[0]

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 1 skipped, 1 warning in 0.07s =========================

To Reproduce

py313.feature:

Feature: nothing
    @skip
    Scenario: nothing

test_py313.py:

from pytest_bdd import scenarios
scenarios("py313.feature")

Expected behavior
No warning, as pytest-bdd should not have an upper gherkin-official bound, or at least have it on a more modern version.

Additional context
This was already fixed here:

And that was released as part of v30.0.0. However, pytest-bdd still pins an old version without full Python 3.13 compatibility:

gherkin-official = "^29.0.0"

Version

  • pytest version: 8.3.4
  • pytest-bdd version: 8.1.0
  • OS: Archlinux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions