[Python-modules-team] Bug#939497: workaround

2021-06-01 Thread James Valleroy
Please note that freedombox has implemented a workaround for this issue. The 
workaround is to avoid use of Django 2.1 decorator:

https://salsa.debian.org/freedombox-team/freedombox/-/commit/591ed5c4ae5d4154b66fb3c59b5ff54bcf53839b

So while it would be nice to get the fix from upstream, it is not strictly 
required to avoid the issue.

Therefore I would propose that the severity can be lowered.

-- 
James



OpenPGP_signature
Description: OpenPGP digital signature
___
Python-modules-team mailing list
Python-modules-team@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team


[Python-modules-team] Bug#939497: AttributeError: 'method' object has no attribute 'STRONGHOLD_IS_PUBLIC'

2019-09-05 Thread James Valleroy
Package: python3-django-stronghold
Version: 0.3.0+debian-2
Severity: important
Tags: upstream

Dear Maintainer,

While running FreedomBox on Debian unstable (in vagrant box, and
development mode), I installed the JSXC app and opened it. I got the
following django error page:


AttributeError at /apps/jsxc/jsxc/

'method' object has no attribute 'STRONGHOLD_IS_PUBLIC'


Environment:


Request Method: GET
Request URL: https://localhost:4430/plinth/apps/jsxc/jsxc/

Django Version: 2.2.5
Python Version: 3.7.4
Installed Applications:
['axes',
 'captcha',
 'bootstrapform',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.messages',
 'stronghold',
 'plinth',
 'plinth.modules.minetest',
 'plinth.modules.searx',
 'plinth.modules.ejabberd',
 'plinth.modules.syncthing',
 'plinth.modules.openvpn',
 'plinth.modules.shadowsocks',
 'plinth.modules.monkeysphere',
 'plinth.modules.ttrss',
 'plinth.modules.transmission',
 'plinth.modules.mldonkey',
 'plinth.modules.help',
 'plinth.modules.radicale',
 'plinth.modules.api',
 'plinth.modules.mumble',
 'plinth.modules.mediawiki',
 'plinth.modules.cockpit',
 'plinth.modules.matrixsynapse',
 'plinth.modules.diagnostics',
 'plinth.modules.firewall',
 'plinth.modules.tor',
 'plinth.modules.avahi',
 'plinth.modules.power',
 'plinth.modules.i2p',
 'plinth.modules.quassel',
 'plinth.modules.users',
 'plinth.modules.apache',
 'plinth.modules.sso',
 'plinth.modules.ssh',
 'plinth.modules.sharing',
 'plinth.modules.upgrades',
 'plinth.modules.dynamicdns',
 'plinth.modules.backups',
 'plinth.modules.storage',
 'plinth.modules.tahoe',
 'plinth.modules.snapshot',
 'plinth.modules.roundcube',
 'plinth.modules.config',
 'plinth.modules.ikiwiki',
 'plinth.modules.deluge',
 'plinth.modules.networks',
 'plinth.modules.names',
 'plinth.modules.first_boot',
 'plinth.modules.infinoted',
 'plinth.modules.datetime',
 'plinth.modules.pagekite',
 'plinth.modules.privoxy',
 'plinth.modules.security',
 'plinth.modules.jsxc',
 'plinth.modules.bind',
 'plinth.modules.letsencrypt']
Installed Middleware:
('django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'stronghold.middleware.LoginRequiredMiddleware',
 'plinth.middleware.AdminRequiredMiddleware',
 'plinth.middleware.FirstSetupMiddleware',
 'plinth.modules.first_boot.middleware.FirstBootMiddleware',
 'plinth.middleware.SetupMiddleware')



Traceback:

File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py" in inner
  34. response = get_response(request)

File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in 
_get_response
  115. response = self.process_exception_by_middleware(e, 
request)

File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in 
_get_response
  113. response = wrapped_callback(request, *callback_args, 
**callback_kwargs)

File "/usr/lib/python3/dist-packages/django/views/generic/base.py" in view
  71. return self.dispatch(request, *args, **kwargs)

File "/usr/lib/python3/dist-packages/django/utils/decorators.py" in _wrapper
  44. bound_method = dec(bound_method)

File "/usr/lib/python3/dist-packages/stronghold/decorators.py" in public
  13. set_view_func_public(orig_func)

