in stand-alone mode. Changed the import web.common to relative import
(because the the import-hook in the server is not able to load
modules with self-referential import).
bzr revid: vmt@openerp.com-20120116104329-k68li2vul4b3j7ry
turns out ElementTree has a hard time XML-serializing ``None`` (who'd
have guessed...), which is what it gets told to do when concat_xml is
called with an empty list of files.
Return an empty string and no timestamp (should probably be one there
at some point, but...) and fix the QWeb loader to not do anything when
it gets an empty template file.
bzr revid: xmo@openerp.com-20120113150641-6i3ot1jg7r3kpw3d
If the final semicolon of an openerp module is forgotten and the next
file starts with an expression (such as a parens, because it's a
third-party module using the module pattern, see Backbone.js or jQuery
for examples), the JS parser will not perform semicolon insertion and
will instead try to execute the module's wrapper/initializer function
by passing it whatever follows it (generally an other function).
This usually results in an error and stuff blowing out everywhere for
no obvious reason.
Concatenation of JS files now adds an explicit semicolon between files
(ideally it should only add one if it's missing, but that would
require backtracking in the file while skipping comments &etc, can't
be arsed and double-semicolons don't hurt much) to avoid this issue.
bzr revid: xmo@openerp.com-20120113150110-47j90oishtjrib7s
The default configuration for OpenERP Web standalone (launched via the
openerp-web script) is single-threaded for log-readability purposes.
web.common.controllers.main.Proxy.load has been added to wrap a
request to an HTTP handler inside a JSON (and/or JSONP) request, the
initial implementation was to perform a full HTTP call *from within an
HTTP handler to itself*.
Since the server is single-threaded and its only thread is already
busy, it can't handle the new request, and the client deadlocks.
Replaced this crap by also-crap-but-slightly-less-so: instantiating a
Werkzeug test client using the root application and proxying the
request through that. Avoids creating a new request from the server,
therefore does not deadlock.
lp bug: https://launchpad.net/bugs/905384 fixed
bzr revid: xmo@openerp.com-20111219145759-m10zgo3tcd6zjhcu
Using the new authenticate() API instead allows to pass
a user-agent environment along with the credentials.
The main use for the UA environment at this point is
to pass the base URL used to login, so that the server
may initialize its "web.base.url" global config parameters
bzr revid: odo@openerp.com-20111213161554-jbtrp94aatcnibne
Leftover CherryPy code (cherrypy's file wrapper —
cherrypy._cpreqbody.Part — gives access to the underlying data stream
via the `file` attribute, Werkzeug uses the `stream` attributes and
proxies all file methods through the FileStorage, just remove the
indirection)
lp bug: https://launchpad.net/bugs/889122 fixed
bzr revid: xmo@openerp.com-20111114125106-zymon3zb4umlwhr2