- 30 Jan, 2023 8 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
Usually we run tests with two nodes, so when there's a conflict it's always between the "main" node and the processing node, so we always have a distributing node during conflict. But when running with, for example, 2 nodes (the main node + 2 nodes), the conflict might occur between the two processing nodes and after the resolution we still don't have a distributing node.
-
Jérome Perrin authored
-
Jérome Perrin authored
When looking up a document by reference, using getDocumentValueList from the context of a web site / web section might not find the documents, depending on the predicates defined on the web site / web section.
-
Jérome Perrin authored
This gadget looks up a document by reference, by using getDocumentValueList on the context of the web section. getDocumentValueList also applies the criterions from the context, but because web page references are already unique, adding more criterions can just cause the document to be not found and the gadget to display the "No document" error.
-
Jérome Perrin authored
This sort was based on the id of the role definition but this did not work when the type definition had more than 10 documents, because: >>> sorted(['1', '2', '10']) ['1', '10', '2'] This switches to an approach of converting the id to integer, with a fallback in case the id generator is customized.
-
Jérome Perrin authored
-
- 29 Jan, 2023 1 commit
-
-
Aurel authored
-
- 28 Jan, 2023 1 commit
-
-
Arnaud Fontaine authored
-
- 26 Jan, 2023 1 commit
-
-
Xiaowu Zhang authored
See merge request nexedi/erp5!1732
-
- 25 Jan, 2023 4 commits
-
-
Xiaowu Zhang authored
See merge request nexedi/erp5!1731
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
cause by nexedi/erp5!1726
-
Jérome Perrin authored
On the way to Zope 4, the biggest change was DateTime >= 3, which has these main differences: - `DateTime` instances are new style classes - `DateTime.__eq__` now take into the timezone into account - `DateTime` supports timezone naive ( https://docs.python.org/3/library/datetime.html#aware-and-naive-objects ) - actually this is since DateTime 2.12 , but since we fully patched the method where the parsing happens, ERP5's patched DateTime never used timezone naive dates. - pickles are also different. These are changes to prepare ERP5 code base to support DateTime >= 3, while keeping compatibility with the previous behavior, this means that we keep patching to keep the same behavior as DateTime 2, so that `DateTime.__eq__` ignores timezone difference and `DateTime` does not support timezone naive dates - these two different behavior seemed to introduce too much breakages, especially in project code, with no immediate benefit for our usages. For now, while ERP5 is still based on Zope 2 / DateTime 2 the fact that DateTime are new style classes has no impact, this will only impact once we switch to Zope 4. This also change the code to adjust the part where we were depending on implementation details of DateTime and where the details changed on DateTime 3, sometimes exposing higher level API, like the new `timeZoneContext` to use in tests. See merge request nexedi/erp5!1593
-
- 24 Jan, 2023 3 commits
-
-
Roque authored
See merge request nexedi/erp5!1725
-
Roque authored
-
Roque authored
-
- 23 Jan, 2023 10 commits
-
-
Xiaowu Zhang authored
See merge request nexedi/erp5!1726
-
Jérome Perrin authored
use calendar module and public DateTime API instead.
-
Jérome Perrin authored
This ensures that we don't break more.
-
Jérome Perrin authored
We have code depending on these attributes, they were used in pattern like this: ```py try: DateTime(user_input) except DateTime.DateError: error("invalid date") ``` so it's safer to keep the attributes for now, since we are already patching a lot
-
Jérome Perrin authored
We have too much code depending on this behavior, so we keep this patch for now.
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
By using iso format we create dates in UTC timezone
-
Jérome Perrin authored
This is a context manager which temporary allow to change the time zone. It is not thread safe and intended to be used in tests only, to replace setTimeZoneToUTC and setTimezone methods by something unified which makes the transition to DateTime 4 easier, because changing timezone was done by patching private attributes and the DateTime 4 use different attributes.
-
- 20 Jan, 2023 1 commit
-
-
Xiaowu Zhang authored
-
- 18 Jan, 2023 5 commits
-
-
Jérome Perrin authored
Use calendar module instead. These API depends on current locale, but we don't set the locale in ERP5, so these remain in English
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
This is just hiding problem and does not seem needed.
-
Jérome Perrin authored
-
- 17 Jan, 2023 2 commits
-
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-
- 16 Jan, 2023 1 commit
-
-
Xiaowu Zhang authored
-
- 13 Jan, 2023 3 commits
-
-
Xiaowu Zhang authored
See merge request nexedi/erp5!1723
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-