/loggerhead/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/loggerhead/trunk

« back to all changes in this revision

Viewing changes to loggerhead/apps/transport.py

  • Committer: Colin Watson
  • Date: 2022-08-08 16:33:50 UTC
  • mto: This revision was merged to the branch mainline in revision 528.
  • Revision ID: cjwatson@canonical.com-20220808163350-xd8ilh0u5m1kiylb
Port from SimpleTAL to Chameleon.

SimpleTAL is a painful dependency, because it has no download files on
PyPI: the only way to depend on it properly is therefore using a direct
URL reference, and as I understand it packages with such references
those can't be uploaded to PyPI.

Porting to Chameleon (Zope's default TAL implementation nowadays) turns
out not to be too difficult.  The main work involved is because it
doesn't support path expressions.  It would be possible to add those
using `z3c.pt`, and I considered that, but that has a significant
dependency tree for packages that don't already use the Zope Toolkit,
and it would have also required extra startup complexity to register
`ITraversable` adapters.  It's easier to convert path expressions to the
equivalent Python expressions, although the process of doing so was
unfortunately quite error-prone.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import threading
20
20
 
21
 
import breezy.ui
22
21
from breezy import branch, errors, lru_cache, urlutils
 
22
from breezy.config import LocationConfig
23
23
from breezy.bzr.smart import request
24
 
from breezy.config import LocationConfig
 
24
import breezy.ui
25
25
from breezy.transport import get_transport
26
26
from breezy.transport.http import wsgi
27
 
from paste import httpexceptions, urlparser
 
27
 
28
28
from paste.request import path_info_pop
 
29
from paste import httpexceptions
 
30
from paste import urlparser
29
31
 
30
32
from .. import util
 
33
from ..apps.branch import BranchWSGIApp
31
34
from ..apps import favicon_app, robots_app, static_app
32
 
from ..apps.branch import BranchWSGIApp
33
35
from ..controllers.directory_ui import DirectoryUI
34
36
 
35
37