Skip to content

Commit

Permalink
Force recompilation of scripts.
Browse files Browse the repository at this point in the history
The compiled code is now stored on `__code__` instead of `func_code`.
Without recompilation the scripts break because `__code__` is `None` which is not expected by ZPublisher/mapply.py

See also zopefoundation/Zope#172.
  • Loading branch information
Michael Howitz committed Oct 23, 2017
1 parent 54e0b55 commit 0b807f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Changelog
=========

4.2 (unreleased)
----------------
4.1.1 (unreleased)
------------------

- Nothing changed yet.
- Force recompilation of scripts as the compiled code is now stored
on `__code__` instead of `func_code`.


4.1 (2017-06-19)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


setup(name='Products.PythonScripts',
version='4.2.dev0',
version='4.1.1.dev0',
url='https://github.com/zopefoundation/Products.PythonScripts',
license='ZPL 2.1',
description="Provides support for restricted execution of Python "
Expand Down
2 changes: 1 addition & 1 deletion src/Products/PythonScripts/PythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
del imp

# This should only be incremented to force recompilation.
Script_magic = 3
Script_magic = 4
_log_complaint = (
'Some of your Scripts have stale code cached. Since Zope cannot'
' use this code, startup will be slightly slower until these Scripts'
Expand Down

0 comments on commit 0b807f0

Please sign in to comment.