Skip to content

Remove dateutil as a requirement #14395

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

Merged
merged 2 commits into from
May 20, 2025
Merged

Conversation

mtreinish
Copy link
Member

Summary

The dateutil package was previously used by the BackendV1 models to parse datetime information that was passed into the from_dict() constructors for those objects. Since Qiskit 2.0.0 those objects haven't been part of Qiskit anymore as BackendV1 was removed in that release following it's deprecation period nothing is using the library anymore in Qiskit. However the dateutil library was not removed as a dependency at the time of removal. This commit corrects the oversight and removes the library as a dependency.

Details and comments

The dateutil package was previously used by the BackendV1 models to
parse datetime information that was passed into the from_dict()
constructors for those objects. Since Qiskit 2.0.0 those
objects haven't been part of Qiskit anymore as BackendV1 was removed
in that release following it's deprecation period nothing is using
the library anymore in Qiskit. However the dateutil library was
not removed as a dependency at the time of removal. This commit corrects
the oversight and removes the library as a dependency.
@mtreinish mtreinish added this to the 2.1.0 milestone May 17, 2025
@mtreinish mtreinish requested a review from a team as a code owner May 17, 2025 10:13
@mtreinish mtreinish added the Changelog: API Change Include in the "Changed" section of the changelog label May 17, 2025
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented May 17, 2025

Pull Request Test Coverage Report for Build 15140190827

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 21 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.02%) to 88.3%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 3 92.48%
crates/circuit/src/symbol_expr.rs 4 75.4%
qiskit/transpiler/preset_passmanagers/builtin_plugins.py 14 95.18%
Totals Coverage Status
Change from base Build 15079260336: 0.02%
Covered Lines: 78341
Relevant Lines: 88721

💛 - Coveralls

Copy link
Member

@alexanderivrii alexanderivrii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes complete sense to me to remove dependencies are no longer used anywhere in the code, so this looks great. Just some minor nits about the release notes.

Co-authored-by: Alexander Ivrii <alexi@il.ibm.com>
@mtreinish mtreinish requested a review from alexanderivrii May 20, 2025 14:25
@alexanderivrii alexanderivrii enabled auto-merge May 20, 2025 14:44
@alexanderivrii alexanderivrii added this pull request to the merge queue May 20, 2025
Merged via the queue into Qiskit:main with commit 841f4bc May 20, 2025
24 checks passed
velocityraptor7085 pushed a commit to velocityraptor7085/qiskit that referenced this pull request May 22, 2025
* Remove dateutil as a requirement

The dateutil package was previously used by the BackendV1 models to
parse datetime information that was passed into the from_dict()
constructors for those objects. Since Qiskit 2.0.0 those
objects haven't been part of Qiskit anymore as BackendV1 was removed
in that release following it's deprecation period nothing is using
the library anymore in Qiskit. However the dateutil library was
not removed as a dependency at the time of removal. This commit corrects
the oversight and removes the library as a dependency.

* Update releasenotes/notes/no-dateutil-ca2ca5f5a75fbb22.yaml

Co-authored-by: Alexander Ivrii <alexi@il.ibm.com>

---------

Co-authored-by: Alexander Ivrii <alexi@il.ibm.com>
rahaman-quantum pushed a commit to rahaman-quantum/qiskit that referenced this pull request Jun 20, 2025
* Remove dateutil as a requirement

The dateutil package was previously used by the BackendV1 models to
parse datetime information that was passed into the from_dict()
constructors for those objects. Since Qiskit 2.0.0 those
objects haven't been part of Qiskit anymore as BackendV1 was removed
in that release following it's deprecation period nothing is using
the library anymore in Qiskit. However the dateutil library was
not removed as a dependency at the time of removal. This commit corrects
the oversight and removes the library as a dependency.

* Update releasenotes/notes/no-dateutil-ca2ca5f5a75fbb22.yaml

Co-authored-by: Alexander Ivrii <alexi@il.ibm.com>

---------

Co-authored-by: Alexander Ivrii <alexi@il.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: API Change Include in the "Changed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants