Bug#970901: black: cannot run, "ModuleNotFoundError: No module named '_black_version'"

2020-10-06 Thread Nicholas D Steeves
Control: block 971214 by -1

While investigating 971214 in an i386 chroot I encountered this bug,
thus at this point my hypothesis is that 970901 is causing Elpy's
callback to error.

'hope to see it fixed soon!
Thank you,
Nicholas


signature.asc
Description: PGP signature


Processed: Re: Bug#970901: black: cannot run, "ModuleNotFoundError: No module named '_black_version'"

2020-10-06 Thread Debian Bug Tracking System
Processing control commands:

> block 971214 by -1
Bug #971214 [src:elpy] elpy: FTBFS: tests failed
971214 was not blocked by any bugs.
971214 was not blocking any bugs.
Added blocking bug(s) of 971214: 970901, 971131, and 971137

-- 
970901: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970901
971214: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=971214
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#970901: black: cannot run, "ModuleNotFoundError: No module named '_black_version'"

2020-09-26 Thread Chris Lamb
tags 970901 + patch
thanks

Hi,

> black: cannot run, "ModuleNotFoundError: No module named '_black_version'"

The following patch works for me, but there is likely a cleaner
solution; seems like the Black package maintainers are doing special
things with the version handling and I am missing some nuance.

  --- a/debian/rules
  +++ b/debian/rules
  @@ -16,6 +16,8 @@ export VERSION=$(shell dpkg-parsechangelog -S Version|cut 
-d- -f1)

   %:
  echo "version = '$(VERSION)'" > _black_version.py
  +   mkdir -p src
  +   cp _black_version.py src/
  dh $@ --with sphinxdoc,python3 --buildsystem=pybuild

   override_dh_auto_build:


Regards,

--
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-diff --git a/debian/rules b/debian/rules
index 09908f4..1a70969 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,6 +16,8 @@ export VERSION=$(shell dpkg-parsechangelog -S Version|cut -d- 
-f1)
 
 %:
echo "version = '$(VERSION)'" > _black_version.py
+   mkdir -p src
+   cp _black_version.py src/
dh $@ --with sphinxdoc,python3 --buildsystem=pybuild
 
 override_dh_auto_build:


Bug#970901: black: cannot run, "ModuleNotFoundError: No module named '_black_version'"

2020-09-25 Thread Nicolas Noirbent
Package: black
Version: 20.8b1-1
Severity: grave
Justification: renders package unusable

Dear Maintainer,

The new black package version 20.8b1-1 seems to be missing some files:

% black
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/black/__init__.py", line 63, in 
from black._black_version import version as __version__
ModuleNotFoundError: No module named 'black._black_version'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/black", line 33, in 
sys.exit(load_entry_point('black==20.8b1', 'console_scripts', 'black')())
  File "/usr/bin/black", line 25, in importlib_load_entry_point
return next(matches).load()
  File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1014, in _gcd_import
  File "", line 991, in _find_and_load
  File "", line 975, in _find_and_load_unlocked
  File "", line 671, in _load_unlocked
  File "", line 783, in exec_module
  File "", line 219, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/black/__init__.py", line 65, in 
from _black_version import version as __version__
ModuleNotFoundError: No module named '_black_version'

Looking at the source, _black_version.py appears to be generated by the 
setup.py:
https://github.com/psf/black/blob/master/setup.py#L50-L53

Regards,


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.8.0-2-amd64 (SMP w/8 CPU threads)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=en_US
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages black depends on:
ii  python33.8.2-3
ii  python3-appdirs1.4.4-1
ii  python3-click  7.1.2-1
ii  python3-mypy-extensions0.4.3-1
ii  python3-pathspec   0.8.0-1
ii  python3-pkg-resources  49.3.1-2
ii  python3-regex  0.1.20200714-1
ii  python3-toml   0.10.1-1
ii  python3-typed-ast  1.4.1-1+b1
ii  python3-typing-extensions  3.7.4.2-1

black recommends no packages.

Versions of packages black suggests:
pn  python-black-doc  

-- no debconf information