File "/usr/lib/python3/dist-packages/stronghold/utils.py" in 
set_view_func_public
  13. setattr(func, 'STRONGHOLD_IS_PUBLIC', True)

Exception Type: AttributeError at /apps/jsxc/jsxc/
Exception Value: 'method' object has no attribute 'STRONGHOLD_IS_PUBLIC'


Appears to be the same as the upstream issue for Django 2.1
compatibility, reported here:
https://github.com/mgrouchy/django-stronghold/issues/75


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-5-amd64 (SMP w/2 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-django-stronghold depends on:
ii  python3 3.7.3-1
ii  python3-django  2:2.2.5-1

python3-django-stronghold recommends no packages.

python3-django-stronghold suggests no packages.

-- no debconf information

___
Python-modules-team mailing list
Python-modules-team@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team

[Python-modules-team] Bug#898314: ITP: pytest-bdd -- BDD library for the py.test runner

2019-03-03 Thread James Valleroy
Hello Shubham,

pytest-bdd has already been packaged, and is currently in unstable [1].
But it has not been actively maintained. If you would like to help with
maintaining the package, I would recommend to join the python-modules
team [2] and contribute to the packaging repository [3].

Regards,
James

[1] https://tracker.debian.org/pkg/pytest-bdd
[2] https://wiki.debian.org/Teams/PythonModulesTeam
[3] https://salsa.debian.org/python-team/modules/pytest-bdd



signature.asc
Description: OpenPGP digital signature
___
Python-modules-team mailing list
Python-modules-team@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team

[Python-modules-team] Bug#912184: python-testfixtures FTBFS with python 3.7 as supported version

2018-11-28 Thread James Valleroy
tags 912184 + patch
thanks

This has been fixed in upstream repo (but not yet included in a release):
https://github.com/Simplistix/testfixtures/commit/6e8807543b804946aba58e2c9e92f5bdc3656a57

The attached patch is an adaptation of this change for the current
version in Debian. With this patch, I'm able to build the package again.

Updating the package to latest upstream release would be ideal. But this
also adds a new dependency (sybil) not yet packaged in Debian.
From 43aab9a4f6f8b435ad390346cca84a3536980227 Mon Sep 17 00:00:00 2001
From: James Valleroy 
Date: Tue, 27 Nov 2018 20:17:34 -0500
Subject: [PATCH] Add patch to deal with the comma vanishing from repr in 3.7

Based on https://github.com/Simplistix/testfixtures/commit/6e8807543b804946aba58e2c9e92f5bdc3656a57
---
 ...the-comma-vanishing-from-repr-in-3.7.patch | 320 ++
 debian/patches/series |   1 +
 2 files changed, 321 insertions(+)
 create mode 100644 debian/patches/0003-Deal-with-the-comma-vanishing-from-repr-in-3.7.patch

diff --git a/debian/patches/0003-Deal-with-the-comma-vanishing-from-repr-in-3.7.patch b/debian/patches/0003-Deal-with-the-comma-vanishing-from-repr-in-3.7.patch
new file mode 100644
index 000..9da3114
--- /dev/null
+++ b/debian/patches/0003-Deal-with-the-comma-vanishing-from-repr-in-3.7.patch
@@ -0,0 +1,320 @@
+From: James Valleroy 
+Date: Tue, 27 Nov 2018 20:18:49 -0500
+Subject: Deal with the comma vanishing from repr in 3.7
+
+Based on https://github.com/Simplistix/testfixtures/commit/6e8807543b804946aba58e2c9e92f5bdc3656a57
+---
+ docs/exceptions.txt |  2 +-
+ docs/logging.txt|  2 +-
+ docs/warnings.txt   |  6 +--
+ testfixtures/compat.py  |  5 +++
+ testfixtures/tests/test_compare.py  | 38 +--
+ testfixtures/tests/test_should_raise.py | 65 -
+ testfixtures/tests/test_shouldwarn.py   | 13 +--
+ 7 files changed, 92 insertions(+), 39 deletions(-)
+
+diff --git a/docs/exceptions.txt b/docs/exceptions.txt
+index 67d7e36..eeadc0b 100644
+--- a/docs/exceptions.txt
 b/docs/exceptions.txt
+@@ -38,7 +38,7 @@ causing the tests in which it occurs to fail:
+ ... the_thrower()
+ Traceback (most recent call last):
+ ...
+-AssertionError: ValueError('Not good!',) raised, ValueError('Is good!',) expected
++AssertionError: ValueError('Not good!'...) raised, ValueError('Is good!'...) expected
+ 
+ If you're not concerned about anything more than the type of the
+ exception that's raised, you can check as follows:
+diff --git a/docs/logging.txt b/docs/logging.txt
+index e5d064d..e52b4b8 100644
+--- a/docs/logging.txt
 b/docs/logging.txt
+@@ -227,7 +227,7 @@ A common case of this is where you want to check that exception
+ information was logged for certain messages:
+ 
+ >>> print(l.records[-1].exc_info)
+-(<... '...RuntimeError'>, RuntimeError('No code to run!',), )
++(<... '...RuntimeError'>, RuntimeError('No code to run!'...), )
+ 
+ If you're working in a unit test, the following code may be more
+ appropriate: 
+diff --git a/docs/warnings.txt b/docs/warnings.txt
+index 2642fa8..147b3b9 100644
+--- a/docs/warnings.txt
 b/docs/warnings.txt
+@@ -39,7 +39,7 @@ expected:
+   ]
+ 
+ actual:
+-[UserWarning("sorry dave, I can't let you do that",)]
++[UserWarning("sorry dave, I can't let you do that"...)]
+ 
+ You can check multiple warnings in a particular piece of code:
+ 
+@@ -61,7 +61,7 @@ them into a list as follows:
+ >>> len(captured)
+ 1
+ >>> captured[0].message
+-DeprecationWarning('foo',)
++DeprecationWarning('foo'...)
+ >>> captured[0].lineno
+ 42
+ 
+@@ -87,4 +87,4 @@ expected:
+ []
+ 
+ actual:
+-[UserWarning('woah dude',)]
++[UserWarning('woah dude'...)]
+diff --git a/testfixtures/compat.py b/testfixtures/compat.py
+index fe4a632..48805b0 100644
+--- a/testfixtures/compat.py
 b/testfixtures/compat.py
