annotate roundup/dist/command/install_lib.py @ 5650:e8ca7072c629
Fix Python 3 issues in REST code.
* Need to use .get not .getheader for HTTP headers (see hg commit
fec18298ae02, "Python 3 preparation: HTTP headers handling in
roundup_server.py.").
* Need to use key not cmp with sort (see hg commit 3fa026621f69,
"Python 3 preparation: comparisons.").
* dispatch output must be bytes, not str, otherwise writing it to the
socket (e.g. in roundup-server) will fail.
This fixes issues shown up attempting to access the REST interface
with a browser with Python 3 (as opposed to with the Roundup
testsuite, which also has known REST issues with Python 3).
| author |
Joseph Myers <jsm@polyomino.org.uk> |
| date |
Sun, 17 Mar 2019 16:25:36 +0000 |
| parents |
85dfe17c182e |
| children |
42bf0a707763 |
| rev |
line source |
4516
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
diff
changeset
|
1 from roundup.dist.command.build import build_message_files, check_manifest
|
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
diff
changeset
|
2 from distutils.command.install_lib import install_lib as base
|
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
diff
changeset
|
3
|
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
diff
changeset
|
4 class install_lib(base):
|
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
diff
changeset
|
5
|
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
diff
changeset
|
6 def run(self):
|
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
diff
changeset
|
7 check_manifest()
|
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
diff
changeset
|
8 build_message_files(self)
|
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
diff
changeset
|
9 base.run(self)
|