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

Replace mock with unittest.mock #651

Merged
merged 2 commits into from
Mar 24, 2023
Merged

Replace mock with unittest.mock #651

merged 2 commits into from
Mar 24, 2023

Conversation

yan12125
Copy link
Contributor

The latter is available with Python 3.3 [1], and nbdime requires Python 3.6+ as per setup.py.

This change removes the need of an external library.

[1] https://docs.python.org/3/library/unittest.mock.html

The latter is available with Python 3.3 [1], and nbdime requires Python
3.6+ as per setup.py.

This change removes the need of an external library.

[1] https://docs.python.org/3/library/unittest.mock.html
@yan12125
Copy link
Contributor Author

This pull request is a preparation for adding python-nbdime package to Arch Linux, where it's encouraged to replace mock with unittest.mock: https://archlinux.org/todo/drop-python-mock-checkdepends/

* `--openssl-legacy-provider`: webpack reports an error with OpenSSL 3
  [1] as webpack uses md4, which is available only from the legacy
  provider. Newer webpack adds a wasm implementation of md4 [2], while
  nbdime uses very old webpack [3].

* Node.js 14.x: some dependencies (ex: @jupyter/ydoc) uses ES modules,
  which are declared as stable since Node.js 14.x [4]

[1] webpack/webpack#14532
[2] webpack/webpack#14584
[3] https://github.com/jupyter/nbdime/blob/2da614b603b694e13fc8d597eef1cc09ff07cb10/packages/webapp/package.json#L44
[4] https://nodejs.org/docs/latest-v14.x/api/esm.html
@yan12125
Copy link
Contributor Author

@vidartf I changed some CI settings to fix current errors. Could you re-run failed tests? Also, please tell me if you prefer to split CI changes to a separate pull request.

@vidartf
Copy link
Collaborator

vidartf commented Mar 24, 2023

Thanks for this, and the detailed descriptions in the commit message. If I read this correctly: if we update webpack, we can drop the openssl flag?

@yan12125
Copy link
Contributor Author

if we update webpack, we can drop the openssl flag?

yep

@vidartf
Copy link
Collaborator

vidartf commented Mar 24, 2023

Merging for now, will look at updating webpack later. Thanks! :)

@vidartf vidartf merged commit 50c9347 into jupyter:master Mar 24, 2023
@yan12125 yan12125 deleted the unittest-mock branch March 25, 2023 02:53
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Mar 31, 2023
Ref: jupyter/nbdime#651

git-svn-id: file:///srv/repos/svn-community/svn@1431363 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Mar 31, 2023
Ref: jupyter/nbdime#651



git-svn-id: file:///srv/repos/svn-community/svn@1431363 9fca08f4-af9d-4005-b8df-a31f2cc04f65
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.

None yet

2 participants