core: fix Flags not at the start of the expression warnings with new mimetypes_registry
This is follow up of commit 0000dee0 (erp5_core: update mimetypes_registry with shared-mime-info_2.4-5 and media-types_10.1.0., 2024-09-17), after this change, Products.MimetypesRegistry build regular expressions with fnmatch.translate, which on python2 produces regular expressions like: >>> fnmatch.translate('*.aaa') '.*\\.aaa\\Z(?ms) such expressions cause a warning in python3: >>> re.compile('.*\\.aaa\\Z(?ms)') ... re.error: global flags not at the start of the expression at position 9 Running this on python3 would be incompatible with python2, because `fnmatch.translate` on python3 generates regular expressions that are not valid on python2. To solve this mimetypes_registry.xml was edited by hand to move the flags at the beginning, replacing for example '.*\\.aaa\\Z(?ms)' by '(?ms).*\\.aaa\\Z'
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
External | |||||||||
passed |
#716168
external
|
ERP5.PerformanceTest-Master |
00:52:23
|
||||||
failed |
#716170
external
|
ERP5.UnitTest-Master |
05:39:31
|
||||||
passed |
#716257
external
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:23:49
|
||||||
passed |
#716255
external
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:25:58
|
||||||
passed |
#716139
external
|
Wendelin.UnitTest-Master |
01:24:28
|
||||||
failed |
#716090
external
retried
|
ERP5.PerformanceTest-Master |
00:35:01
|
||||||
failed |
#716010
external
retried
|
ERP5.PerformanceTest-Master |
00:34:44
|
||||||
passed |
#716160
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:26:06
|
||||||
passed |
#716034
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:27:01
|
||||||
passed |
#716071
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:36:56
|
||||||
passed |
#716119
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:36:57
|
||||||
passed |
#716081
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:26:25
|
||||||
passed |
#716020
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:35:13
|
||||||
passed |
#716112
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:39:55
|
||||||
passed |
#716148
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:25:52
|
||||||
passed |
#716011
external
retried
|
Wendelin.UnitTest-Master |
00:47:57
|
||||||
passed |
#716057
external
retried
|
Wendelin.UnitTest-Master |
00:39:22
|
||||||