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

Update dependencies to more recent versions #675

Merged
merged 4 commits into from
Dec 13, 2023
Merged

Update dependencies to more recent versions #675

merged 4 commits into from
Dec 13, 2023

Conversation

bmerry
Copy link
Contributor

@bmerry bmerry commented Dec 13, 2023

Mostly they're updated to the latest. I've held back on a few packages:

  • pyparsing: the exception messages have changed, and not always in a
    good way (they're less intelligible); that was breaking unit tests for
    the errors.
  • aiomonitor: the new version has an HTTP console, but I'm not sure what
    the implications of that are when run under katsdpcontroller.
    I've opened NGC-1179 to deal with that.
  • pytest-asyncio: it deprecates the way we override the event loop (either its type in the unit tests, or its fixture scope in qualification), and the replacement doesn't work properly (More difficulties in 0.23 with async fixtures pytest-dev/pytest-asyncio#718). I've pinned it to <0.22 until we can sort that out, and opened NGC-1181.

There are a few code changes needed to deal with the upgrades (mostly to
deal with deprecation warnings):

  • xarray warns that Dataset.dims should be replaced by Dataset.sizes
  • signal.py was using a 1D array with 1 element as if it was a scalar.
    numpy is now warning about that. The type annotation has also been
    fixed.

Checklist (if not applicable, edit to add (N/A) and mark as done):

  • If dependencies are added/removed: update setup.cfg and .pre-commit-config.yaml
  • (N/A) If modules are added/removed: use sphinx-apidoc -efo doc/ src/ to update files in doc/
  • Ensure copyright notices are present and up-to-date
  • (N/A) If qualification tests are changed: attach a sample qualification report
  • (N/A) If design has changed: ensure documentation is up to date
  • (N/A) If ICD-defined sensors have been added: update fake_servers.py in katsdpcontroller to match

Mostly they're updated to the latest. I've held back on two packages:

- pyparsing: the exception messages have changed, and not always in a
  good way (they're less intelligible); that was breaking unit tests for
  the errors.
- aiomonitor: the new version has an HTTP console, but I'm not sure what
  the implications of that are when run under katsdpcontroller.
  I've opened NGC-1179 to deal with that.

There are a few code changes needed to deal with the upgrades (mostly to
deal with deprecation warnings):

- pytest-asyncio no longer wants you to override the `event_loop`
  fixture. See
  [here](https://pytest-asyncio.readthedocs.io/en/latest/how-to-guides/index.html)
  for it's recommended replacements.
- xarray warns that Dataset.dims should be replaced by Dataset.sizes
- signal.py was using a 1D array with 1 element as if it was a scalar.
  numpy is now warning about that. The type annotation has also been
  fixed.
This makes them match better to requirements.txt and friend. I'm hoping
the update to pip-tools might also fix a weird glitch where sometimes it
reports coverage as being a dependency of itself.
pytest-asyncio 0.23 changed the way event loops work and caused a number
of issues, including pytest-dev/asyncio#705 and
pytest-dev/pytest-asyncio#718. I wasn't able to find an easy way around
these for the qualification test, so for now I've pinned pytest-asyncio
to <0.22 (the 0.22 release was a half-way point to 0.23 and has been
yanked).
@bmerry bmerry merged commit 6da86da into main Dec 13, 2023
2 checks passed
@bmerry bmerry deleted the bump-versions branch December 13, 2023 07:48
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