bluesky / event-model

data model for event-based data collection and analysis
https://blueskyproject.io/event-model
BSD 3-Clause "New" or "Revised" License
13 stars 30 forks source link

Python minimum version/using 3.8+ features #230

Closed ksunden closed 1 year ago

ksunden commented 1 year ago

https://github.com/bluesky/event-model/blob/eac55ca21e54328a7fc1f16fea71e56460ed6a58/event_model/__init__.py#L14

importlib.metadata was added in python 3.8, but event-model does not either specify 3.8 as minimum version or include the backport pypi package as a conditional dependency.

Thus it will install on python 3.7 but fail upon use unless the pypi backport is installed otherwise.

mrakitin commented 1 year ago

I am 👍 for excluding Python 3.7 from the supported versions. We do it in a few other projects.

ksunden commented 1 year ago

also of note, the unit tests GHA is not actually running (and hasn't been for 2 years)

Does not seem to be set up to run on PRs and scheduled pipelines get disabled after 60 days of inactivity (which is itself annoying because one of the best reasons to have scheduled actions is to make sure your dependencies don't break an otherwise stable library....)

mrakitin commented 1 year ago

Hmm, I've just enabled https://github.com/bluesky/event-model/actions/workflows/testing.yml.

ksunden commented 1 year ago

Hmmm... the workflow itself does indicate it should run on PR, but seems like it hasn't been since it was disabled because of the scheduled runs...

Slightly buried in their docs, and it does not make it clear from this that being disabled will disable it everywhere, but that seems to be the case...

https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#disabling-and-enabling-workflows

danielballan commented 1 year ago

I propose making one release that fixes 3.7 before we drop it.

danielballan commented 1 year ago

Thanks for flagging this @ksunden. I ended up here because the databroker CI is also failing (on Python 3.7) due to this issue. https://github.com/bluesky/databroker/actions/runs/3626380641/jobs/6115321137