Merge lp:~gary/launchpad/bug-491705-hack into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Francis J. Lacoste on 2010-01-20 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | not available |
| Proposed branch: | lp:~gary/launchpad/bug-491705-hack |
| Merge into: | lp:launchpad |
| Diff against target: |
12 lines (+1/-1) 1 file modified
versions.cfg (+1/-1) |
| To merge this branch: | bzr merge lp:~gary/launchpad/bug-491705-hack |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Francis J. Lacoste (community) | 2010-01-20 | Approve on 2010-01-20 | |
|
Review via email:
|
|||
Commit Message
Work around the problem described in bug 491705. This is a temporary fix.
| Gary Poster (gary) wrote : | # |
| Francis J. Lacoste (flacoste) wrote : | # |
On January 20, 2010, Gary Poster wrote:
> Gary Poster has proposed merging lp:~gary/launchpad/bug-491705-hack into
> lp:launchpad/devel.
>
> Requested reviews:
> Canonical Launchpad Engineering (launchpad)
>
>
> This branch uses a hacked version of zc.buildout to work around the problem
> described in
> https:/
> diff for this branch is below. It essentially only adds the following
> line to the top of generated scripts, such as bin/run:
>
> import encodings.utf_8 # Hack to fix sys.modules approach.
>
> This is the change that LOSAs have made manually in past deployments. It
> is not the right fix, which I am working on in
> svn://svn.
> us more breathing room.
>
Thanks for this safety.
review approve
status approved
--
Francis J. Lacoste
<email address hidden>

This branch uses a hacked version of zc.buildout to work around the problem described in https:/ /bugs.edge. launchpad. net/launchpad- foundations/ +bug/491705 . The diff for this branch is below. It essentially only adds the following line to the top of generated scripts, such as bin/run:
import encodings.utf_8 # Hack to fix sys.modules approach.
This is the change that LOSAs have made manually in past deployments. It is not the right fix, which I am working on in svn://svn. zope.org/ repos/main/ zc.buildout/ branches/ gary-4 , but it gives us more breathing room.
The branch with the changes below is svn://svn. zope.org/ repos/main/ zc.buildout/ branches/ gary-8- hack-fix .
Thank you
Gary
Modified: zc.buildout/ branches/ gary-8- hack-fix/ src/zc/ buildout/ easy_install. py ======= ======= ======= ======= ======= ======= ======= ======= ==== branches/ gary-8- hack-fix/ src/zc/ buildout/ easy_install. py 2010-01-20 21:08:52 UTC (rev 108340) branches/ gary-8- hack-fix/ src/zc/ buildout/ easy_install. py 2010-01-20 21:09:31 UTC (rev 108341)
=======
--- zc.buildout/
+++ zc.buildout/
@@ -1287,8 +1287,8 @@
else:
script_header = '#!%(python)s'
-script_template = script_header + '''\ paths_setup) s append( dest)
-
+script_template = script_header + '''
+import encodings.utf_8 # Hack to fix sys.modules approach.
%(relative_
import site
import sys
@@ -1365,8 +1365,8 @@
generated.
return generated
-py_script_template = script_header + '''\
-
+py_script_template = script_header + '''
+import encodings.utf_8 # Hack to fix sys.modules approach.
# Get a clean copy of globals before import or variable definition.
globs = globals().copy()
Modified: zc.buildout/ branches/ gary-8- hack-fix/ src/zc/ buildout/ easy_install. txt ======= ======= ======= ======= ======= ======= ======= ======= ==== branches/ gary-8- hack-fix/ src/zc/ buildout/ easy_install. txt 2010-01-20 21:08:52 UTC (rev 108340) branches/ gary-8- hack-fix/ src/zc/ buildout/ easy_install. txt 2010-01-20 21:09:31 UTC (rev 108341)
=======
--- zc.buildout/
+++ zc.buildout/
@@ -649,6 +649,7 @@
cat(bin, 'demo') # doctest: +NORMALIZE_ WHITESPACE +ELLIPSIS usr/local/ bin/python2. 4
#!/
+ import encodings.utf_8 # Hack to fix sys.modules approach.
<BLANKLINE>
import site
import sys
@@ -721,6 +722,7 @@
cat(bin, 'demo') # doctest: +NORMALIZE_ WHITESPACE +ELLIPSIS usr/local/ bin/python2. 4
#!/
+ import encodings.utf_8 # Hack to fix sys.modules approach.
<BLANKLINE>
import site
import sys
@@ -799,6 +801,7 @@
cat(bin, 'py') # doctest: +NORMALIZE_ WHITESPACE +ELLIPSIS usr/local/ bin/python2. 4
#!/
+ import encodings.utf_8 # Hack to fix sys.modules approach.
# Get a clean copy of globals before import or variable definition.
globs = globals().copy()
<BLANKLINE>
@@ -969,6 +972,7 @@
cat(bin, 'run') # doctest: +NORMALIZE_ WHITESPACE +ELLIPSIS usr/local/ bin/python2. 4
#!/
+ import encodings.utf_8 # Hack to fix sys.modules approach.
<BLANKLINE>
import site
import sys
@@ -1097,6 +1101,7 @@
cat(bin, 'run') # doctest: +NORMALIZE_ WHITESPACE +ELLIPSIS usr/local/ bin/python2. 4
#!/
+ import encodings.utf_8 # Hack to fix sys.modules approach.
<BLANKLINE>
import site
import sys
@@ -1152,6 +1157,7 @@
...