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

Fix notebook shim version check #129

Merged
merged 1 commit into from Jul 10, 2022
Merged

Fix notebook shim version check #129

merged 1 commit into from Jul 10, 2022

Conversation

minrk
Copy link
Member

@minrk minrk commented Jul 10, 2022

Use parsed notebook.version_info, not private notebook._version with string comparison

It's never save to compare version strings as pure strings - they must be parsed first (this functionality has unfortunately been removed from the standard library, but packaging.version is the de facto standard now), or better yet use already-parsed version_info if/when provided. The code as-is would take the wrong branch if/when notebook 10 arrived.

Use parsed notebook.version_info, not private notebook._version with string comparison
Copy link
Member

@echarles echarles left a comment

Choose a reason for hiding this comment

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

Much better. Thx @minrk

@echarles echarles merged commit 7ea5af3 into jupyter:main Jul 10, 2022
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