[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#481061: [RFC PATCH] Re: Bug#481061: python-apt: Rename API methods to conform with PEP 8



On Thu, Jun 04, 2009 at 08:50:22PM +1000, Ben Finney wrote:
> On 03-Jun-2009, Julian Andres Klode wrote:
> > The jak branch follows PEP 8 naming conventions in almost all places
> > now. Not finished yet are apt_pkg.Version, apt_pkg.PackageFile,
> > apt_pkg.MetaIndex and apt.progress.*.
> 
> Thank you for this request for review.
> 
> The ‘tests/’ directory has many unit test modules, but many of them
> seem to be using old names. Should they not be updated also in line
> with these new names so they continue to work?
They should continue to work with the old names, as long as a build
with compatibility mode is used (extension build with -DCOMPAT_0_7).

They should be updated, but this is not a priority at the moment.
> 
> Also, in attempting to view the docstrings, I'm finding some of the
> modules fail to import. for example:
> 
> =====
> >>> import apt
[...]
> AttributeError: 'module' object has no attribute '_COMPAT_0_7'
> =====
You have to compile apt_pkg. You can build it with compatibility using:
	python setup.py build_ext --inplace -DCOMPAT_0_7
If you don't want compatibility (apt_pkg._COMPAT_0_7 == 0), use:
	python setup.py build_ext --inplace

You can also build a package, which may be more useful, as it allows
you to test the py3k builds as well (all packages are converted using
2to3 at build time).

> 
> In the absence of working tests or even working imports, it's
> difficult to assess this branch.
I have updated the branch to fix all problems in the extension and the
packages and updated documentation and examples in doc/source/examples
as well. Tests are coming later.

You can fetch the latest build, 0.7.91~r249 ('jak' branch, rev. 249),
which I am running without any problems on my machine in source form and
binaries for amd64 from my (unsigned) repository:

  deb http://people.debian.org/~jak/debian/ experimental/
  deb-src http://people.debian.org/~jak/debian/ experimental/

This may be the easiest way to test it out. The package is built for
versions 2.4, 2.5 and 3.1 of Python. The modules built for Python 3.1
provide no compatibility functions, whereas the 2.X ones do.

-- 
Julian Andres Klode  - Free Software Developer
   Debian Developer  - Contributing Member of SPI
   Ubuntu Member     - Fellow of FSFE

Website: http://jak-linux.org/   XMPP: juliank@jabber.org
Debian:  http://www.debian.org/  SPI:  http://www.spi-inc.org/
Ubuntu:  http://www.ubuntu.com/  FSFE: http://www.fsfe.org/

Attachment: signature.asc
Description: Digital signature


Reply to: