Development #36515
Tourner (les tests) en Python 3
0%
Description
Hop chapeau, avec un responsable et une échéance avant la deadline.
Fichiers
Demandes liées
Révisions associées
misc: get StringIO from six (#36515)
general: remove bounce processing (#36515)
misc: use SafeText instead of SafeUnicode (#36515)
misc: only convert SafeString when running in Python 2 (#36515)
misc: use cPickle only when available (#36515)
tests: remove unused cPickle import (#36515)
misc: get urlparse from six (#36515)
tests: replace cPickle by pickle (#36515)
misc: update except syntax (#36515)
tests: update location of MIMEText import (#36515)
misc: use print as function (#36515)
misc: get ConfigParser from six (#36515)
tests: remove usage of urllib2 (#36515)
tests: use file() to open file (#36515)
tests: use resp.text (#36515)
misc: write files as binaries (#36515)
misc: always pass bytes for md5 hashing (#36515)
misc: get META via request.environ (do not override property) (#36515)
misc: get urllib from django.six (#36515)
storage: sort results using a key, not a cmp function (#36515)
misc: sort categories using key function (#36515)
misc: sort using key function (#36515)
backoffice: sort ids using key function (#36515)
api: sort using key function (#36515)
tests: sort using key function (#36515)
admin: sort emails/texts using key function (#36515)
misc: replace has_key usages (#36515)
misc: update config load for python 3 (#36515)
use absolute import when creating default workflows (#36515)
misc: update simplify for py3 (#36515)
ezt: update bits for python3 (has_key, basestring, number types) (#36515)
misc: use binary file for storage (#36515)
storage: load/save index files as binary files (#36515)
tests: read/write uploads as binary (#36515)
form: use binary files for uploads (#36515)
misc: write metadata file as binary (#36515)
misc: use binary files for thumbnails (#36515)
admin: create archive as bytes (#36515)
settings: write theme files as binaries (#36515)
request: only preprocess form fields in py2 (#36515)
sql: update storage for py3 compatibility (#36515)
misc: force workflow roles to list (#36515)
sql: force view columns to be defined as text (#36515)
form: adapt date/email widget encoding for py3 (#36515)
misc: replace new module by types module (#36515)
misc: update xml storage to check bytes (#36515)
backoffice: use integer division for pagination (#36515)
backoffice: use integer division in stats (#36515)
tests: force integer division in logged error test (#36515)
tests: update logged error test to use integer division (#36515)
misc: use six.string_types to check (str, unicode) (#36515)
misc: iteritems() -> items() (#36515)
misc: replace basestring by six.string_types (#36515)
logger, six.string_types + six.integer_types (#36515)
tests: give bytes to Upload (#36515)
tests: use req._user to force request user (#36515)
workflows: force list before sorting (#36515)
tests: use urllib from six (#36515)
misc: don't encode json data in py3 (#36515)
storage: use bytes when reading chunks (#36515)
misc: pass bytes to hmac (#36515)
misc: use list comprehensions to check for password character classes (#36515)
workflows: only encode on py2 (#36515)
misc: add force_str(), to encode in Python 2 (#36515)
api: compare signature as bytes (#36515)
use force_str for formdef/workflow imports (#36515)
tests: expand ranges for comparisons (#36515)
tests: use force_str() in sql fts test (#36515)
misc: use force_str in lazy variables (#36515)
api: use sys.maxsize instead of sys.maxint (#36515)
api: force keywords to be an expanded list (#36515)
backoffice: expand .items() to list (#36515)
sql: force visiting_objects to be list (#36515)
templates: use force_str (#36515)
misc: use force_str for formdef/workflow xml exports (#36515)
general: always encode json as utf-8 (#36515)
ods: always encode cell data (#36515)
tests: fix qrcode test so it can be run standalone (#36515)
misc: do not convert non html body (#36515)
misc: encode x509/saml bits (#36515)
saml: sort IdPs before logging automatically on first one (#36515)
forms: don't decode value in py3 (#36515)
tests: use bytes in workflow export/import tests (#36515)
workflows: handle encoding in export/import of workflow actions (#36515)
workflows: expand list of idp to get ws url (#36515)
misc: don't recurse in attachments proxy when deepcopying (#36515)
tests: pass bytes to base64 (#36515)
tests: use strings in email mocking (#36515)
workflows: allow building an attachment from strings (#36515)
tests: adapt wscall error message check for python 3 (#36515)
workflows: handle models as bytes (#36515)
workflows: expand geolocation list (#36515)
workflows: use force_str on wscall result (#36515)
tests: check category export/import as bytes (#36515)
tests: make first admin workflows test run standalone (#36515)
admin: add required encoding for graphviz subprocess (#36515)
admin: add correct encoding to user search (#36515)
admin: adapt theme handling (#36515)
misc: update requests code for py3 (#36515)
tests: update http requests mocking to use bytes (#36515)
misc: load wscall json response as text (#36515)
tests: always compare roles as sets (#36515)
workflows: force visibility to be a list() (#36515)
admin: update workflow functions sort for python3 (#36515)
misc: always expand lists used as widget options (#36515)
tests: expand iterkeys() in assert (#36515)
admin: always use absolute imports for qommon (#36515)
tests: use name to get function name (#36515)
misc: adapt de/encoding in import zip (#36515)
formdata: iterate over a copy of dict keys when flattening it (#36515)
lazy: add bool = nonzero for py3 compatibility (#36515)
tests: rewrite home keywords test to handle different attributes order (#36515)
tests: expand .values() as lists (#36515)
sessions: write files as binaries (#36515)
saml: read keys as binaries (#36515)
backoffice: use force_str for query parameter (#36515)
backoffice: expand categories as list (#36515)
data sources: import xml as strings (#36515)
use force_str when initializing site from xml (#36515)
wscalls: use force_str when importing wscalls (#36515)
storage: add support for sorting disparate types (#36515)
workflows: expand items as list (#36515)
misc: load json as text (#36515)
request: rework json parsing for quixote3 (#36515)
misc: don't encode json in local charset in python 3 (#36515)
storage: unpickle python2 strings as bytes (#36515)
(it would be so much easier to pass encoding='utf-8' and have them
converted but this will fail for objects with datetime/date/time
instances as those requires encoding='latin-1)
workflows: read attachments as binaries (#36515)
tests: check content as bytes (#36515)
hobo notify: use force_str on provisioned attributes (#36515)
sessions: expand .items() when marking visited objects (#36515)
franceconnect: pass bytes to hashlib (#36515)
backoffice: expand geolocation as list (#36515)
conditions: adapt encoding of validation errors (#36515)
misc: encode bytes when producing json output (#36515)
workflows: handle rtf as text (#36515)
workflows: process model text as strings (#36515)
workflows: update export to models for py3 (#36515)
fields: force base64 data as bytes (#36515)
workflows: save webservice call response as bytes (#36515)
tests: check for different error message on py3 (#36515)
workflows: use force_str to display wscall error details (#36515)
misc: adapt nir code validation to py3 (#36515)
tests: only check integer part of reproj result (#36515)
tests: expand get_visited_objects result (#36515)
tests: check provisioned user attribute as proper type (#36515)
ctl: use open() instead of file() (#36515)
ctl: use bytes in check_hobos command (#36515)
tests: check convert to sql errors using str() (#36515)
commands: adapt convert-to-sql for python3 (#36515)
tests: write invalid json file using codecs.encode (#36515)
data sources: use bytes to generate hash for cache key (#36515)
tests: check download contents as bytes (#36515)
tests: use bytes for attachments (#36515)
formdef: use itertools.chain to iterate over two lists (#36515)
tests: check generated PDF using bytes (#36515)
workflows: use json_loads wrapper when displaying wscall error details (#36515)
misc: use strings when distributing base64 to json (#36515)
misc: pass bytes to base64 when doing http basic authentication (#36515)
formdef: handle base64 in xml import/export (#36515)
misc: pass bytes to base64 in utils.attachment() function (#36515)
tests: don't pass encoding to json.dumps (#36515)
api: alter request user using hidden attribute (#36515)
backoffice: export ods as binary (#36515)
workflows: open generated pdf file in binary mode (#36515)
admin: use binary files for theme/global export/import (#36515)
ctl: open zip file in binary mode (#36515)
franceconnect: adapt to py3 (#36515)
middleware: iterate over a copy of form keys when adding session variables (#36515)
storage: allow sorting objects with missing (receipt_)time (#36515)
idp: always write files as binaries (#36515)
misc: adapt password checking to py3 (#36515)
admin: use string to pass overwriting form xml (#36515)
tests: check user formdef xml export using bytes (#36515)
idp: read metadata and PEM keys as text (#36515)
logger: use next() to iterate over log lines (#36515)
tests: don't distinguish unicode data sources in py3 (#36515)
tests: don't manually encode utf8 in formdef name (#36515)
misc: adapt password storage (#36515)
workflows: check for json request using private attribute (#36515)
form: use force_str() on wysiwyg fields (#36515)
tests: adapt inspect page test for py3 (#36515)
misc: update ranked items csv value for py3 (#36515)
tests: adapt test_json_str_decoder for py3 (#36515)
tests: only check simplify() on bytes in py2 (#36515)
tests: adapt mime type tests (#36515)
misc: adapt ranked items for py3 (#36515)
tests: use force_str() to encode item options (#36515)
tests: update test_form_table_field_submit to use force_str (#36515)
emails: force_str() on html rendition of email (#36515)
tests: check decoded email payload (#36515)
tests: update error email for new py3 exception value (#36515)
emails: pass button link into force_str (#36515)
misc: sort dictionary keys when exporting to xml (#36515)
form: use force_str on rendered map (#36515)
storage: force (some) filename as bytes (#36515)
(required for python 3.5)
workflows: look for existence of json content with private attribute (#36515)
runscript: pass script name as str (#36515)
portfolio: pass text to json (#36515)
ctl: update check_hobos to use force_str to handle strings (#36515)
tests: mark request as POST to get mock form data parsed (#36515)
tests: update check against json exception message (#36515)
forms: mark invalid prefill value explicitely (#36515)
tests: don't check application/msword extension as it may vary (#36515)
tests: use PicklableUpload in test that requires copying structure (#36515)
formdef: add pre-json serialization of struct_time workflow options (#36515)
(python3 json serializer would otherwise catch them and serialize them
as tuples)
misc: don't enable form tokens in simulated form in test_display_form (#36515)
publisher: only handle non-encodable exception strings in python 2 (#36515)
misc: use force_str to encode exception in error page (#36515)
tests: make test_finish_failed_request work standalone (#36515)
tests: get test_finish_interrupted_request responses content (#36515)
publisher: restore config.json from zip file as text (#36515)
tox: run tests against python 3 (#36515)
tox: add build dependencies (#36515)
Historique
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Lié à Development #36516: py3 vs types.TypeType ajouté
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Lié à Development #36517: Imports relatifs ajouté
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Lié à Development #36518: Imports relatifs ajouté
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Lié à Development #37572: retirer les appels à unicode() ajouté
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Lié à Development #6107: Retirer l'utf8switch ajouté
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Lié à Development #37574: retirer l'info d'encodage pour les fichiers XML exportés ajouté
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Lié à Development #37577: python3, modules déplacés ajouté
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Lié à Development #37579: python3, utiliser cPickle uniquement quand disponible ajouté
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Lié à Development #37580: python3, print() ajouté
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Lié à Development #37581: python3, syntaxe except ajouté
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Lié à Development #37582: python3, utiliser SafeText plutôt que SafeUnicode ajouté
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Lié à Development #37587: retirer la prise en charge de statsd ajouté
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Fichier wcs-python3-trend.png wcs-python3-trend.png ajouté
- Tracker changé de Autre à Development
- Sujet changé de Tourner en Python 3 à Tourner (les tests) en Python 3
- Statut changé de Nouveau à Solution proposée
Je limite ce ticket aux tests, que ça tourne déjà ainsi pour éviter des régressions à ce niveau, qu'ensuite il soit regardé deux aspects : 1/ migration de données des pickle, 2/ packaging.
En attendant ici, branche wip/36515-python3 avec tout le nécessaire pour passer dans jenkins, cf https://jenkins.entrouvert.org/job/wcs-wip/job/wip%252F36515-python3/ (ma branche de travail initiale était https://jenkins.entrouvert.org/job/wcs-wip/job/wip%252Fpython3-part2/ )
J'ai regroupé des commits qui allaient de manière évidente ensemble mais j'ai quand même laissé le tout en pas mal de petits commits; mais en gros, il y a une part de trucs évidents :
- des modules à tirer depuis six pour assurer la transition
- des print, has_key, et autres
- des sort() qui se faisaient avec une fonction cmp plutôt qu'une fonction key
- des iteritems() et autres, à remplacer, et parfois à taper avec un list() autour quand on veut en tirer un élément précis
- des bytes à passer aux fonctions de hashage, base64, etc.
- des fichiers à lire/écrire en mode binaire
- des six.string_types ou six.integer_types à différents endroits
- l'encodage des chaines, avec ajout d'une fonction force_str() qui fait force_text() en Python 3 et ...encode('utf-8') en Python 2, pour rester sur l'existant
Mais aussi :
- dans les sort(), parfois la misère d'avoir à gérer à la fois des None et des valeurs (cf le init de Criteria dans wcs/qommon/storage.py, qui crée un "self.typed_none" du type opportun)
- Python 3 qui désormais (dé)sérialise en JSON les time.struct_time, en créant des tuples, ce qui ne correspond pas à ce qu'on faisait avant (cf l'export_to_json de FormDef, sur workflow_options)
- un changement de comportement de Quixote 3 sur la détection qu'un formulaire a été soumis, contourné dans certains tests
- un truc pourri dans le stockage pickle qui fait qu'on pourrait avoir une conversion automatique des str() python2 en str() python3 en passant encoding='utf-8' sauf que ça crashe quand il y a des datetime/date/time dans le pickle, et du coup chargement en bytes et il y aura à manuellement gérer la migration (commit "storage: unpickle python2 strings as bytes")
et voilà.
Ça m'irait d'avoir une validation rapide parce que ça va être saoulant à maintenir dans une branche sur le côté.
Mis à jour par Emmanuel Cazenave il y a plus de 4 ans
- e4bd4080 tests: use file() to open file (#36515) : ce serait plutôt use open() (for the record mais bon pas grave, c'est galère de modifier le message d'un commit au fin fond d'une branche)
- a321f200 : surpris que ce soit si court, personne n'utilise CompatHTTPRequest.META ? Je dois louper un truc.
- 2927c87e : le dernier que j'ai regardé unitairement (j'en étais au un dixième des commits à vue de nez).
D'un diff global.
N'oublie pas de changer ceci au moment de pousser :
+ utils.mail_notify(currentBuild, env, 'fpeters+jenkins-wcs@entrouvert.org')
Dans la série 'for the record', je trouve que f22031acf aurait été plus propre avec create_superuser
en fixture, passons.
9f9f623cb : pas compris.
05abc1038 : pas compris.
L'ajout de dépendances dans le tox pour py2 et py3 est surprenant mais j'imagine que c'est suite à un binz tox/pip/setuptools incompréhensible.
(Dans le diff global je me suis arrêté aux tests, qui sortent en premier dans le diff, reste le code de wcs lui même, avis aux amateurs ou je reprendrai demain).
Mis à jour par Frédéric Péters il y a plus de 4 ans
N'oublie pas de changer ceci au moment de pousser :
+ utils.mail_notify(currentBuild, env, 'fpeters+jenkins-wcs@entrouvert.org')
Oui, sûr.
Dans la série 'for the record', je trouve que f22031acf aurait été plus propre avec
create_superuser
en fixture, passons.
Chez moi çe hash pointe vers #8315 (f22031acf44545b34cfb55b1371c75372620a5db) (mais sur la forme générale il y aurait en effet à passer davantage en fixtures, mais ce n'est pas à lier à ce ticket).
9f9f623cb : pas compris.
Pour référence :
- assert tmpl.render(CompatibilityNamesDict({'form': lazy_formdata})) == '1625337.15483/5422836.71627' + coords = tmpl.render(CompatibilityNamesDict({'form': lazy_formdata})).split('/') + assert int(float(coords[0])) == 1625337 + assert int(float(coords[1])) == 5422836
Le changement ici est parce que la précision est différente en Python 3.
05abc1038 : pas compris.
- req.user = None + req._user = None
req.user est une propriété, en python 2 on peut la remplacer par un objet direct, en python 3 pas (AttributeError: can't set attribute), alors comme la propriété commence par regarder self._user, on peut juste remplir ça plutôt.
L'ajout de dépendances dans le tox pour py2 et py3 est surprenant mais j'imagine que c'est suite à un binz tox/pip/setuptools incompréhensible.
C'est parce qu'en Python 2 on s'est reposé sur les dépendances système installées sur la machine jenkins.
Mis à jour par Emmanuel Cazenave il y a plus de 4 ans
- Statut changé de Solution proposée à Solution validée
(suite)
(interminable)
(deux heures plus tard)
Dans les trucs très récurrents, il y a l'utilisation de force_str que je n'ai pas bien compris, mais plutôt que de faire de la pédagogie, déployons ça au plus vite, ce sera bien plus utile.
Mis à jour par Frédéric Péters il y a plus de 4 ans
Pour force_str(), j'en touchais un morceau au-dessus :
l'encodage des chaines, avec ajout d'une fonction force_str() qui fait force_text() en Python 3 et ...encode('utf-8') en Python 2, pour rester sur l'existant
On aurait pu imaginer une phase de transition où en Python 2 on serait passé à des chaines unicode mais c'est très mal/pas géré par Quixote<3; du coup on passe en vraies chaines en Python 3 parce que c'est ça qu'il faut faire, et on reste en "bytes" en Python 2 parce que c'est fait pour tourner avec Quixote<3.
(je ne sais pas si ça éclaire un peu)
Mis à jour par Emmanuel Cazenave il y a plus de 4 ans
Frédéric Péters a écrit :
(je ne sais pas si ça éclaire un peu)
Ça éclaire.
Go go.
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Statut changé de Solution validée à Résolu (à déployer)
ac80c56af tox: add build dependencies (#36515) 279abb775 tox: run tests against python 3 (#36515) de96b7d72 publisher: restore config.json from zip file as text (#36515) 6b07387ad tests: get test_finish_interrupted_request responses content (#36515) 3e78ff2e1 tests: make test_finish_failed_request work standalone (#36515) c142f43fc misc: use force_str to encode exception in error page (#36515) f6995de73 publisher: only handle non-encodable exception strings in python 2 (#36515) 9c710ba2e misc: don't enable form tokens in simulated form in test_display_form (#36515) 1d2a1d869 formdef: add pre-json serialization of struct_time workflow options (#36515) b2b2fa0bf tests: use PicklableUpload in test that requires copying structure (#36515) e2f3df0cc tests: don't check application/msword extension as it may vary (#36515) 5dc016682 forms: mark invalid prefill value explicitely (#36515) 2d9bebb49 tests: update check against json exception message (#36515) d9c03728d tests: mark request as POST to get mock form data parsed (#36515) 7e438162d ctl: update check_hobos to use force_str to handle strings (#36515) 1ce0c7bcc portfolio: pass text to json (#36515) 533a82c9f runscript: pass script name as str (#36515) d0a39cd94 workflows: look for existence of json content with private attribute (#36515) 03a1dffea storage: force (some) filename as bytes (#36515) 0d4aa8f3d form: use force_str on rendered map (#36515) 95b56b56a misc: sort dictionary keys when exporting to xml (#36515) 7e2d341e6 emails: pass button link into force_str (#36515) c3371c012 tests: update error email for new py3 exception value (#36515) 75bdc4816 tests: check decoded email payload (#36515) 347e28380 emails: force_str() on html rendition of email (#36515) 2af7c9d98 tests: update test_form_table_field_submit to use force_str (#36515) 96d0c798b tests: use force_str() to encode item options (#36515) b025c6e19 misc: adapt ranked items for py3 (#36515) 99f3e5d45 tests: adapt mime type tests (#36515) 5ea45846d tests: only check simplify() on bytes in py2 (#36515) a2006e1fd tests: adapt test_json_str_decoder for py3 (#36515) b52ab7e09 misc: update ranked items csv value for py3 (#36515) 61b0a91ee tests: adapt inspect page test for py3 (#36515) bc5871516 form: use force_str() on wysiwyg fields (#36515) 8377202c8 workflows: check for json request using private attribute (#36515) a06cbdd1e misc: adapt password storage (#36515) 9d04c27a7 tests: don't manually encode utf8 in formdef name (#36515) df1496dd4 tests: don't distinguish unicode data sources in py3 (#36515) 059bab843 logger: use next() to iterate over log lines (#36515) 1f1a721ae idp: read metadata and PEM keys as text (#36515) 6d73daa14 tests: check user formdef xml export using bytes (#36515) df600c04e admin: use string to pass overwriting form xml (#36515) 8a5378aec misc: adapt password checking to py3 (#36515) 87a9a96ce idp: always write files as binaries (#36515) b5210bf8a storage: allow sorting objects with missing (receipt_)time (#36515) 66fb1ebbe middleware: iterate over a copy of form keys when adding session variables (#36515) dc610683f franceconnect: adapt to py3 (#36515) 6dfb8cb00 ctl: open zip file in binary mode (#36515) 56652ecc6 admin: use binary files for theme/global export/import (#36515) f3db0ac83 workflows: open generated pdf file in binary mode (#36515) 1bb828399 backoffice: export ods as binary (#36515) fc7b80971 api: alter request user using hidden attribute (#36515) fa1cab0d2 tests: don't pass encoding to json.dumps (#36515) 52f490d19 misc: pass bytes to base64 in utils.attachment() function (#36515) 1950e4a21 formdef: handle base64 in xml import/export (#36515) 8dcccc7e9 misc: pass bytes to base64 when doing http basic authentication (#36515) a36911344 misc: use strings when distributing base64 to json (#36515) 71fce1ed8 workflows: use json_loads wrapper when displaying wscall error details (#36515) f3d08b571 tests: check generated PDF using bytes (#36515) 594af7e6a formdef: use itertools.chain to iterate over two lists (#36515) ca8d2f12e tests: use bytes for attachments (#36515) 6fb05aa64 tests: check download contents as bytes (#36515) 75644e0e5 data sources: use bytes to generate hash for cache key (#36515) a549bf930 tests: write invalid json file using codecs.encode (#36515) 16d69e14a commands: adapt convert-to-sql for python3 (#36515) 87e3f925c tests: check convert to sql errors using str() (#36515) a41d06892 ctl: use bytes in check_hobos command (#36515) 5d7e3d9ff ctl: use open() instead of file() (#36515) bd84240b5 tests: check provisioned user attribute as proper type (#36515) 2d49eb4cb tests: expand get_visited_objects result (#36515) a377981ee tests: only check integer part of reproj result (#36515) 896f6a560 misc: adapt nir code validation to py3 (#36515) 1042ecb3f workflows: use force_str to display wscall error details (#36515) 9926c1834 tests: check for different error message on py3 (#36515) e30cd0354 workflows: save webservice call response as bytes (#36515) 2323b9e44 fields: force base64 data as bytes (#36515) 9ec61bf16 workflows: update export to models for py3 (#36515) 5a2f18f3d workflows: process model text as strings (#36515) 332c910ee workflows: handle rtf as text (#36515) d8534d500 misc: encode bytes when producing json output (#36515) 2268d53de conditions: adapt encoding of validation errors (#36515) 728f4c4bf backoffice: expand geolocation as list (#36515) 04ab5c841 franceconnect: pass bytes to hashlib (#36515) 458846d5b sessions: expand .items() when marking visited objects (#36515) 66e84dadc hobo notify: use force_str on provisioned attributes (#36515) 28c9c30b8 tests: check content as bytes (#36515) 6f6635e59 workflows: read attachments as binaries (#36515) 1adc8d855 storage: unpickle python2 strings as bytes (#36515) 2eb3b272b misc: don't encode json in local charset in python 3 (#36515) c6ac153a8 request: rework json parsing for quixote3 (#36515) e331c7347 misc: load json as text (#36515) 2a90f8e19 workflows: expand items as list (#36515) f20226c14 storage: add support for sorting disparate types (#36515) a22e384ac wscalls: use force_str when importing wscalls (#36515) 3982bcb10 use force_str when initializing site from xml (#36515) d9f732c14 data sources: import xml as strings (#36515) 9a42be138 backoffice: expand categories as list (#36515) 64d5c25ff backoffice: use force_str for query parameter (#36515) d51ea1701 saml: read keys as binaries (#36515) 41f080309 sessions: write files as binaries (#36515) 32047b964 tests: expand .values() as lists (#36515) e57e4ec44 tests: rewrite home keywords test to handle different attributes order (#36515) 451e8adfe lazy: add __bool__ = __nonzero__ for py3 compatibility (#36515) 9e1cf8db6 formdata: iterate over a copy of dict keys when flattening it (#36515) 220a87f74 misc: adapt de/encoding in import zip (#36515) d3d70a325 tests: use __name__ to get function name (#36515) eee2c6659 admin: always use absolute imports for qommon (#36515) fbf378582 tests: expand iterkeys() in assert (#36515) 9a19293d1 misc: always expand lists used as widget options (#36515) 7411f6314 admin: update workflow functions sort for python3 (#36515) 95f1c5244 workflows: force visibility to be a list() (#36515) 0a86069e3 tests: always compare roles as sets (#36515) 73a124497 misc: load wscall json response as text (#36515) b6fcd7732 tests: update http requests mocking to use bytes (#36515) c06b02870 misc: update requests code for py3 (#36515) dbe3d21ff admin: adapt theme handling (#36515) 29006dcab admin: add correct encoding to user search (#36515) ee2e4b467 admin: add required encoding for graphviz subprocess (#36515) 6ce363b66 tests: make first admin workflows test run standalone (#36515) 853ca330b tests: check category export/import as bytes (#36515) 460eee27c workflows: use force_str on wscall result (#36515) 08c628208 workflows: expand geolocation list (#36515) 03927a355 workflows: handle models as bytes (#36515) e4ab74424 tests: adapt wscall error message check for python 3 (#36515) 91c5c913c workflows: allow building an attachment from strings (#36515) e0f8b37f9 tests: use strings in email mocking (#36515) 6789ec0a5 tests: pass bytes to base64 (#36515) 45330da62 misc: don't recurse in attachments proxy when deepcopying (#36515) 8660de6c3 workflows: expand list of idp to get ws url (#36515) ae5a3b6b6 workflows: handle encoding in export/import of workflow actions (#36515) 4d8c743cc tests: use bytes in workflow export/import tests (#36515) 29a395a91 forms: don't decode value in py3 (#36515) d50bd086c saml: sort IdPs before logging automatically on first one (#36515) ac5090bf0 misc: encode x509/saml bits (#36515) eb0e74a5f misc: do not convert non html body (#36515) c0082bd54 tests: fix qrcode test so it can be run standalone (#36515) 590e51d44 ods: always encode cell data (#36515) c0a26bb67 general: always encode json as utf-8 (#36515) 03870baeb misc: use force_str for formdef/workflow xml exports (#36515) 587eceb59 templates: use force_str (#36515) 25db9ec90 sql: force visiting_objects to be list (#36515) 817c34c87 backoffice: expand .items() to list (#36515) aad492547 api: force keywords to be an expanded list (#36515) b008b1b0d api: use sys.maxsize instead of sys.maxint (#36515) 1c6837c1c misc: use force_str in lazy variables (#36515) cddad2a13 tests: use force_str() in sql fts test (#36515) 2ab5a9db7 tests: expand ranges for comparisons (#36515) ee28cb7bc use force_str for formdef/workflow imports (#36515) 65d7c92a6 api: compare signature as bytes (#36515) 8cf415e66 misc: add force_str(), to encode in Python 2 (#36515) 4b82f00c7 workflows: only encode on py2 (#36515) 52ecc9401 misc: use list comprehensions to check for password character classes (#36515) eeed7d630 misc: pass bytes to hmac (#36515) 8132c06da storage: use bytes when reading chunks (#36515) b57228660 misc: don't encode json data in py3 (#36515) 023872245 tests: use urllib from six (#36515) d030541ff workflows: force list before sorting (#36515) 04a8d42ca tests: use req._user to force request user (#36515) 27201a057 tests: give bytes to Upload (#36515) a84c94911 logger, six.string_types + six.integer_types (#36515) c36f13852 misc: replace basestring by six.string_types (#36515) f96426853 misc: iteritems() -> items() (#36515) 2bcbb6b44 misc: use six.string_types to check (str, unicode) (#36515) bdb9ab669 tests: update logged error test to use integer division (#36515) a9ef2ee5c tests: force integer division in logged error test (#36515) 15b9bfade backoffice: use integer division in stats (#36515) f43547d7e backoffice: use integer division for pagination (#36515) 08b0c3c68 misc: update xml storage to check bytes (#36515) ec790a911 misc: replace new module by types module (#36515) 9e2a16338 form: adapt date/email widget encoding for py3 (#36515) a0615d4eb sql: force view columns to be defined as text (#36515) b533ffbcf misc: force workflow roles to list (#36515) 2e0df59c7 sql: update storage for py3 compatibility (#36515) fddc1e70a request: only preprocess form fields in py2 (#36515) 53d19d563 settings: write theme files as binaries (#36515) eb24de3d6 admin: create archive as bytes (#36515) bcd89087e misc: use binary files for thumbnails (#36515) dcaf69303 misc: write metadata file as binary (#36515) 4beb5670a form: use binary files for uploads (#36515) 68172f6b3 tests: read/write uploads as binary (#36515) 19c8a9f03 storage: load/save index files as binary files (#36515) ad7deb535 misc: use binary file for storage (#36515) d96951026 ezt: update bits for python3 (has_key, basestring, number types) (#36515) 601e1e974 misc: update simplify for py3 (#36515) 1cc98e2ba use absolute import when creating default workflows (#36515) ec615482d misc: update config load for python 3 (#36515) 7603e808f misc: replace has_key usages (#36515) 51a4b9857 admin: sort emails/texts using key function (#36515) 5f2855c60 tests: sort using key function (#36515) f43e9e038 api: sort using key function (#36515) b51c8b29b backoffice: sort ids using key function (#36515) 929271ea9 misc: sort using key function (#36515) e0736bb32 misc: sort categories using key function (#36515) a0b301d75 storage: sort results using a key, not a cmp function (#36515) 58709d308 misc: get urllib from django.six (#36515) 2381d57f1 misc: get META via request.environ (do not override property) (#36515) 68e4df6be misc: always pass bytes for md5 hashing (#36515) 84e801eb4 misc: write files as binaries (#36515) 68837c7b7 tests: use resp.text (#36515) 46b178697 tests: use file() to open file (#36515) f2c22c9b8 tests: remove usage of urllib2 (#36515) 563e25e45 misc: get ConfigParser from six (#36515) cb9d208aa misc: use print as function (#36515) b8e68257d tests: update location of MIMEText import (#36515) 7fe626dda misc: update except syntax (#36515) 79a23d7f6 tests: replace cPickle by pickle (#36515) 26ed33257 misc: get urlparse from six (#36515) 59e2f81b1 tests: remove unused cPickle import (#36515) 2cde27b98 misc: use cPickle only when available (#36515) b6272576d misc: only convert SafeString when running in Python 2 (#36515) 4f413115b misc: use SafeText instead of SafeUnicode (#36515) abf453b07 general: remove bounce processing (#36515) 268d68afa misc: get StringIO from six (#36515) a7844cf7c general: replace unicode() calls by force_text() (#36515)
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Statut changé de Résolu (à déployer) à Solution déployée
general: replace unicode() calls by force_text() (#36515)