annotate setup.cfg @ 8908:8993d401575b stable

files: fix raw download of repo files with names with unicode points above 256 in name Raw download had apparently only been tested with non-ascii characters that were latin1. That was apparently a (too) simple case that worked without crashing. Files with unicode code points above 256 in their name would fail to download, when Waitress failed like this, trying to get a real byte string by encoding WSGI headers to latin1: UnicodeEncodeError: 'latin-1' codec can't encode characters in position 84-85: ordinal not in range(256) HTTP headers are of course byte strings on the network, but Python3 WSGI does unfortunately neither expose it as bytes nor as unicode strings to be encoded as utf-8. Instead, it uses unicode strings with byte values encoded as code points 0-255. That is achieved by decoding the utf-8 encoded bytes as latin1. For raw downloads, the recommended download filename is provided in the Content-Disposition header. The problem is that it was provided as a real unicode string. Fixed by applying the "proper" latin1-decoding of a utf8-encoding.
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 07 Feb 2022 19:07:08 +0100
parents 278cc5936ed5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
1 [egg_info]
5379
1949ece749ce cleanup: fix whitespace in CONTRIBUTORS (and other forgotten files) too
Mads Kiilerich <madski@unity3d.com>
parents: 5146
diff changeset
2 tag_build =
4988
acaa02179aeb setup.cfg: update checked-in version to match how sdist writes it
Mads Kiilerich <madski@unity3d.com>
parents: 4257
diff changeset
3 tag_svn_revision = 0
acaa02179aeb setup.cfg: update checked-in version to match how sdist writes it
Mads Kiilerich <madski@unity3d.com>
parents: 4257
diff changeset
4 tag_date = 0
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
5
5700
d88077fae3d6 pytest migration: switch to pytest; remove nose support
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5416
diff changeset
6 [aliases]
d88077fae3d6 pytest migration: switch to pytest; remove nose support
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5416
diff changeset
7 test = pytest
5061
8c1258f69892 tests: Move pytest config (norecursedirs) from tox.ini to setup.cfg
Mads Kiilerich <madski@unity3d.com>
parents: 4988
diff changeset
8
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
9 [compile_catalog]
4186
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3960
diff changeset
10 domain = kallithea
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3960
diff changeset
11 directory = kallithea/i18n
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
12 statistics = true
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
13
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
14 [extract_messages]
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
15 add_comments = TRANSLATORS:
4186
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3960
diff changeset
16 output_file = kallithea/i18n/kallithea.pot
4248
10df28cbcce7 Correct contact address for translations.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4208
diff changeset
17 msgid-bugs-address = translations@kallithea-scm.org
4208
ad38f9f93b3b Correct licensing information in individual files.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4186
diff changeset
18 copyright-holder = Various authors, licensing as GPLv3
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
19
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
20 [init_catalog]
4186
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3960
diff changeset
21 domain = kallithea
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3960
diff changeset
22 input_file = kallithea/i18n/kallithea.pot
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3960
diff changeset
23 output_dir = kallithea/i18n
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
24
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
25 [update_catalog]
4186
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3960
diff changeset
26 domain = kallithea
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3960
diff changeset
27 input_file = kallithea/i18n/kallithea.pot
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3960
diff changeset
28 output_dir = kallithea/i18n
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
29 previous = true
592
0a48c1ec04fc #37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents: 589
diff changeset
30
0a48c1ec04fc #37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents: 589
diff changeset
31 [build_sphinx]
0a48c1ec04fc #37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents: 589
diff changeset
32 source-dir = docs/
4988
acaa02179aeb setup.cfg: update checked-in version to match how sdist writes it
Mads Kiilerich <madski@unity3d.com>
parents: 4257
diff changeset
33 build-dir = docs/_build
acaa02179aeb setup.cfg: update checked-in version to match how sdist writes it
Mads Kiilerich <madski@unity3d.com>
parents: 4257
diff changeset
34 all_files = 1
592
0a48c1ec04fc #37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents: 589
diff changeset
35
0a48c1ec04fc #37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents: 589
diff changeset
36 [upload_sphinx]
3932
3483de9d11e5 updated pot file and extract_messages defaults
Marcin Kuzminski <marcin@python-works.com>
parents: 3158
diff changeset
37 upload-dir = docs/_build/html
8854
278cc5936ed5 pytype: introduce configuration for running pytype
Mads Kiilerich <mads@kiilerich.com>
parents: 7925
diff changeset
38
278cc5936ed5 pytype: introduce configuration for running pytype
Mads Kiilerich <mads@kiilerich.com>
parents: 7925
diff changeset
39 [pytype]
278cc5936ed5 pytype: introduce configuration for running pytype
Mads Kiilerich <mads@kiilerich.com>
parents: 7925
diff changeset
40 inputs =
278cc5936ed5 pytype: introduce configuration for running pytype
Mads Kiilerich <mads@kiilerich.com>
parents: 7925
diff changeset
41 kallithea
278cc5936ed5 pytype: introduce configuration for running pytype
Mads Kiilerich <mads@kiilerich.com>
parents: 7925
diff changeset
42 setup.py
278cc5936ed5 pytype: introduce configuration for running pytype
Mads Kiilerich <mads@kiilerich.com>
parents: 7925
diff changeset
43 exclude =
278cc5936ed5 pytype: introduce configuration for running pytype
Mads Kiilerich <mads@kiilerich.com>
parents: 7925
diff changeset
44 **/test_*.py
278cc5936ed5 pytype: introduce configuration for running pytype
Mads Kiilerich <mads@kiilerich.com>
parents: 7925
diff changeset
45 disable =
278cc5936ed5 pytype: introduce configuration for running pytype
Mads Kiilerich <mads@kiilerich.com>
parents: 7925
diff changeset
46 pyi-error
278cc5936ed5 pytype: introduce configuration for running pytype
Mads Kiilerich <mads@kiilerich.com>
parents: 7925
diff changeset
47 keep_going = True
278cc5936ed5 pytype: introduce configuration for running pytype
Mads Kiilerich <mads@kiilerich.com>
parents: 7925
diff changeset
48 #jobs = 3