Skip to content

Conversation

@iamdbychkov
Copy link
Contributor

@iamdbychkov iamdbychkov commented Jun 17, 2021

Context

In release 2.8.24 type hinting was introduced (#533) to allure-python-common package, and no python_requires directive has been added to setup.py script. It lead to failures on new python <3.5 installations, with package managers installing the newest version 2.9.43 which won't work on those python versions.

I feel like pip should install latest compatible version without needing of user to dig into code and see what the problem is, as, i think, majority of allure-python integration users is QA engineers, who might not have a solid python background to understand what the issue is and how to resolve it.

What is the motivation / use case for changing the behavior?

Provide a better UX for users of deprecated python versions (python2.7 is not the only version which won't work with newest package release, typing module was introduced in 3.5)

Proposal to resolve the issue.

Currently I can see a three ways of dealing with the problem:

  1. Fix metadata for a new release:
    1.1 Add python_requires='>=3.5' directive to setup.py script of allure-python-commons package
    1.2 Fix classifiers of all packages removing python2 support and adding Python 3 Only classifiers.
    1.3 Release 2.9.44 which contains fixed metadata.
    1.4 Re-release 2.8.22 version as 2.9.43.1

This way:

  • Pinned releases are not broken
  • >= Python3.5 installs will install release 2.9.44
  • < Python3.5 install will install release 2.9.43.1 which will be compatible with those versions.
  1. Same as 1, but instead of re-releasing 2.8.22 - yank all broken releases from pypi (https://www.python.org/dev/peps/pep-0592/) Yanking is done using pypi UI.

This way:

  • Pinned releases are not broken
  • >= Python3.5 installs will install release 2.9.44
  • < Python3.5 install will install release 2.8.22
  • No 2.9.43.1 version
  • Yanking is a new feature, not all installers might support it.
  1. Drop deprecated pythons support. Change README.MD to make it clear that latest release to work on python < 3.5 is 2.8.22. Maybe add an exception in setup.py script which will be raised if minimal python version doesn't satsified.

PR Is for ways 1 and 2.

Checklist

Unittest are not needed as there were no code changes.

…quires` directive to allure-python-commons setup.py script.
@iamdbychkov
Copy link
Contributor Author

UPD:

Last compatible version is 2.8.22.

2.8.23 also has incompatible changes.

@sseliverstov sseliverstov merged commit 1aae5ed into allure-framework:master Sep 29, 2021
beckerGil pushed a commit to beckerGil/allure-python that referenced this pull request Apr 10, 2023
IvanBuruyane pushed a commit to IvanBuruyane/allure-python that referenced this pull request Mar 19, 2024
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