Bug#905914: dput internal error about non-ascii chars in source package

2018-08-12 Thread Harald Dunkel
Here you go:

{harri@cecil:~ (master) 501} python3 -c 'import locale; 
print(locale.getpreferredencoding())'
ANSI_X3.4-1968

Shouldn't dput use UTF-8, no matter what? Its beyond my control, which encoding 
is
used in a foreign source package.


Regards
Harri



Bug#905914: dput internal error about non-ascii chars in source package

2018-08-12 Thread Ben Finney
Control: retitle -1 dput: UnicodeDecodeError when parsing upload changes file
Control: tags -1 + moreinfo

On Sat, 2018-08-11 17:32 +0200, Harald Dunkel  wrote:
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 315: 
> ordinal not in range(128)

I am not able to reproduce that behaviour, using the same upload changes file.

This may be a bug dependent on your terminal text encoding, or some other 
default text encoding detected in Python.

Can you please show the output from this Python 3 session in the same terminal 
session:

python3 -c 'import locale; print(locale.getpreferredencoding())'

On my workstation that command produces the single line "UTF-8". Using the same 
terminal where you ran 'dput', what does that command produce?

-- 
 \
  `\
_o__) Ben Finney 



Bug#905914: dput internal error about non-ascii chars in source package

2018-08-11 Thread Harald Dunkel
Package: dput
Version: 1.0.2

I downloaded Stéphane's lxc-template source package [1], built it for
sid and tried to dput it into my local repository. Result:

{harri@cecil:tmp () 508} dput sid lxc-templates_3.0.0-0ubuntu1_amd64.changes
Traceback (most recent call last):
  File "/usr/bin/dput", line 11, in 
load_entry_point('dput==1.0.2', 'console_scripts', 'execute-dput')()
  File "/usr/share/dput/dput/dput.py", line 1014, in main
config, check_only, check_version, unsigned_upload, debug)
  File "/usr/share/dput/dput/dput.py", line 344, in verify_files
changes = parse_changes(chg_fd)
  File "/usr/share/dput/dput/dput.py", line 69, in parse_changes
check = chg_fd.read(5)
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 315: 
ordinal not in range(128)


According to #876671 this is not supposed to happen.


Regards
Harri

[1] 
http://archive.ubuntu.com/ubuntu/pool/universe/l/lxc-templates/lxc-templates_3.0.0-0ubuntu1.dsc

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Format: 1.8
Date: Mon, 26 Mar 2018 23:45:00 -0400
Source: lxc-templates
Binary: lxc-templates
Architecture: source amd64
Version: 3.0.0-0ubuntu1
Distribution: bionic
Urgency: medium
Maintainer: Ubuntu Developers 
Changed-By: Stéphane Graber 
Description:
 lxc-templates - Linux Containers userspace tools (templates)
Changes:
 lxc-templates (3.0.0-0ubuntu1) bionic; urgency=medium
 .
   * New upstream release
 - lxc-templates is now its own project.
 - Announcement: https://linuxcontainers.org/lxc/news/
Checksums-Sha1:
 b6e9955c8cca3c906a495dbea1450c36b9666d3f 1739 lxc-templates_3.0.0-0ubuntu1.dsc
 53d00206b58921aeddb2a1612ac3294b3a66cc97 255781 lxc-templates_3.0.0.orig.tar.gz
 a181f3331abd4fdf3a61c9909aaad9300defd372 833 
lxc-templates_3.0.0.orig.tar.gz.asc
 102e0b16afa6e9acfe6309337335e393935696a7 56536 
lxc-templates_3.0.0-0ubuntu1.debian.tar.xz
 fad68e72eaf11d51398111b532e46ffc3a0ded4d 5350 
lxc-templates_3.0.0-0ubuntu1_amd64.buildinfo
 e3fbefc990c2c6527819b5c6c432da97722be56d 82712 
lxc-templates_3.0.0-0ubuntu1_amd64.deb
Checksums-Sha256:
 1e3328929e7d41b71b2a26648e946d1549b86beb5eeb1a082422f61609638911 1739 
lxc-templates_3.0.0-0ubuntu1.dsc
 e22b5d602d080ef4e7746a8d8cc3e445ab080c1d2a28a5c570a07a5b493188fd 255781 
lxc-templates_3.0.0.orig.tar.gz
 909e666141097473417bb0a2594a2b890a39a1f0cb2d6b87349a4a75f885be7c 833 
lxc-templates_3.0.0.orig.tar.gz.asc
 0b34acfbcd28a842dac4d9778c20e8571106a44895dbe274b637169477dd 56536 
lxc-templates_3.0.0-0ubuntu1.debian.tar.xz
 1d4f3144bee384dfcad16e17c634ff868a344a718668529bb8bd124fc0eb19d9 5350 
lxc-templates_3.0.0-0ubuntu1_amd64.buildinfo
 411ee188f39c9e02c84ac18b7d5cf144d226939f997392afb7afd68baa826446 82712 
lxc-templates_3.0.0-0ubuntu1_amd64.deb
Files:
 6406b1501dcfa987e370d06a528d1a6c 1739 admin optional 
lxc-templates_3.0.0-0ubuntu1.dsc
 0336196415de03c3264315feac5917bc 255781 admin optional 
lxc-templates_3.0.0.orig.tar.gz
 724e3800ccd10a6948e7feb575dc42e3 833 admin optional 
lxc-templates_3.0.0.orig.tar.gz.asc
 dd1b3f0e8db9be287b3e962869033f5c 56536 admin optional 
lxc-templates_3.0.0-0ubuntu1.debian.tar.xz
 901f17887edc8b0009f634882bb0b213 5350 admin optional 
lxc-templates_3.0.0-0ubuntu1_amd64.buildinfo
 63bf826d9f947683530662d803ae4822 82712 admin optional 
lxc-templates_3.0.0-0ubuntu1_amd64.deb

-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEEH2V614LbR/u1O+a1Cp4qnmbTgcsFAltu9rsACgkQCp4qnmbT
gcuiTgf/b6XoSNQYbCg8PYQLCxTb2dT/BlRK//kN1XwLblXV0LhxBurH/wJEBpbH
eyEeVoikXT6ZjjwUt2X040z2RQJoaMU3BwZCTvMGSV9IXJOH2AtFIHmpXW8/Ley7
7SNbHw2Yg4y4dLAewqGYq+e46dHqffDOEX1YuKEeMwv9bxTfJU7m/P/MZ2tNqppi
p0+8zeWDLHm2qK3Vjov4H54Q76YKtZUn5CV6QLvOCspJgqZK2MXkb69QuVsvEKcS
2ZFdQKkOY54lOsggmeuLXoUy8ihe5Bhzr/1y2A/N+Z2K+ThAmVF+LOxvnYahbQME
Q9FvntwXSqyqJBuH+/qERoHwpIFOZw==
=DQS7
-END PGP SIGNATURE-