Skip to content

update README to list breaking change on 2.3.0 #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

lmolina
Copy link

@lmolina lmolina commented Jan 30, 2025

Version 2.3.0 removes write_title and changes dump_stacks. The change is related to the introduction of Terminal, that is listed in the README, but is not stated the API change.

Version 2.3.0 removes `write_title` and changes `dump_stacks`. The
change is related to the introduction of Terminal, that is listed in the
README, but is not stated the API change.

Signed-off-by: Laudin Alessandro Molina T <[email protected]>
@The-Compiler
Copy link
Member

The-Compiler commented Jan 30, 2025

pytest-terminal pytest-timeout is a pytest plugin and not a Python library, so the internals of it never were any kind of public API anyways. Can you elaborate on how this would be relevant for users of the plugin?

@lmolina
Copy link
Author

lmolina commented Jan 30, 2025

I'm referring to pytest-timeout, but the reason is probably the same.

I came to a project that takes advantage of pytest-timeout. The project is using pytest-timeout as a plugin and as a Python library.

If the intent of pytest-timeout is to be used exclusively as a plugin and never as a library, then the internals should be internals, as you're pointing out. If you confirm that this is the case, then this PR may be just not relevant.

@The-Compiler
Copy link
Member

Err yep, my bad, that's what I meant. Fixed!

I would say for any pytest plugin, unless the documentation says otherwise, the only public Python API is:

  • Anything that's exposed via a fixture (as long as that fixture itself is documented/intended for public usage)
  • Maybe the type of such fixtures, as it's commonly imported for type annotations
  • Anything that's explicitly documented to be used as Python API (rather uncommon I'd say)

I see it very similar to how CLI tools implemented in Python work. If you look at mypy for example, it seems pretty clear that its intended public usage is invoking it via the CLI and only the explicitly documented Python API (mypy.api and mypy.plugin) is public.

If any Python API change would be public API (and in its changelog), that would be a very long changelog and development of it would be infinitely harder. Same reasoning here, for all pytest plugins in my eyes.

@lmolina lmolina closed this Jan 31, 2025
@lmolina
Copy link
Author

lmolina commented Jan 31, 2025

Closing as pytest-timout was not meant to be used as a library, thus no API change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants