Merge lp:~ev/apt-clone/python3 into lp:apt-clone
Proposed by
Evan
on 2012-06-11
| Status: | Merged |
|---|---|
| Merged at revision: | 100 |
| Proposed branch: | lp:~ev/apt-clone/python3 |
| Merge into: | lp:apt-clone |
| Diff against target: |
485 lines (+119/-83) 8 files modified
apt-clone (+10/-8) apt_clone.py (+46/-40) debian/changelog (+18/-1) tests/Makefile (+3/-1) tests/test_clone.py (+19/-11) tests/test_clone_upgrade.py (+15/-16) tests/test_in_chroot.py (+5/-3) tests/test_merge_sources.py (+3/-3) |
| To merge this branch: | bzr merge lp:~ev/apt-clone/python3 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Colin Watson | 2012-06-11 | Approve on 2012-06-12 | |
|
Review via email:
|
|||
Description of the Change
Port to Python3.
To post a comment you must log in.
lp:~ev/apt-clone/python3
updated
on 2012-06-11
- 109. By Evan on 2012-06-11
-
* Finish port to Python 3:
- Handle unicode changes.
- Do not leak file descriptors.
- Test against both Python2.7 and Python3.
- Do not use the deprecated failUnless.
- Use the io module instead of StringIO.
- Fix a failing test caused by acpi-support being in main. - 110. By Evan on 2012-06-11
-
Actually use python3 :)
lp:~ev/apt-clone/python3
updated
on 2012-06-12
| Colin Watson (cjwatson) wrote : | # |
Thanks, looks good to me now. I think this is Michael's upstream branch so he may want to flip the version back to 0.2.3 for upload to Debian.
review:
Approve

> === modified file 'apt_clone.py' TarInfo( "./var/ lib/apt- clone/installed .pkgs") tarinfo, StringIO(s)) tarinfo, BytesIO(s))
> --- apt_clone.py 2012-01-27 17:14:05 +0000
> +++ apt_clone.py 2012-06-11 15:50:47 +0000
> @@ -182,7 +184,8 @@
> tarinfo = tarfile.
> tarinfo.size = len(s)
> tarinfo.mtime = time.time()
> - tar.addfile(
> + s = s.encode('utf-8')
> + tar.addfile(
tarinfo.size will be wrong if s isn't entirely ASCII. I think you need
to encode earlier.
> - #print tar.getnames() getnames( ))
> + print(tar.
Did you mean to uncomment this?
> === modified file 'debian/changelog'
> --- debian/changelog 2012-01-27 16:54:20 +0000
> +++ debian/changelog 2012-06-11 15:50:47 +0000
> @@ -8,6 +8,16 @@
>
> -- Michael Vogt <email address hidden> Fri, 27 Jan 2012 16:29:17 +0100
>
> +apt-clone (0.2.2ubuntu1) UNRELEASED; urgency=low
> +
> + * Port to Python 3:
> + - Use Python 3-style print functions.
> + - Use "raise Exception(value)" syntax rather than the old-style "raise
> + Exception, value".
> + - Use dict.items() rather than dict.iteritems().
> +
> + -- Colin Watson <email address hidden> Mon, 11 Jun 2012 09:12:14 +0100
> +
> apt-clone (0.2.2) unstable; urgency=low
>
> * fix extraction of no-longer downloadable debs, thanks
>
This might need updating :-)
The rest looks good to me.
review needs-fixing