annotate .hgignore @ 5525:bb7865241f8a

Make CSV import/export compatible across Python versions (also RDBMS journals) (issue 2550976, issue 2550975). The roundup-admin export and import commands are used for migrating between different database backends. It is desirable that they should be usable also for migrations between Python 2 and Python 3, and in some cases (e.g. with the anydbm backend) this may be required. To be usable for such migrations, the format of the generated CSV files needs to be stable, meaning the same as currently used with Python 2. The export process uses repr() to produce the fields in the CSV files and eval() to convert them back to Python data structures. repr() of strings with non-ASCII characters produces different results for Python 2 and Python 3. This patch adds repr_export and eval_import functions to roundup/anypy/strings.py which provide the required operations that are just repr() and eval() in Python 2, but are more complicated in Python 3 to use data representations compatible with Python 2. These functions are then used in the required places for export and import. repr() and eval() are also used in storing the dict of changed values in the journal for the RDBMS backends. It is similarly desirable that the database be compatible between Python 2 and Python 3, so that export and import do not need to be used for a migration between Python versions for non-anydbm back ends. Thus, this patch changes rdbms_common.py in the places involved in storing journals in the database, not just in those involved in import/export. Given this patch, import/export with non-ASCII characters appear based on some limited testing to work across Python versions, and an instance using the sqlite backend appears to be compatible between Python versions without needing import/export, *if* the sessions/otks databases (which use anydbm) are deleted when changing Python version.
author Joseph Myers <jsm@polyomino.org.uk>
date Sun, 02 Sep 2018 23:48:04 +0000
parents 8e34362a14f7
children b57c3d50505b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4594
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
1 syntax: glob
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
2
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
3 *.orig
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
4 *.rej
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
5 *~
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
6 \#*\#
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
7 .\#*
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
8 *.swp
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
9 *.tmp
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
10 *.pyd
4558
f0d6eecee677 .cvsignore -> .gitignore
Eric S. Raymond <esr@thyrsus.com>
parents:
diff changeset
11 *.pyc
f0d6eecee677 .cvsignore -> .gitignore
Eric S. Raymond <esr@thyrsus.com>
parents:
diff changeset
12 *.pyo
f0d6eecee677 .cvsignore -> .gitignore
Eric S. Raymond <esr@thyrsus.com>
parents:
diff changeset
13 build
f0d6eecee677 .cvsignore -> .gitignore
Eric S. Raymond <esr@thyrsus.com>
parents:
diff changeset
14 demo
f0d6eecee677 .cvsignore -> .gitignore
Eric S. Raymond <esr@thyrsus.com>
parents:
diff changeset
15 dist
f0d6eecee677 .cvsignore -> .gitignore
Eric S. Raymond <esr@thyrsus.com>
parents:
diff changeset
16 MANIFEST
f0d6eecee677 .cvsignore -> .gitignore
Eric S. Raymond <esr@thyrsus.com>
parents:
diff changeset
17 _test_*
f0d6eecee677 .cvsignore -> .gitignore
Eric S. Raymond <esr@thyrsus.com>
parents:
diff changeset
18 *.cover
4594
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
19 share/doc/roundup/html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
20 doc/FAQ.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
21 doc/admin_guide.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
22 doc/announcement.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
23 doc/customizing.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
24 doc/design.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
25 doc/developers.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
26 doc/features.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
27 doc/glossary.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
28 doc/implementation.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
29 doc/index.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
30 doc/installation.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
31 doc/mysql.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
32 doc/overview.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
33 doc/postgresql.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
34 doc/security.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
35 doc/tracker_templates.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
36 doc/upgrading.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
37 doc/user_guide.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
38 doc/whatsnew-0.7.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
39 doc/whatsnew-0.8.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
40 doc/xmlrpc.html
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
41 locale/*.mo
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
42 locale/*.bak
c992e7dcac92 Created .hgignore, removed all .gitignore files
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4558
diff changeset
43 locale/*.poedit
4597
5ca12e280a84 Ignore directories generated by "make html" in website/www
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4594
diff changeset
44 website/www/_tmp/
4703
8e34362a14f7 issue2550774: Fix generating the website documentation
John Kristensen <john@jerrykan.com>
parents: 4613
diff changeset
45 website/www/COPYING.txt
4613
9d0189350187 Ignoring the symbolic link that the www/Makefile may create.
Bernhard Reiter <bernhard@intevation.de>
parents: 4597
diff changeset
46 website/www/docs
4597
5ca12e280a84 Ignore directories generated by "make html" in website/www
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4594
diff changeset
47 website/www/html/

Roundup Issue Tracker: http://roundup-tracker.org/