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

Drop mock dependency; standardize on unittest.mock #621

Merged
merged 2 commits into from
May 25, 2021

Conversation

musicinmybrain
Copy link
Contributor

Title

Drop mock dependency; standardize on unittest.mock

Motivation

Since the package requires Python 3.6+, unittest.mock is available, and it was already used in some of the tests. Migrate any tests still using the PyPI backport package mock to unittest.mock, and drop the dependency.

This came up while looking at a candidate package for Fedora Linux, where the PyPI mock package is deprecated.

Tests

No tests to add; existing tests pass.

Checklist

Before you create the PR, please make sure you have:

  • Picked a concise, informative and complete title
  • Clearly explained the motivation behind the PR
  • Linked to any existing issues that your PR will be solving N/A
  • Included tests for any new functionality N/A
  • Checked that all unit tests pass

Workflow

Please avoid rebasing and force-pushing to the branch of the PR once a review is in progress.
Rebasing can make your commits look a bit cleaner, but it also makes life more difficult from the reviewer, because they are no longer able to distinguish between code that has already been reviewed, and unreviewed code.

Since we require Python 3.6+, unittest.mock is available, and it was
already used in some of the tests. Migrate any tests still using the
PyPI backport package “mock” to unittest.mock, and drop the dependency.
@piskvorky piskvorky requested a review from mpenkov May 19, 2021 08:42
Copy link
Collaborator

@mpenkov mpenkov left a comment

Choose a reason for hiding this comment

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

Thank you @musicinmybrain ! Congrats on your first PR to the smart_open repo!

@mpenkov mpenkov merged commit f92d1ed into piskvorky:develop May 25, 2021
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.

3 participants