annotate MANIFEST.in @ 8163:24e1099e4f29

py3: make get_current_authuser handle missing tg context consistently and explicitly tg context handling ends up using tg.support.registry.StackedObjectProxy._current_obj for attribute access ... which if no context has been pushed will end up in: raise TypeError( 'No object (name: %s) has been registered for this ' 'thread' % self.____name__) utils2.get_current_authuser used code like: if hasattr(tg.tmpl_context, 'authuser'): Python 2 hasattr will call __getattr__ and return False if it throws any exception. (It would thus catch the TypeError and silently fall through to use the default user None.) This hasattr behavior is confusing and hard to use correctly. Here, it was used incorrectly. It has been common practice to work around by using something like: getattr(x, y, None) is not None Python 3 hasattr fixed this flaw and only catches AttributeError. The TypeError would thus (rightfully) be propagated. That is a change that must be handled when introducing py3 support. The get_current_authuser code could more clearly and simple and py3-compatible be written as: return getattr(tmpl_context, 'authuser', None) - but then we also have to handle the TypeError explicitly ... which we are happy to do.
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 31 Jan 2020 18:48:15 +0100
parents ddfecf9fe7f2
children 97c5e6ac5c75
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6790
8cea7986ed79 manifest: update file name list - for example, fix the path to the template.ini.mako config template
Mads Kiilerich <mads@kiilerich.com>
parents: 6555
diff changeset
1 include .coveragerc
4987
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
2 include Apache-License-2.0.txt
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
3 include CONTRIBUTORS
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
4 include COPYING
6790
8cea7986ed79 manifest: update file name list - for example, fix the path to the template.ini.mako config template
Mads Kiilerich <mads@kiilerich.com>
parents: 6555
diff changeset
5 include Jenkinsfile
4987
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
6 include LICENSE-MERGELY.html
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
7 include LICENSE.md
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
8 include MIT-Permissive-License.txt
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
9 include README.rst
7968
ddfecf9fe7f2 MANIFEST.in: add missing conftest.py added in commit afa5e0bdb76f
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents: 7459
diff changeset
10 include conftest.py
6790
8cea7986ed79 manifest: update file name list - for example, fix the path to the template.ini.mako config template
Mads Kiilerich <mads@kiilerich.com>
parents: 6555
diff changeset
11 include dev_requirements.txt
4987
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
12 include development.ini
6790
8cea7986ed79 manifest: update file name list - for example, fix the path to the template.ini.mako config template
Mads Kiilerich <mads@kiilerich.com>
parents: 6555
diff changeset
13 include pytest.ini
8cea7986ed79 manifest: update file name list - for example, fix the path to the template.ini.mako config template
Mads Kiilerich <mads@kiilerich.com>
parents: 6555
diff changeset
14 include requirements.txt
8cea7986ed79 manifest: update file name list - for example, fix the path to the template.ini.mako config template
Mads Kiilerich <mads@kiilerich.com>
parents: 6555
diff changeset
15 include tox.ini
1078
2d7a94f3eaae added docs to manifest, updated setup script
Marcin Kuzminski <marcin@python-works.com>
parents: 1077
diff changeset
16 recursive-include docs *
1143
0e6035a85980 added changes made in production branch back into beta
Marcin Kuzminski <marcin@python-works.com>
parents: 1078
diff changeset
17 recursive-include init.d *
6017
7894a440e134 db: add Alembic "migration environment"
Søren Løvborg <sorenl@unity3d.com>
parents: 6015
diff changeset
18 recursive-include kallithea/alembic *
4987
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
19 include kallithea/bin/ldap_sync.conf
6790
8cea7986ed79 manifest: update file name list - for example, fix the path to the template.ini.mako config template
Mads Kiilerich <mads@kiilerich.com>
parents: 6555
diff changeset
20 include kallithea/lib/paster_commands/template.ini.mako
7459
19a9f02443c8 front-end: Introduce 'front-end' directory with source files for building the front-end
Mads Kiilerich <mads@kiilerich.com>
parents: 7458
diff changeset
21 recursive-include kallithea/front-end *
4987
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
22 recursive-include kallithea/i18n *
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
23 recursive-include kallithea/public *
4186
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 1512
diff changeset
24 recursive-include kallithea/templates *
4987
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
25 recursive-include kallithea/tests/fixtures *
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
26 recursive-include kallithea/tests/scripts *
6790
8cea7986ed79 manifest: update file name list - for example, fix the path to the template.ini.mako config template
Mads Kiilerich <mads@kiilerich.com>
parents: 6555
diff changeset
27 include kallithea/tests/models/test_dump_html_mails.ref.html
8cea7986ed79 manifest: update file name list - for example, fix the path to the template.ini.mako config template
Mads Kiilerich <mads@kiilerich.com>
parents: 6555
diff changeset
28 include kallithea/tests/performance/test_vcs.py
4987
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
29 include kallithea/tests/vcs/aconfig
6790
8cea7986ed79 manifest: update file name list - for example, fix the path to the template.ini.mako config template
Mads Kiilerich <mads@kiilerich.com>
parents: 6555
diff changeset
30 recursive-include scripts *