Debian Bug report logs - #697721
python-django-registration: FTBFS with python3-sphinx: AttributeError: 'str' object has no attribute '__dict__'

version graph

Package: src:python-django-registration; Maintainer for src:python-django-registration is Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>;

Reported by: Jakub Wilk <jwilk@debian.org>

Date: Tue, 8 Jan 2013 21:27:04 UTC

Severity: serious

Tags: patch

Found in version python-django-registration/0.8-1

Fixed in version python-django-registration/0.8-2

Done: Raphaël Hertzog <hertzog@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, jwilk@debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#697721; Package src:python-django-registration. (Tue, 08 Jan 2013 21:27:07 GMT) Full text and rfc822 format available.

Message #3 received at submit@bugs.debian.org (full text, mbox):

From: Jakub Wilk <jwilk@debian.org>
To: submit@bugs.debian.org
Subject: python-django-registration: FTBFS with python3-sphinx: AttributeError: 'str' object has no attribute '__dict__'
Date: Tue, 8 Jan 2013 22:23:04 +0100
[Message part 1 (text/plain, inline)]
Source: python-django-registration
Version: 0.8-1
Severity: serious
Justification: fails to build from source

If python3-sphinx is installed, but python-sphinx is not, 
python-django-registration FTBFS:
| cd docs && /usr/bin/make html
| make[2]: Entering directory `/build/python-django-registration-105ATe/python-django-registration-0.8/docs'
| sphinx-build -b html -d _build/doctrees   . _build/html
| Running Sphinx v1.1.3
| loading pickled environment... done
| building [html]: targets for 11 source files that are out of date
| updating environment: 0 added, 0 changed, 0 removed
| looking for now-outdated files... none found
| preparing documents... done
| writing output... [  9%] backend-api
| Making output directory...
|
| Exception occurred:
|   File "/usr/lib/python3/dist-packages/sphinx/cmdline.py", line 189, in main
|     app.build(force_all, filenames)
|   File "/usr/lib/python3/dist-packages/sphinx/application.py", line 204, in build
|     self.builder.build_update()
|   File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 196, in build_update
|     'out of date' % len(to_build))
|   File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 252, in build
|     self.write(docnames, list(updated_docnames), method)
|   File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 291, in write
|     doctree = self.env.get_and_resolve_doctree(docname, self)
|   File "/usr/lib/python3/dist-packages/sphinx/environment.py", line 1230, in get_and_resolve_doctree
|     doctree = self.get_doctree(docname)
|   File "/usr/lib/python3/dist-packages/sphinx/environment.py", line 1215, in get_doctree
|     doctree = pickle.load(f)
| AttributeError: 'str' object has no attribute '__dict__'

This happens because the source package includes doctree pickles (in 
which parsed rST sources are cached) were generated by Python 2.X, and 
cannot be loaded by Python 3.X.  Please ask upstream to exclude the 
doctrees/ subdirectory from their tarballs.  Meanwhile please use the 
attached patch as a work-around.

-- 
Jakub Wilk
[python-django-registration-rm-doctrees.diff (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#697721; Package src:python-django-registration. (Wed, 09 Jan 2013 18:33:03 GMT) Full text and rfc822 format available.

Message #6 received at 697721@bugs.debian.org (full text, mbox):

From: Jakub Wilk <jwilk@debian.org>
To: 697721@bugs.debian.org
Subject: Re: Bug#697721: python-django-registration: FTBFS with python3-sphinx: AttributeError: 'str' object has no attribute '__dict__'
Date: Wed, 9 Jan 2013 19:29:50 +0100
* Jakub Wilk <jwilk@debian.org>, 2013-01-08, 22:23:
>|   File "/usr/lib/python3/dist-packages/sphinx/environment.py", line 1215, in get_doctree
>|     doctree = pickle.load(f)
>| AttributeError: 'str' object has no attribute '__dict__'
>
>This happens because the source package includes doctree pickles (in 
>which parsed rST sources are cached) were generated by Python 2.X, 
>and cannot be loaded by Python 3.X.

I also reported this to Sphinx upstream:
https://bitbucket.org/birkenfeld/sphinx/issue/1070

I _could_ backport the Sphinx fix for wheezy if really needed, but I 
would prefer not to.

-- 
Jakub Wilk



Added tag(s) patch. Request was from Jakub Wilk <jwilk@debian.org> to control@bugs.debian.org. (Wed, 09 Jan 2013 20:21:02 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#697721; Package src:python-django-registration. (Thu, 10 Jan 2013 08:45:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Thu, 10 Jan 2013 08:45:05 GMT) Full text and rfc822 format available.

Message #13 received at 697721@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: Jakub Wilk <jwilk@debian.org>, 697721@bugs.debian.org
Subject: Re: Bug#697721: python-django-registration: FTBFS with python3-sphinx: AttributeError: 'str' object has no attribute '__dict__'
Date: Thu, 10 Jan 2013 09:43:43 +0100
On Tue, 08 Jan 2013, Jakub Wilk wrote:
> This happens because the source package includes doctree pickles (in
> which parsed rST sources are cached) were generated by Python 2.X,
> and cannot be loaded by Python 3.X.  Please ask upstream to exclude
> the doctrees/ subdirectory from their tarballs.  Meanwhile please
> use the attached patch as a work-around.

So if I understand correctly the python-sphinx upstream bug entry, I don't
have to ask upstream to remove the doctrees, sphinx will detect alone that
it's not compatible.

Now a question about your patch:

>  override_dh_auto_clean:
> -	rm -rf docs/_build/html
> +	rm -rf docs/_build/
>  	dh_auto_clean
>  
>  override_dh_auto_build:
>  	cd registration && /usr/bin/django-admin compilemessages
> +	rm -rf docs/_build/doctrees/
>  	cd docs && $(MAKE) html
>  	dh_auto_build

Why do you have to remove docs/_build/doctrees/ again in
override_dh_auto_build ? any dpkg-buildpackage call starts with
"debian/rules clean" and thus docs/_build will already have been
removed...

What am I missing ?

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Get the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#697721; Package src:python-django-registration. (Thu, 10 Jan 2013 12:09:03 GMT) Full text and rfc822 format available.

Message #16 received at 697721@bugs.debian.org (full text, mbox):

From: Jakub Wilk <jwilk@debian.org>
To: 697721@bugs.debian.org
Subject: Re: Bug#697721: python-django-registration: FTBFS with python3-sphinx: AttributeError: 'str' object has no attribute '__dict__'
Date: Thu, 10 Jan 2013 13:04:50 +0100
* Raphael Hertzog <hertzog@debian.org>, 2013-01-10, 09:43:
>>This happens because the source package includes doctree pickles (in 
>>which parsed rST sources are cached) were generated by Python 2.X, and 
>>cannot be loaded by Python 3.X.  Please ask upstream to exclude the 
>>doctrees/ subdirectory from their tarballs.  Meanwhile please use the 
>>attached patch as a work-around.
>So if I understand correctly the python-sphinx upstream bug entry, I 
>don't have to ask upstream to remove the doctrees, sphinx will detect 
>alone that it's not compatible.

It's still a bad idea for upstream to include them in the tarball:
- They take significant amount of space.
- They leak information about upstream's home directory layout; try this 
for example: 
$ strings docs/_build/doctrees/*.doctree | grep ^/User

Maybe more importantly, they are bad for us, because they are 
unauditable. Quoting <http://docs.python.org/2/library/pickle.html>:
"The pickle module is not intended to be secure against erroneous or 
maliciously constructed data. Never unpickle data received from an 
untrusted or unauthenticated source."

Anyway, I made this pull request:
https://bitbucket.org/ubernostrum/django-registration/pull-request/34

>Now a question about your patch:
>
>>  override_dh_auto_clean:
>> -	rm -rf docs/_build/html
>> +	rm -rf docs/_build/
>>  	dh_auto_clean
>>
>>  override_dh_auto_build:
>>  	cd registration && /usr/bin/django-admin compilemessages
>> +	rm -rf docs/_build/doctrees/
>>  	cd docs && $(MAKE) html
>>  	dh_auto_build
>
>Why do you have to remove docs/_build/doctrees/ again in 
>override_dh_auto_build ? any dpkg-buildpackage call starts with 
>"debian/rules clean" and thus docs/_build will already have been 
>removed...

I don't believe one can assume that clean is always run before build. 
dpkg-buildpackage does that, because it has no way of knowing whether 
the package is in a clean state or not. But IMO the following is also a 
legitimate way to build a package:

$ dpkg-source -x foo_*.dsc
$ cd foo-*/
$ debian/rules build
$ fakeroot debian/rules binary

-- 
Jakub Wilk



Added tag(s) pending. Request was from hertzog@users.alioth.debian.org to control@bugs.debian.org. (Fri, 11 Jan 2013 07:45:06 GMT) Full text and rfc822 format available.

Reply sent to Raphaël Hertzog <hertzog@debian.org>:
You have taken responsibility. (Fri, 11 Jan 2013 07:51:03 GMT) Full text and rfc822 format available.

Notification sent to Jakub Wilk <jwilk@debian.org>:
Bug acknowledged by developer. (Fri, 11 Jan 2013 07:51:03 GMT) Full text and rfc822 format available.

Message #23 received at 697721-close@bugs.debian.org (full text, mbox):

From: Raphaël Hertzog <hertzog@debian.org>
To: 697721-close@bugs.debian.org
Subject: Bug#697721: fixed in python-django-registration 0.8-2
Date: Fri, 11 Jan 2013 07:47:30 +0000
Source: python-django-registration
Source-Version: 0.8-2

We believe that the bug you reported is fixed in the latest version of
python-django-registration, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 697721@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Raphaël Hertzog <hertzog@debian.org> (supplier of updated python-django-registration package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 10 Jan 2013 09:44:11 +0100
Source: python-django-registration
Binary: python-django-registration
Architecture: source all
Version: 0.8-2
Distribution: unstable
Urgency: low
Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Changed-By: Raphaël Hertzog <hertzog@debian.org>
Description: 
 python-django-registration - User-registration application for Django
Closes: 697721
Changes: 
 python-django-registration (0.8-2) unstable; urgency=low
 .
   * Drop docs/_build entirely on clean so that we don't keep around
     docs/_build/doctrees which might not work with python3-sphinx.
     Closes: #697721
Checksums-Sha1: 
 eb2c8ae18bda9f92482ca427f083adf48373c1c4 2382 python-django-registration_0.8-2.dsc
 4831e93ad01781c33968a9b9063968b46840d4dc 4967 python-django-registration_0.8-2.debian.tar.gz
 cf74a5a1127051e25c1532929e7b6140e335e595 111882 python-django-registration_0.8-2_all.deb
Checksums-Sha256: 
 f09c8b31d429d9641822a4b4260ac1f9121328090f01c773436669634d2d77d4 2382 python-django-registration_0.8-2.dsc
 7afb935e1e4160de8046a532b09a5e07370ccd2cf189841b22728c25cf20eb40 4967 python-django-registration_0.8-2.debian.tar.gz
 8b43f9b70ebe6fa259570538e3d3f33702102c2c83d2eada4a2b744789217dde 111882 python-django-registration_0.8-2_all.deb
Files: 
 f42df587c1a725d3184333700e5b4d1c 2382 python optional python-django-registration_0.8-2.dsc
 f79fbcbd223d82c6c5bafc440aeb37f6 4967 python optional python-django-registration_0.8-2.debian.tar.gz
 1bb280fc6c29c7393047230f1b0633b4 111882 python optional python-django-registration_0.8-2_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Signed by Raphael Hertzog

iQIcBAEBCAAGBQJQ78MfAAoJEOYZBF3yrHKajloP/3MSs8uIr9MYibnHyeJDe1D6
FNKCR+17HLALaM5iVZGLgQPMYrSXyNYG525S3ZiD7j1mm+cIOdrRc6HNiaVXcgTG
Tuvq27OERVlaw/EvPBRbTqi50ksrEr2kP4oy5qNI5I0SGijDkM8LunKcYj3TD7IQ
uWeks2ul8N8ByoA1yo18rrwux+/45VX06N3u6SA81nE3oBTQHjJVhHq0AYZbthLc
gVT9z+Lkl9I4plLOAEA9BDXEEorEsGs3luF4VBLrMbjbVh+L6aIoDWw8dqA6ulks
7NFQKtqaWDKemB9ZBH6J+W6vf84Zdq+vaG77sMgriZ9iGXyr9q/nTjCOxnZTV5tD
nHy9B4+plY7StWHWW2Ze+zc3MkmEI17QX1AStDU4umNgWRIGol5s3cjIFgzlBKdC
1kqBGxnQIWokbHUFYFcNfb8ZycuWYsHyzWS3XwVhukxveMrk7vzf1GTSAw85Mnxq
/byEu84pwO2LjSPoSGvOMSzXQcFbtnxKUuvU56QDxohAGaphIkjzIs1iOH+hYsW8
2vwWbYYTvAC1/BWkfBZHOqcQD5iye4lgaMb2vRZ77mjPp5VUGx4EMjKG0trBIbE0
yuMGIE9zG6TCcHrttc9JWV+GfA7uS1mUmOTuVJ+4XccbYYVaxA7prW+qLUG71cHd
/+tdlLKmyHjsiV9YU6G7
=6EFo
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 09 Feb 2013 07:26:12 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 06:09:07 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.