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

Remove zip_safe=False flag from setup.py. #13543

Merged
merged 1 commit into from Aug 25, 2019
Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Feb 28, 2019

The flag only matters when installing from eggs
(https://setuptools.readthedocs.io/en/latest/setuptools.html#setting-the-zip-safe-flag)
which are mostly unused nowadays, and setuptools will still correctly
infer that matplotlib is not "zip_safe" based on the presence of
extension modules even when zip_safe=False is not explicitly set.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

The flag only matters when installing from eggs
(https://setuptools.readthedocs.io/en/latest/setuptools.html#setting-the-zip-safe-flag)
which are mostly unused nowadays, and setuptools will still correctly
infer that matplotlib is not "zip_safe" based on the presence of
extension modules even when zip_safe=False is not explicitly set.
@anntzer anntzer added the Build label Feb 28, 2019
@tacaswell tacaswell added this to the v3.2.0 milestone Feb 28, 2019
@tacaswell
Copy link
Member

What is the harm in keeping this flag?

@WeatherGod
Copy link
Member

WeatherGod commented Feb 28, 2019 via email

@anntzer
Copy link
Contributor Author

anntzer commented Feb 28, 2019

It's just a noop that requires 3 lines of comments to explain what it's doing, which goes against my objective of bringing matplotlib's build script (setup+setupext) from something ridiculously complex down to something more reasonable (it was 2582 (physical) total lines as of 1.5, it is 1521 lines now, and I have patches that bring it down to less than 1000 lines (in case it wasn't obvious I'm slowly publishing the PRs one at a time to keep things reviewable...)).

Again, manually inspecting the egg created by python setup.py bdist_egg shows that even after this patch, the EGG-INFO/not-zip-safe marker file is still present, which corresponds to the documented setuptools behavior.

@tacaswell tacaswell closed this Aug 25, 2019
@tacaswell tacaswell reopened this Aug 25, 2019
@tacaswell
Copy link
Member

power cycled to run against current master.

@timhoffm timhoffm merged commit d1f0b63 into matplotlib:master Aug 25, 2019
@anntzer anntzer deleted the zip_safe branch August 25, 2019 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants