Skip to content

Added importlib + reqs to pip-compile for python < 3.8 #781

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

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

asafflesch
Copy link
Contributor

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

You cannot run the compile_pip_requirements.update target with a Python interpreter at a version < 3.8 - it will fail on importing importlib_metadata in the build package

What is the new behavior?

You can run the compile_pip_requirements.update target with a Python interpreter at a version < 3.8

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

I could see a scenario where part of the setup instructions involve telling the user to produce a lockfile for pip-compile from their local env, but it's probably just easier to package up all the reqs for any version.

Comment on lines +79 to +81
requirement("importlib_metadata"),
requirement("zipp"),
requirement("more_itertools"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these all noops in higher language version? I know import_metadata is. I'm surprised this still works with versions like 3.6 given the version of pip-tools used here is now incompatible with that version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't speak for 3.6, but this rule definitely doesn't work for 3.7, which is the version we're trying to work with. Far as I can see, the other two aren't nops, but they should be compatible with the relevant interfaces.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I guess we've dropped 3.6 support here given it's EoL, so that's fine. Thanks for checking!

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.

2 participants