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

Make pymongo optional #126

Merged
merged 2 commits into from
Jul 2, 2023
Merged

Conversation

cthoyt
Copy link
Contributor

@cthoyt cthoyt commented Jul 2, 2023

Closes #125

Currently, the way the pymongo.collection.Collection is imported, it makes it a hard requirement. Since it's only used for type checking, it's possible to guard this import with if typing.TYPE_CHECKING: and maintain existing functionality.

CC @kkaris

Currently, the way the `pymongo.collection.Collection` is imported, it makes it a hard requirement. Since it's only used for type checking, it's possible to guard this import with `if typing.TYPE_CHECKING:`

CC @kkaris
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:32 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:32 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:32 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:32 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:32 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to checkdocs July 2, 2023 07:32 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:32 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:32 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:32 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:32 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:32 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:32 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:32 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:32 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Jul 2, 2023

Codecov Report

Merging #126 (6651392) into master (cb94fb7) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #126   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          509       508    -1     
  Branches        88        88           
=========================================
- Hits           509       508    -1     
Impacted Files Coverage Δ
cachier/core.py 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb94fb7...6651392. Read the comment docs.

@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:41 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:41 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:41 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:41 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:41 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to checkdocs July 2, 2023 07:41 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:41 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:41 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:41 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:41 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:41 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:41 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:41 — with GitHub Actions Inactive
@cthoyt cthoyt temporarily deployed to test July 2, 2023 07:41 — with GitHub Actions Inactive
@shaypal5 shaypal5 merged commit 5776ee8 into python-cachier:master Jul 2, 2023
16 checks passed
@shaypal5
Copy link
Collaborator

shaypal5 commented Jul 2, 2023

Nice! This is being released now.
Thank you @cthoyt :)

@shaypal5
Copy link
Collaborator

shaypal5 commented Jul 2, 2023

Released in v2.2.1.

@cthoyt
Copy link
Contributor Author

cthoyt commented Jul 2, 2023

thanks for the quick response @shaypal5. have a nice weekend :)

@cthoyt cthoyt deleted the fix-mongo-import branch July 2, 2023 14:35
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.

ModuleNotFoundError: No module named 'pymongo'
2 participants