Denis Ledoux
b882dd7109
[MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5294 revid:odo@openerp.com-20140505074636-bl2y5pst4pfmpz3u
...
bzr revid: dle@openerp.com-20140506121627-4oyw4zl4o6azy73w
2014-05-06 14:16:27 +02:00
Olivier Dony
4836354a16
[FIX] safe_eval: allow STORE_FAST and DELETE_FAST opcodes, used e.g. for comprehension expressions
...
bzr revid: odo@openerp.com-20140428151133-uz7mphscch35dl6o
2014-04-28 17:11:33 +02:00
Christophe Simonis
3d2e9b4d2b
[MERGE] forward port of branch 7.0 up to revid 5281 launchpad_translations_on_behalf_of_openerp-20140412094159-mhy3v2prb3ctx32k
...
bzr revid: jke@openerp.com-20140409153527-mic1a8afcvdhsd27
bzr revid: chs@openerp.com-20140410102422-fcwxhjk40z0oy8x5
bzr revid: chs@openerp.com-20140415133650-y46i0o3qkb2atbvi
2014-04-15 15:36:50 +02:00
Kersten Jeremy
3285feab53
[FIX] Allow missing opcodes, harden check for private attributes (dunder), check inside embedded code objects.
...
bzr revid: jke@openerp.com-20140409151659-xwttchbtbj02v1w7
2014-04-09 17:16:59 +02:00
Christophe Simonis
c7d114d9a9
[MERGE] forward port of branch saas-2 up to revid 5020 chs@openerp.com-20140312174526-a5rhh83g0fw8djuc
...
bzr revid: chs@openerp.com-20140312180614-8yb454s3mkjwnk2q
2014-03-12 19:06:14 +01:00
Olivier Dony
46e1470987
[IMP] safe_eval: allowed opcodes: break, continue, raise ; extra builtins: unicode,int,float,long,enumerate,sum,all,any,ord,chr,cmp,divmod,isinstance,[x]range,zip
...
bzr revid: odo@openerp.com-20140306165849-1sxr9iv5cr87k77n
2014-03-06 17:58:49 +01:00
Antony Lesuisse
4a5b4a8c3f
[IMP] sale_eval break continue raise control flow opcodes
...
bzr revid: al@openerp.com-20140206124019-07in9p9capmznlo2
2014-02-06 13:40:19 +01:00
Antony Lesuisse
ec45bc96f9
[IMP] safe_eval add int float range, rename public user
...
bzr revid: al@openerp.com-20140130034238-qlgbu41d7mg9ns6i
2014-01-30 04:42:38 +01:00
Thibault Delavallée
c76a3aba8f
[CLEAN] ir_qweb: simplified and cleaned QWebcontext implementation
...
- now using openerp.tools.safe_eval, instead of a custom eval with custom builtins
- removed undefined_handler, hardcoded to a lambda function that returns None for
a missing attribute
tools.safe_eval: added a parameter locals_builtins. This allows to copy the builtins
in the locals. This hack is due to the fact that the locals always returns None, allowing
to simplify templates. Otherwise we would have to test the existence of each variable
before actually using it.
However as the locals always return None for every key, the globals are never checked.
Copying the builtins inside the local allows to have a complete locals, but sligtly
break the globals/locals separation.
To be reviewed and approved.
bzr revid: tde@openerp.com-20140116182750-1rnw8iljt5a9gb4u
2014-01-16 19:27:50 +01:00
Olivier Dony
dc37c9ffcf
[FIX] tools.safe_eval: inconsistent indentation
...
bzr revid: odo@openerp.com-20130507084919-zovnqiv0axc3ikr3
2013-05-07 10:49:19 +02:00
Vo Minh Thu
a51b6912bd
[FIX] safe_eval: better exception handling:
...
- the re-raising of exceptions ignored the "legal" exceptions
(the one used to early abort RPC calls and generate pop-ups)
- re-raising the exception was attempting to re-use the original
exception type but it does not always take only one argument
so it was breaking.
lp bug: https://launchpad.net/bugs/1146256 fixed
bzr revid: vmt@openerp.com-20130320132238-qzo3jptww59ndlch
2013-03-20 14:22:38 +01:00
Vo Minh Thu
d43dba744c
safe_eval: re-raise the same exception type when completing it.
...
bzr revid: vmt@openerp.com-20130226094446-7c2dw5c5eou0lg8r
2013-02-26 10:44:46 +01:00
Vo Minh Thu
c62780673c
[FIX] tools.safe_eval: we want to see the expr which fail to eval(), so report it in the exception.
...
bzr revid: vmt@openerp.com-20130225163525-3g9qw1g3hkyyxf1j
2013-02-25 17:35:25 +01:00
Vo Minh Thu
0de24bf983
[IMP] safe_eval: do not log exceptions, when re-raising a new exception, make the stacktrace complete.
...
bzr revid: vmt@openerp.com-20130220102259-avee8fx2a1kpdog3
2013-02-20 11:22:59 +01:00
Cecile Tonglet
5f0070dcb6
[FIX] Remove unused imports and fix some imports that doesn't use the new namespace
...
bzr revid: cto@openerp.com-20121217143029-e9ki4ftwihq7pdme
2012-12-17 15:30:29 +01:00
Holger Brunn
3666ed9828
[FIX] (safe_eval) opcode STORE_MAP belongs into _CONST_OPCODES
...
otherwise, const_eval("{'hello':'world'}") won't work
bzr revid: hbrunn@therp.nl-20120613090222-gt33zwz1aymcmxqo
2012-06-13 11:02:22 +02:00
Christophe Simonis
240943961e
[IMP] log exceptions in safe_eval
...
bzr revid: chs@openerp.com-20120605152630-d4flr4c3mwl7wnvx
2012-06-05 17:26:30 +02:00
Florent Xicluna
5056899093
[MERGE] merged trunk.
...
bzr revid: florent.xicluna@gmail.com-20120208172825-r6og0hfoc181pdt1
2012-02-08 18:28:25 +01:00
Vo Minh Thu
a142292f91
[IMP] openerp.tools: _logger with fully qualified module name.
...
bzr revid: vmt@openerp.com-20120124140056-hqoy49bh7wyr1xce
2012-01-24 15:00:56 +01:00
Florent Xicluna
f65509f1ce
[FIX] AttributeError, 'module' has no attribute 'ext_eval'
...
bzr revid: florent.xicluna@gmail.com-20120119215553-qlb4992c37vi6cuh
2012-01-19 22:55:53 +01:00
Vo Minh Thu
4d77130107
[IMP] tools: removed literal_eval as we drop python 2.6 support.
...
bzr revid: vmt@openerp.com-20120118112400-n7uulbbwm7wr5lpu
2012-01-18 12:24:00 +01:00
Olivier Dony
0eb2986e15
[IMP] safe_eval: allow INPLACE* operator opcodes as introduced in PEP-203
...
bzr revid: odo@openerp.com-20111222101106-h3qbhx53hyhyjor5
2011-12-22 11:11:06 +01:00
Numerigraphe - Lionel Sausin
4651cf935e
[FIX] unmutable defaults in safe_eval
...
bzr revid: ls@numerigraphe.fr-20111107152640-t28rgkfs05jwduab
2011-11-07 16:26:40 +01:00
Olivier Dony
33947042fd
[IMP] safe_eval: allow OPCODES for try/except/finally
...
bzr revid: odo@openerp.com-20111005010136-xkowcqda3kres691
2011-10-05 03:01:36 +02:00
Olivier Dony
fb0c0e8d90
[IMP] safe_eval: allow 'max' builtin
...
bzr revid: odo@openerp.com-20110718145322-wid88kpg568xyxu7
2011-07-18 16:53:22 +02:00
Quentin (OpenERP)
4432d6a9f2
[IMP] safe_eval: added min() in usable functions
...
bzr revid: qdp-launchpad@openerp.com-20110614082920-aokyfw4iizj0fte5
2011-06-14 10:29:20 +02:00
Vo Minh Thu
d02ffafe30
[MERGE] merged the 6.0 branch.
...
bzr revid: vmt@openerp.com-20110322140841-6lt7ky1ohxbrgx68
2011-03-22 15:08:41 +01:00
Vo Minh Thu
f8572e5c60
[IMP] openerp python module.
...
- Some logging code moved from netsvc.py to loglevels.py
- Changed imports to use the new openerp module
- config and netsvc initialization calls move to openerp-server.py
- Moved openerp-server.py outside the old bin directory
- Some imports in tools moved inside the methods to break mutual-dependencies
bzr revid: vmt@openerp.com-20110207125723-ooee7d7ng5elmkso
2011-02-07 13:57:23 +01:00