- 08 Nov, 2019 1 commit
-
-
Jérome Perrin authored
with namedtuples and unicode literals enabled, our patch break with: Module py2stdlib, line 266, in infer_named_tuple ''' % {'name': name, 'fields': attributes}) Module Products.ERP5Type.patches.pylint, line 74, in string_build encoding = _guess_encoding(data) Module astroid.builder, line 65, in _guess_encoding if string.startswith('\xef\xbb\xbf'): UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128) because pylint/astroid uses string_build to evaluate the named tuple and the source code enabled unicode_literals future, string_build is called with an unicode object. -> for inferred in node.func.infer(): astroid-1.3.8-py2.7.egg/astroid/bases.py(391)infer() -> return self._explicit_inference(self, context, **kwargs) astroid-1.3.8-py2.7.egg/astroid/brain/py2stdlib.py(266)infer_named_tuple() -> ''' % {'name': name, 'fields': attributes}) > erp5/product/ERP5Type/patches/pylint.py(77)string_build() -> data = data.encode('utf-8') (Pdb) up > astroid-1.3.8-py2.7.egg/astroid/brain/py2stdlib.py(266)infer_named_tuple() -> ''' % {'name': name, 'fields': attributes}) (Pdb) l 249 def infer_named_tuple(node, context=None): 250 """Specific inference function for namedtuple CallFunc node""" 251 class_node, name, attributes = infer_func_form(node, nodes.Tuple._proxied, 252 context=context) 253 fake = AstroidBuilder(MANAGER).string_build(''' 254 class %(name)s(tuple): 255 _fields = %(fields)r 256 def _asdict(self): 257 return self.__dict__ 258 @classmethod 259 def _make(cls, iterable, new=tuple.__new__, len=len): 260 return new(cls, iterable) 261 def _replace(_self, **kwds): 262 result = _self._make(map(kwds.pop, %(fields)r, _self)) 263 if kwds: 264 raise ValueError('Got unexpected field names: %%r' %% list(kwds)) 265 return result 266 -> ''' % {'name': name, 'fields': attributes}) (Pdb) pp name u'NamedTuple' (Pdb) pp attributes [u'foo', u'bar'] (Pdb) pp [ (arg, arg.value) for arg in node.args ] [(<Const(unicode) l.4 [checkPythonSourceCodelXOzr3] at 0x7f9f1caee250>, u'NamedTuple'), (<Const(unicode) l.4 [checkPythonSourceCodelXOzr3] at 0x7f9f1caeebd0>, u'foo bar')] /reviewed-on nexedi/erp5!978
-
- 07 Nov, 2019 7 commits
-
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Vincent Pelletier authored
To avoid duplicating _processSearchValue.
-
Vincent Pelletier authored
Scriptable keys are already handled by other branches below. If one wants to provide a string or dict value to a scriptable key, they need to wrap it into another type to disable catalog processing of these values.
-
Vincent Pelletier authored
-
Vincent Pelletier authored
Also, add a missing ignore_unknown_columns parameter.
-
Vincent Pelletier authored
These are only accessed within methods which are not reachable from this SearckKey type, so this was essentially dead code.
-
- 06 Nov, 2019 3 commits
-
-
Jérome Perrin authored
This allow using measure.updateCellRange to create varianted measures programmatically. Remove the TALES for lines, columns and tab on the matrix box because the default behavior is to call this updateCellRange script /reviewed-on !974
-
Vincent Pelletier authored
-
Vincent Pelletier authored
As was initially intended, but visible a directory level got lost in an intermediate patch file.
-
- 05 Nov, 2019 1 commit
-
-
Romain Courteaud authored
-
- 31 Oct, 2019 28 commits
-
-
Arnaud Fontaine authored
* This didn't work anyway with concurrent processes using the same SVN working copy (which is a frequent use case nowadays). * Now that it has been migrated to ZODB Components, this also breaks on reset: 1) Thread T1 acquires the lock. 2) Thread T2 performs a reset. 3) Thread T2 loads Subversion and thus a new RLock instance is created. => T2 can acquire the lock.
-
Arnaud Fontaine authored
Moved 'git_askpass' shell script to product/ERP5/bin (considering that this is a very short shell script which hasn't changed in 7 years, no need to move it to the ZODB which would require creating a temporary file...). After updating erp5_forge, you should delete 'product/ERP5VCS/' directory as this will only contain '.pyc' files. /reviewed-on nexedi/erp5!973
-
Romain Courteaud authored
-
Bryton Lacquement authored
This fixes the issue that a truncated traceback followed the json.
-
Bryton Lacquement authored
This is a backport from Zope (see commit 9c8dd7672cbef67573b3641178f12337c80de074).
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
>>> True and [(1,2)] [(1, 2)] >>> False and [(1,2)] False >>> [] and [(1,2)] []
-
Romain Courteaud authored
This is needed for compatibility with existing actions.
-
Romain Courteaud authored
Fields must propagate all values requested by ERP5.
-
Romain Courteaud authored
-
Romain Courteaud authored
Add a new url_generator mode Do not redirect to 'view': let the js handle the default navigation Do not generate view url if document does not acquire the hal web section
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Jérome Perrin authored
This is to support SLAPOS-EGG-TEST which runs tests for multiple repositories from the same test suite. Evaluating each commit from each repository with the result of the test result is problematic because every time one test fail, all repositories are marked as failed. Introduce a new property on test result repository to optionally define the pattern of test result line to consider for this repository. This way, with our SLAPOS-EGG-TEST running tests for slapos, slapos.core, ... etc and producing test result line with the same title as the repository name, we can use something like `slapos$` (the pattern is a regular expression) to match only slapos, `slapos\.core` to match only slapos.core etc. This also allow to define more complex relation if necessary, for example kedifa and caucase seems related, maybe we want to configure so that a failure on kedifa test suite marks the commits from both kedifa and caucase as failed (or maybe not, but at least this way should make it possible) /reviewed-on nexedi/erp5!964
-
Jérome Perrin authored
When a commit is no longer reachable from a branch, gitlab API does not allow annotating the commit. This happens quite often when we push force in the branch after test result started to run on this branch. /reviewed-on nexedi/erp5!972
-
Jérome Perrin authored
The previous way of using portal.ERP5Site_absoluteUrl() + test_result.getRelativeUrl() could not work with ERP5JS URLs. To be compatible with this and also maybe erp5_web-style URLs if we want to link to public tests results, we should have more flexibility in how we generate URLs. Introduce a "test result url template" property on gitlab connector, see unit test for a renderjs ui compatible usage. /reviewed-on nexedi/erp5!963
-
Jérome Perrin authored
Because gitlab way of passing project ID as user/project URL-encoded does not support dots (it would needs to be encoded as %2E) and that requests rewrites %2F from URL to . (which is probably correct, that's the RFC), we cannot use encoded paths for when they contain a dot. To workaround this, when user or repo as a dot, make another API call to get the numerical project ID and use that instead. We only do that for projects with a dot because that's an extra request we'd like to avoid. /reviewed-on nexedi/erp5!962
-
Jérome Perrin authored
While deploying nexedi/erp5!924 we found out that this script was not working in these cases: * when buildout section id contains `-repository` there's a convention that this is stripped and does not appear in test result reference ( implemented [here](https://lab.nexedi.com/nexedi/erp5/blob/31804f683fd36322fb38aeb9654bee70cebe4fdb/erp5/util/testnode/NodeTestSuite.py#L95) ) * when buildout section id contains `-` this script crash * when there's no buildout section id and there's no fix for that, because buildout section id is a required property. If we encounter this failure, we fix the data by putting a buildout section id on test suite repository. /reviewed-on nexedi/erp5!961
-
Arnaud Fontaine authored
-
Vincent Pelletier authored
Guarded with Manager role, as they allow exporting entire source files & scripts.
-