Skip to content
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

Raise upper constraint for importlib-metadata #3244

Merged
merged 1 commit into from
Sep 27, 2021

Conversation

mwhahaha
Copy link
Contributor

The current version of importlib-metadata is 4.8.1 which works fine even
when running python <3.8. By restricting to <2, we're limiting the
co-installability of molecule with projects that require higher
importlib-metadata.

The <2 limit was added as part of #3221, but it's not clear why this version
was selected.

PR Type

  • Bugfix Pull Request

@tadeboro
Copy link
Contributor

I must admit that I see no good reason for setting the upper version bound at all. Since the importlib-metadata package is upstream of the stdlib's implementation, I would not expect things to break often. But since I do not know the details about the version constraint, this will have to wait for other maintainers to pitch in with the information.

@mwhahaha
Copy link
Contributor Author

I can drop it, however I saw commentary about preventing issues with future versions which is the only reason why I set it. It's likely that we'd just hit a problem in the future when v5 is released

@tadeboro
Copy link
Contributor

I can drop it, however I saw commentary about preventing issues with future versions which is the only reason why I set it. It's likely that we'd just hit a problem in the future when v5 is released

If there is one thing certain in life, it is the fact that things will break ;) If we add upper bound, things will fail because we will forget to bump it and something will start conflicting with that version. If we do not add the bound, things will fail once the importlib library breaks backward compatibility. I just happen to prefer the last failure because I am forced to keep code working with the latest stable versions of library if at all possible.

@mwhahaha
Copy link
Contributor Author

Ditto. I'll drop the upper limit and if someone wants it back I'll add it. I'd rather only limit when necesary and this only applies to <3.8 anyway.

The current version of importlib-metadata is 4.8.1 which works fine even
when running python <3.8.  By restricting to <2, we're limiting the
co-installability of molecule with projects that require higher
importlib-metadata.
openstack-mirroring pushed a commit to openstack-archive/tripleo-ansible that referenced this pull request Sep 24, 2021
We were always using the upper-constraints when creating tox
environments, however there is currently an issue with molecule and
openstack upper-constraints that is preventing it from being used.
Until molecule can be fixed to work with openstack upper-constraints,
lets drop this configuration. We are already adding the constraints to
the doc and release notes jobs.

ansible/molecule#3244

Change-Id: I91ebaa059dc2451bba739a0a2de917e2f3c2aa21
Related-Bug: #1942704
openstack-mirroring pushed a commit to openstack/openstack that referenced this pull request Sep 24, 2021
* Update tripleo-ansible from branch 'master'
  to 949414244467e8436c07c2563643267adfb11a75
  - Don't use upper-constraints with molecule
    
    We were always using the upper-constraints when creating tox
    environments, however there is currently an issue with molecule and
    openstack upper-constraints that is preventing it from being used.
    Until molecule can be fixed to work with openstack upper-constraints,
    lets drop this configuration. We are already adding the constraints to
    the doc and release notes jobs.
    
    ansible/molecule#3244
    
    Change-Id: I91ebaa059dc2451bba739a0a2de917e2f3c2aa21
    Related-Bug: #1942704
openstack-mirroring pushed a commit to openstack-archive/tripleo-operator-ansible that referenced this pull request Sep 24, 2021
molecule[1] is not compatible with upper-constraints and it breaks
the molecule installation in the tox venv due to version conflicts
coming from upper-constraints.

In order to fix that, we are limiting the usage of uc only for
docs and release notes.

[1]. ansible/molecule#3244

Related-Bug: #1942704

Signed-off-by: Amol Kahat <amolkahat@gmail.com>
CoAuthored-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: Ia35c83c13bd9e38384327630374b3aacebe9007b
openstack-mirroring pushed a commit to openstack/openstack that referenced this pull request Sep 24, 2021
* Update tripleo-operator-ansible from branch 'master'
  to 8b72a414d647d2ea9e2e393e4da993dfb80194a5
  - Merge "Limit the usage of upper-constraints"
  - Limit the usage of upper-constraints
    
    molecule[1] is not compatible with upper-constraints and it breaks
    the molecule installation in the tox venv due to version conflicts
    coming from upper-constraints.
    
    In order to fix that, we are limiting the usage of uc only for
    docs and release notes.
    
    [1]. ansible/molecule#3244
    
    Related-Bug: #1942704
    
    Signed-off-by: Amol Kahat <amolkahat@gmail.com>
    CoAuthored-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
    Change-Id: Ia35c83c13bd9e38384327630374b3aacebe9007b
@hswong3i
Copy link
Contributor

With https://github.com/ansible-community/molecule/blob/c6a456b61f0913d07a991b4d579c864d41ca4d82/.pre-commit-config.yaml#L60 we have importlib-metadata>=4.6.1, reported from https://github.com/ansible-community/molecule/search?q=importlib-metadata&type=code

I would recommend synchronize both /setup.cfg and /tox.ini with same standard?

@hswong3i
Copy link
Contributor

I temporarily modify the line for my DEB/RPM packaging needs, and it works with importlib-metadata>=4.6.1:

@ssbarnea
Copy link
Member

Based on my experience of almost a decade with python package dependencies, setting upper bounds created by far more problems than preventing. If dependency follows semver proves to not matter.

The only exception is for packages that we know to be prone to break, so basically ceiling seems to be effective only when a particular dependency broke the project more than once.

@mwhahaha thanks for making this.

@ssbarnea ssbarnea enabled auto-merge (squash) September 27, 2021 10:59
@ssbarnea ssbarnea merged commit ba47829 into ansible:main Sep 27, 2021
ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Oct 1, 2021
openstack-mirroring pushed a commit to openstack-archive/tripleo-ansible that referenced this pull request Oct 4, 2021
We were always using the upper-constraints when creating tox
environments, however there is currently an issue with molecule and
openstack upper-constraints that is preventing it from being used.
Until molecule can be fixed to work with openstack upper-constraints,
lets drop this configuration. We are already adding the constraints to
the doc and release notes jobs.

ansible/molecule#3244

STABLE-Only: This also pins molecule to <3.5 as that requires updates
to the metadata structure.

Change-Id: I91ebaa059dc2451bba739a0a2de917e2f3c2aa21
Related-Bug: #1942704
(cherry picked from commit 9494142)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants