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

add python 3.10 compatibility #857

Open
christian-steinmeyer opened this issue Feb 7, 2022 · 10 comments
Open

add python 3.10 compatibility #857

christian-steinmeyer opened this issue Feb 7, 2022 · 10 comments

Comments

@christian-steinmeyer
Copy link

When trying to run our sacred code in python 3.10, if fails with

Exception originated from within Sacred.
Traceback (most recent calls):
  File "/Users/<USER>/.virtualenvs/<PROJECT>/lib/python3.10/site-packages/sacred/utils.py", line 345, in recursive_update
    if isinstance(v, collections.Mapping):
AttributeError: module 'collections' has no attribute 'Mapping'

But it looks like, in master, this issue is already fixed. I'm not sure, this is the only issue. But if it were, perhaps a new minor release could be published?

@thequilo
Copy link
Collaborator

I agree, an update on PyPi would be a good idea. Many issues have been fixed since the last version (which is already over a year old). But before publishing a new version, I would like to have the tests fixed. I'll look into that when I have some time

@christian-steinmeyer
Copy link
Author

Thanks for the response @thequilo. Quick question: which tests are you talking about? The last two azure pipelines seem to only have failed because they were cancelled, if I didn't misread some info there. Of course they might have been cancelled because of some upcoming errors?

@thequilo
Copy link
Collaborator

I'm talking about the hanging tests of the QueuedMongoObserver. The QueueObserver, introduced in #471, contains a while True loop which just just hangs the whole script forever when the called method continues failing. In the tests, this is currently (after mongomock's latest update) only caused by a small change in the hash computation in pymongo. This issue is also visible in the failing test_mongo_observer_resource_event test case.

This test shouldn't be too hard to fix, but I am unsure whether we should keep the while True loop in the QueueObserver or replace it with for ... in range(some large number) or a timeout-based system. But this may be a different issue.

@thequilo
Copy link
Collaborator

Found a new issue with Python 3.10 and mongomock: mongomock/mongomock#758. So, we have to wait until this issue is fixed in mongomock before we can fix the testcases for Python 3.10

@christian-steinmeyer
Copy link
Author

I see, thanks for the updates!

@lucasdavid
Copy link

@thequilo no news on mongomock' release date, right?

Considering they release quite seldom, and that this is only a develop dependency used to run the pipelines, don't you think it would be a good idea to refer to their main github version when running Sacred's tests?

This way we can have a sacred release without waiting for them :)

@thequilo
Copy link
Collaborator

@lucasdavid right, I didn't even get an answer to the question when the next release will be published.

I actually already started preparing a release by simply deactivating the pymongo tests for Python 3.10 in #858. I didn't want to depend on a git commit of another repository, so I thought that deactivating the tests until a new release is there is the better option. But I'm really unsure if this is really better than the GitHub dependency.

I believe that there are currently no urgent PRs or issues for sacred and a new release has been requested frequently, so I'll try to prepare the release as soon as I can.

@thequilo
Copy link
Collaborator

I just published the 0.8.3 release on GitHub (and I hope that I didn't forget anything). @Qwlouse, can you push the release to PyPI?

@ahallermed
Copy link
Contributor

Short reminder for @Qwlouse . Can you push the new version to PyPI? I am very keen on using the new version.
Thank in advance!

@vnmabus
Copy link
Contributor

vnmabus commented Jun 9, 2022

Maybe it would be good if @Qwlouse could create a PyPI token and add it as a repository secret. This way a Github action could be used to push to PyPI on release, without depending on the availability of one person.

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

No branches or pull requests

5 participants