Commit 77d1bbdb authored by Kirill Smelkov's avatar Kirill Smelkov

[XXX DO-NOT-MERGE] erp5: use bstr+ustr as builtin string types

Does not work yet as it currently breaks with

      File "/srv/slapgrid/slappart47/srv/runner/software/7f1663e8148f227ce3c6a38fc52796e2/bin/runwsgi", line 4, in <module>
        from Products.ERP5.bin.zopewsgi import runwsgi; sys.exit(runwsgi())
      File "/srv/slapgrid/slappart47/srv/runner/software/7f1663e8148f227ce3c6a38fc52796e2/parts/erp5/product/ERP5/__init__.py", line 36, in <module>
        from Products.ERP5Type.Utils import initializeProduct, updateGlobals
      File "/srv/slapgrid/slappart47/srv/runner/software/7f1663e8148f227ce3c6a38fc52796e2/parts/erp5/product/ERP5Type/__init__.py", line 42, in <module>
        from .patches import pylint
      File "/srv/slapgrid/slappart47/srv/runner/software/7f1663e8148f227ce3c6a38fc52796e2/parts/erp5/product/ERP5Type/patches/pylint.py", line 524, in <module>
        __import__(module_name, fromlist=[module_name], level=0))
      File "src/lxml/sax.py", line 18, in init lxml.sax
      File "src/lxml/etree.pyx", line 154, in init lxml.etree
    TypeError: Expected bytes, got golang.bstr

in

    cdef bytes _FILENAME_ENCODING = (sys.getfilesystemencoding() or sys.getdefaultencoding() or 'ascii').encode("UTF-8")

    (https://github.com/lxml/lxml/blob/a9f31d9b/src/lxml/etree.pyx#L150)

/cc @kazuhiko, @jerome
parent 79d41451
......@@ -23,9 +23,9 @@ setup-eggs =
[pygolang-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/pygolang.git
branch = master
revision = pygolang-0.1-69-g044deb35
repository = https://lab.nexedi.com/kirr/pygolang.git
branch = y/bstr+x/gpystr
#revision = pygolang-0.1-69-g044deb35
location = ${buildout:parts-directory}/pygolang
git-executable = ${git:location}/bin/git
......
......@@ -506,13 +506,13 @@ initialization =
[erp5-python-interpreter]
# a python interpreter with all eggs available, usable for the software release but also
# for external tools (such as python extension in theia).
# we will also want to use bstr/ustr from gpython as builtin string types, but keep
# we also want to use bstr/ustr from gpython as builtin string types, but keep
# the program named as just `python`.
<= gpython-interpreter
interpreter = python
pre-initialization +=
import os
os.environ.setdefault('GPYTHON_STRINGS', 'pystd') # TODO switch to bstr+ustr
os.environ.setdefault('GPYTHON_STRINGS', 'bstr+ustr')
os.environ.setdefault('GPYTHON_RUNTIME', 'threads')
eggs += ${eggs:eggs}
extra-paths += ${eggs:extra-paths}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment