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

Unpin dependencies' versions #6464

Open
29 of 32 tasks
NoureldinYosri opened this issue Feb 14, 2024 · 3 comments · Fixed by #6616
Open
29 of 32 tasks

Unpin dependencies' versions #6464

NoureldinYosri opened this issue Feb 14, 2024 · 3 comments · Fixed by #6616
Labels
kind/health For CI/testing/release process/refactoring/technical debt items

Comments

@NoureldinYosri
Copy link
Collaborator

NoureldinYosri commented Feb 14, 2024

Description of the issue
We have several dependencies pinned at specific old version because newer version break the CI. Ideally we should either not have a version requirement of have version requirement beyond a specific release (e.g. >= or >). specifying a version requirement with ==, ~=, <=, < shouldn't be used.

The list of requirements that should be unpinned is
in cirq-core/requirements.txt:

  • matplotlib~=3.0
    (pavoljuhas) leave as is, this pins the major version and includes the latest matplotlib-3.9.0
  • numpy~=1.16
    done in NEP-29 - enforce minimum Python version 3.10 #6591
  • sortedcontainers~=2.0
    (pavoljuhas) leave as is, pins the major version and includes the latest sortedcontainers-2.4.0

in cirq-core/cirq/contrib/requirements.txt:

in dev_tools/pr_monitor/requirements.txt:
(pavoljuhas) - only used in containerized tool, defer after 1.4

  • requests==2.31.0
  • google-cloud-secret-manager==1.0.0

in dev_tools/requirements/deps/protos.txt:

  • grpcio-tools~=1.56.0 --> grpcio-tools~=1.59.0
    done in Support Python 3.12 #6516, first version compatible with Python 3.12
  • mypy-protobuf==3.4
    (pavoljuhas) leave as is, works with the grpcio-tools

in dev_tools/requirements/deps/format.txt:

in dev_tools/requirements/deps/dev-tools.txt:

in dev_tools/requirements/deps/pylint.txt:

  • pylint~=2.13.0

in dev_tools/requirements/deps/mypy.txt:
(pavoljuhas) - defered to #6617

  • mypy==1.2.0
  • types-backports==0.1.3
  • types-protobuf~=3.20
  • types-requests==2.28.1
  • types-setuptools==62.6.1

in dev_tools/requirements/deps/notebook.txt:

in dev_tools/requirements/deps/pytest.txt:


Optionally these verndor related requirements should be unpinned

in cirq-aqt/requirements.txt:

  • requests~=2.18
    (pavoljuhas) leave as is, includes the latest requests-2.32.2

in cirq-pasqal/requirements.txt:

  • requests~=2.18
    (pavoljuhas) leave as is, includes the latest requests-2.32.2

in cirq-ionq/requirements.txt:

  • requests~=2.18
    (pavoljuhas) leave as is, includes the latest requests-2.32.2

in cirq-rigetti/requirements.txt:

@NoureldinYosri NoureldinYosri added the kind/health For CI/testing/release process/refactoring/technical debt items label Feb 14, 2024
@pavoljuhas
Copy link
Collaborator

specifying a version requirement with ==, ~=, <=, < shouldn't be used.

I feel it depends case to case. Expressions like matplotlib~=3.0 freeze the major version numbers only so we have some assurance there would be no API-breaking changes; at the same time we should be getting minor upgrades and have a decent range of compatible versions. The last stable matplotlib is at 3.8.2 so that requirement allows for the newest version.

For the requirement specifications under dev_tools/requirements it may be good to pin to specific versions such as black==23.3.0. These packages are for development environment where it is good to have the same code formatter and linter versions as used in the CI. It should also avoid surprises that the CI checks would stop passing because of a newer formatter or linter release.

@mhucka
Copy link
Contributor

mhucka commented Mar 27, 2024

I apologize if this is off the mark, but my $0.02 based just on general principles is that I agree with Pavol.

For non-dev requirements, not using a version requirement or setting only a minimum version (using >= or >) would seem risky for users. As you know, major version changes in packages like Matplotlib or Numpy could very well introduce breaking changes. A new cirq-core release could address the resulting incompatibilities, but users might choose not to update their version of cirq-core right away, or they may not be able to update right away because they have a dependency on a pinned version of cirq-core in other software of theirs. If the cirq-core requirements only set a minimum version, then if the users update their copies of Matplotlib or Numpy or whatever, they may experience errors. (On can image a worst-case scenario where there are no overt errors yet some cirq behaviors potentially change, or numerical results are off, etc., however likely that is.)

So, in the end, it seems like specifying the requirements as, e.g., sortedcontainers~=2.0, is preferable for the non-dev requirements.

pavoljuhas added a commit that referenced this issue May 29, 2024
- allow latest scipy because quimb>=1.18 works with scipy-1.13
  (context in #6543)
- allow latest rstcheck
- fix dependency specification for tensorflow-docs so it works with
  `uv pip compile`
- Enable the current latest versions of notebook, ipykernel, papermill
  which are only used for notebook tests
- Add temporary specifications for notebook-related transitive dependencies
  to help pip dependency resolver (should be redundant after #6281) 

Partially fixes #6464
@pavoljuhas
Copy link
Collaborator

Partially implemented in #6616 - sufficient for the 1.4 release.

Reopening to track the leftover dependencies.

@pavoljuhas pavoljuhas reopened this May 29, 2024
pavoljuhas pushed a commit that referenced this issue Jun 11, 2024
- Add support for Kraus operators, POVMs and parametric defgates
- Update quil->cirq conversion

Fixes #6500
Partially implements #6464
Yash-10 pushed a commit to Yash-10/Cirq that referenced this issue Jun 12, 2024
- Add support for Kraus operators, POVMs and parametric defgates
- Update quil->cirq conversion

Fixes quantumlib#6500
Partially implements quantumlib#6464
vmscw pushed a commit to Sonderfall/Cirq that referenced this issue Jun 14, 2024
- Add support for Kraus operators, POVMs and parametric defgates
- Update quil->cirq conversion

Fixes quantumlib#6500
Partially implements quantumlib#6464
pavoljuhas pushed a commit to pavoljuhas/Cirq that referenced this issue Jun 26, 2024
- Add support for Kraus operators, POVMs and parametric defgates
- Update quil->cirq conversion

Fixes quantumlib#6500
Partially implements quantumlib#6464
pavoljuhas pushed a commit to pavoljuhas/Cirq that referenced this issue Jun 26, 2024
- Add support for Kraus operators, POVMs and parametric defgates
- Update quil->cirq conversion

Fixes quantumlib#6500
Partially implements quantumlib#6464
pavoljuhas pushed a commit to pavoljuhas/Cirq that referenced this issue Jun 26, 2024
- Add support for Kraus operators, POVMs and parametric defgates
- Update quil->cirq conversion

Fixes quantumlib#6500
Partially implements quantumlib#6464
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this issue Oct 31, 2024
- allow latest scipy because quimb>=1.18 works with scipy-1.13
  (context in quantumlib#6543)
- allow latest rstcheck
- fix dependency specification for tensorflow-docs so it works with
  `uv pip compile`
- Enable the current latest versions of notebook, ipykernel, papermill
  which are only used for notebook tests
- Add temporary specifications for notebook-related transitive dependencies
  to help pip dependency resolver (should be redundant after quantumlib#6281) 

Partially fixes quantumlib#6464
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/health For CI/testing/release process/refactoring/technical debt items
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants