Opened 6 years ago

Closed 6 years ago

Last modified 7 months ago

#13587 closed Cleanup/optimization (fixed)

Set zip_safe = False in

Reported by: Tim Graham Owned by: nobody
Component: Packaging Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Django isn't zip_safe:

django.contrib.gis.tests.geogapp.tests: module references __file__
django.contrib.gis.tests.geo3d.tests: module references __file__
django.contrib.gis.tests.layermap.tests: module references __file__
django.contrib.gis.gdal.tests.test_ds: module references __file__
django.contrib.admindocs.views: module references __file__
django.contrib.auth.tests.views: module references __file__
django.utils.autoreload: module references __file__
django.utils.module_loading: module references __path__
django.utils.version: module references __path__
django.utils.translation.trans_real: module references __file__
django.test._doctest: module references __file__
django.test._doctest: module MAY be using inspect.getsourcefile
django.test.simple: module references __file__ module references __file__ module references __path__ module references __file__ module references __path__ module references __file__ module references __path__ module references __file__
django.core.servers.basehttp: module references __path__
django.views.i18n: module references __file__
django.db.utils: module references __file__
django.db.models.loading: module references __file__
django.conf.__init__: module references __file__
django.conf.project_template.manage: module references __file__
django.template.loaders.app_directories: module references __file__

Any reason not to set the zip_safe flag in This was addressed in #538 but the flag was lost at some point when was refactored.

Attachments (1)

zip_safe.diff (385 bytes) - added by Tim Graham 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by Tim Graham

Attachment: zip_safe.diff added

comment:1 Changed 6 years ago by Russell Keith-Magee

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: invalid
Status: newclosed

Yes, there is a reason - Django uses distutils, not setuptools. zip_safe is a setuptools option; if you apply the provided patch and run python install , you get the warning {{{UserWarning: Unknown distribution option: 'zip_safe'

comment:2 Changed 5 years ago by bhuztez

Easy pickings: unset
Severity: Normal
Type: Uncategorized
UI/UX: unset

the zip_egg_fixed patch for #14087 can fix this.

comment:3 Changed 7 months ago by Tim Graham

Component: Core (Other)Packaging
Resolution: invalidfixed
Type: UncategorizedCleanup/optimization

Django has since switched to setuptools in 1.7 and zip_safe=False was added as part of that change: 66f546b90624297858b0f958abbe5c2b3e8bdffb.

Note: See TracTickets for help on using tickets.
Back to Top