Bug#966643: python3-jsonschema unnecessarily depends on python3-importlib-metadata

2020-07-31 Thread Anthony Sottile
Package: python3-jsonschema
Version: 3.2.0-3

For python3.8 and above, jsonschema should use `importlib.metadata`
from the standard library

You can see the conditional dependency listed in jsonschema's
setuptools metadata here:
https://github.com/Julian/jsonschema/blob/7a2cc2faf04a1182d3901bd907e87a746671f879/setup.cfg#L32

Anthony



Bug#956144: virtualenv: caching of debian wheels breaks pip-installed virtualenv

2020-04-07 Thread Anthony Sottile
I failed to include the error message in the report, sorry was a little
rushed

here's the output of the last command:

```
root@378c3ad9bbf3:/# venv2/bin/pip install astpretty
Traceback (most recent call last):
  File "venv2/bin/pip", line 5, in 
from pip._internal.cli.main import main
  File "/venv2/lib/python3.8/site-packages/pip/_internal/cli/main.py", line
10, in 
from pip._internal.cli.autocompletion import autocomplete
  File
"/venv2/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py",
line 9, in 
from pip._internal.cli.main_parser import create_main_parser
  File
"/venv2/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line
7, in 
from pip._internal.cli import cmdoptions
  File
"/venv2/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line
24, in 
from pip._internal.exceptions import CommandError
  File "/venv2/lib/python3.8/site-packages/pip/_internal/exceptions.py",
line 10, in 
from pip._vendor.six import iteritems
ModuleNotFoundError: No module named 'pip._vendor.six'
```

On Tue, Apr 7, 2020 at 12:51 PM Anthony Sottile 
wrote:

> Package: virtualenv
> Version: 20.0.16-1
> Severity: normal
> Tags: patch
>
> Reproduction:
>
> ```bash
> apt update && apt install -y --no-install-recommends virtualenv
> virtualenv venv
> venv/bin/pip install virtualenv
> venv/bin/virtualenv venv2
> venv2/bin/pip install astpretty
> ```
>
> This was originally reported here:
> https://github.com/pre-commit/pre-commit/issues/1383
>
> The root cause is virtualenv's appdata cache is poisoned by the debian
> patched
> wheels which results in all invocations by unpatched virtualenv failing by
> using debian's cache.  My proposal is to separate debian's cache from the
> normal name to prevent this collision.  Here's a patch to the installed
> code
> which fixes this issue:
>
> ```diff
> ---
> /usr/lib/python3/dist-packages/virtualenv/seed/via_app_data/via_app_data.py.old
>2020-04-07 19:41:09.613187290 +
> +++
> /usr/lib/python3/dist-packages/virtualenv/seed/via_app_data/via_app_data.py2020-04-07
> 19:41:17.601187290 +
> @@ -18,7 +18,7 @@
>  def __init__(self, options):
>  super(FromAppData, self).__init__(options)
>  self.symlinks = options.symlink_app_data
> -self.base_cache = self.app_data / "seed-app-data" / "v1.0.1"
> +self.base_cache = self.app_data / "seed-app-data" /
> "v1.0.1.debian"
>
>  @classmethod
>  def add_parser_arguments(cls, parser, interpreter, app_data):
> ```
>
>
> -- System Information:
> Debian Release: bullseye/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 4.15.0-91-generic (SMP w/2 CPU cores)
> Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
> Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C
> (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: unable to detect
>
> Versions of packages virtualenv depends on:
> ii  python3-virtualenv  20.0.16-1
>
> virtualenv recommends no packages.
>
> virtualenv suggests no packages.
>
> -- no debconf information
>


Bug#956144: virtualenv: caching of debian wheels breaks pip-installed virtualenv

2020-04-07 Thread Anthony Sottile
Package: virtualenv
Version: 20.0.16-1
Severity: normal
Tags: patch

Reproduction:

```bash
apt update && apt install -y --no-install-recommends virtualenv
virtualenv venv
venv/bin/pip install virtualenv
venv/bin/virtualenv venv2
venv2/bin/pip install astpretty
```

This was originally reported here: 
https://github.com/pre-commit/pre-commit/issues/1383

The root cause is virtualenv's appdata cache is poisoned by the debian patched
wheels which results in all invocations by unpatched virtualenv failing by
using debian's cache.  My proposal is to separate debian's cache from the
normal name to prevent this collision.  Here's a patch to the installed code
which fixes this issue:

```diff
--- 
/usr/lib/python3/dist-packages/virtualenv/seed/via_app_data/via_app_data.py.old 
2020-04-07 19:41:09.613187290 +
+++ 
/usr/lib/python3/dist-packages/virtualenv/seed/via_app_data/via_app_data.py2020-04-07
 19:41:17.601187290 +
@@ -18,7 +18,7 @@
 def __init__(self, options):
 super(FromAppData, self).__init__(options)
 self.symlinks = options.symlink_app_data
-self.base_cache = self.app_data / "seed-app-data" / "v1.0.1"
+self.base_cache = self.app_data / "seed-app-data" / "v1.0.1.debian"
 
 @classmethod
 def add_parser_arguments(cls, parser, interpreter, app_data):
```


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

Kernel: Linux 4.15.0-91-generic (SMP w/2 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages virtualenv depends on:
ii  python3-virtualenv  20.0.16-1

virtualenv recommends no packages.

virtualenv suggests no packages.

-- no debconf information