+@@ -1,6 +1,11 @@
+ # compatibility module for different python versions
+ import sys
+ 
++PY_VERSION = sys.version_info[:2]
++
++PY_37_PLUS = PY_VERSION >= (3, 7)
++
++
+ if sys.version_info[:2] > (3, 0):
+ 
+ PY2 = False
+diff --git a/testfixtures/tests/test_compare.py b/testfixtures/tests/test_compare.py
+index 8e390c7..f525a14 100644
+--- a/testfixtures/tests/test_compare.py
 b/testfixtures/tests/test_compare.py
+@@ -15,7 +15,8 @@ from testfixtures import (
+ )
+ from testfixtures.compat import (
+ class_type_name, exception_module, PY3, xrange,
+-BytesLiteral, UnicodeLiteral
++BytesLiteral, UnicodeLiteral,
++PY_37_PLUS
+ )
+ from testfixtures.comparison import compare_sequence
+ from unittest import TestCase
+@@ -152,10 +153,16 @@ class TestCompare(CompareHelper, TestCase):
+ def test_exception_different_object(self):
+ e1 = ValueError('some message')
+ e2 = ValueError('some message')
+-self.c

[Python-modules-team] Bug#902761: SyntaxError: Generator expression must be parenthesized with python3.7

2018-06-30 Thread James Valleroy
Package: python3-django
Version: 1:1.11.13-1
Severity: important
Tags: upstream

python3-django fails to configure when python3.7 is used.

I found this error when a CI build on Salsa failed:
https://salsa.debian.org/freedombox-team/plinth/-/jobs/28397

Setting up python3-django (1:1.11.13-1) ...
  File "/usr/lib/python3/dist-packages/django/contrib/admin/widgets.py", line 
152
'%s=%s' % (k, v) for k, v in params.items(),
^
SyntaxError: Generator expression must be parenthesized

dpkg: error processing package python3-django (--configure):
 installed python3-django package post-installation script subprocess returned 
error exit status 1


The error has been fixed in Django 2.1:
https://github.com/django/django/commit/931c60c5216bd71bc11f489e00e063331cf21f40

___
Python-modules-team mailing list
Python-modules-team@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team