Sync python-apt 1.0.1 (main) from Debian unstable (main)

Bug #1501805 reported by Julian Andres Klode
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-apt (Ubuntu)
Fix Released
High
Barry Warsaw

Bug Description

Please sync python-apt 1.0.0 (main) from Debian unstable (main)

Explanation of the Ubuntu delta and why it can be dropped:
  * Cherrypick d1d4e0848c5c2963d8411470bcf15a0e8c3538af from git
    to resolve the testsuite failures with the new pep8 version.
-> Obviously uptream
  * debian/control: Drop apt build-depends to 1.0.9.10ubuntu6 to
    build in wily; can be dropped after apt >= 1.0.10 is merged.
->Upstream too
  * To properly conform to PEP 479 and Python 3.5, __iter__() methods
    should return when exhausted instead of raising StopIterator. This
    diff can be dropped when Debian bug #792606 is fixed released.
-> Upstream too

Furthermore, this is somewhat annoying, because the current
version in wily has an invalid (non-PEP440) upstream version
number, and uploading 1.0.0 will fix that. Otherwise, you get
setuptools to complain again, which we do not want.

That release also deprecates some code that will be dropped
in the next release, so it's kind of important to have that.

Changelog entries since current wily version 1.0.0~beta3.1ubuntu1:

python-apt (1.0.0) unstable; urgency=medium

  [ Julian Andres Klode ]
  * Fix pep8 1.6.2 issues
  * setup.py: Pass -std=c++11 and -Wno-write-strings to the compiler
  * Convert from SPtr and SPtrArray to unique_ptr and array
  * Replace pkgDistUpgrade and friend with APT::Upgrade::Upgrade
  * AcquireItem: Deprecate mode and introduce active_subprocess
  * APT 1.1: Fix a typo in a member access.
  * Deprecate IndexRecords
  * Document the new additions in 1.0
  * doc/source/conf.py: Do not set html_style, broken with recent sphinx
  * Revert the temporary build-deps on APT 1.0.10 and the new gcc,
    as they are not needed anymore.

  [ John R. Lenton ]
  * Discard stderr when calling system-image-cli (LP: #267935)

  [ Michael Schaller ]
  * apt.Cache: Add Cache._rawpkg_to_pkg method to consolidate duplicated code
  * apt.Version: Compare against package name and version (if available)
  * apt/package.py: Add target_versions method to [Base]Dependency
  * Add helpers/filters for installed packages/versions

 -- Julian Andres Klode <email address hidden> Sat, 12 Sep 2015 14:35:27 +0200

Revision history for this message
Barry Warsaw (barry) wrote :

I'll take a look at this. One question of the top. The changelog says this:

[ John R. Lenton ]
  * Discard stderr when calling system-image-cli (LP: #267935)

That's clearly not the right bug. Do you have more details and a correct bug # for that issue?

Changed in python-apt (Ubuntu):
assignee: nobody → Barry Warsaw (barry)
status: New → In Progress
importance: Undecided → High
Revision history for this message
Barry Warsaw (barry) wrote :

I ran the DEP-8 tests for the Debian version of the package in a Wily VM and got some failures related to the deprecation warnings. This would prevent promotion from wily-proposed. So either a `Restrictions: allow-stderr` should be added or you should add a -W argument to suppress the warnings.

Also I noticed that there aren't any DEP-8 tests for Python 3. Those should be added too.

Let me work up fixes for both those, and I'll apply them to an Ubuntu delta and propose a patch to Debian.

adt-run [14:16:10]: test run-tests: -----------------------]
adt-run [14:16:11]: test run-tests: - - - - - - - - - - results - - - - - - - - - -
run-tests FAIL stderr: /tmp/adt-run.wtCaQa/build.Hft/python-apt-1.0.0/tests/test_paths.py:114: DeprecationWarning: IndexRecords is deprecated and will be removed in 1.1
adt-run [14:16:11]: test run-tests: - - - - - - - - - - stderr - - - - - - - - - -
/tmp/adt-run.wtCaQa/build.Hft/python-apt-1.0.0/tests/test_paths.py:114: DeprecationWarning: IndexRecords is deprecated and will be removed in 1.1
  index = apt_pkg.IndexRecords()
/tmp/adt-run.wtCaQa/build.Hft/python-apt-1.0.0/tests/test_paths.py:114: DeprecationWarning: IndexRecords is deprecated and will be removed in 1.1
  index = apt_pkg.IndexRecords()
adt-run [14:16:12]: @@@@@@@@@@@@@@@@@@@@ summary
run-tests FAIL stderr: /tmp/adt-run.wtCaQa/build.Hft/python-apt-1.0.0/tests/test_paths.py:114: DeprecationWarning: IndexRecords is deprecated and will be removed in 1.1

Revision history for this message
Barry Warsaw (barry) wrote :

Oops, I mised utils/pyversions. That picks up python3.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Yeah, our build system is somewhat broken. It's from very early when Python 3 support was introduced and just hacked to make work with new changed.

I did not catch the stderr thing, as it is not shown by default in normal testing environments. I can adjust the tests to check the deprecation marking, instead of just printing it, that would make much more sense.

I requires a construct roughly like:

        with warnings.catch_warnings(record=True) as caught_warnings:
            warnings.simplefilter("always")
           ... <code raising warning> ...

        self.assertEqual(len(caught_warnings), 1)
        self.assertTrue(issubclass(caught_warnings[0].category,
                                   DeprecationWarning))

Revision history for this message
Barry Warsaw (barry) wrote :

Release team: in IRC, we agreed to wait until 1.0.1 is uploaded and then we can drop the ubuntu delta and just syncpackage 1.0.1. Julian's going to upload that now and I'll sync it as soon as LP picks up the new version.

summary: - Sync python-apt 1.0.0 (main) from Debian unstable (main)
+ Sync python-apt 1.0.1 (main) from Debian unstable (main)
Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in python-apt (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.