| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Unify all names to follow these rules:
1. Replace the first [A-Z] with the lowercase version [a-z]
2. Replace multiple [A-Z] with [A-Z][a-z] (one upper, remaining ones lowercase)
3. Replace all remaining [A-Z] with _[a-z]
This brings us from 'FileName' to 'file_name' and from 'DescURI' to 'desc_uri'. We
will at a later stage add some exceptions to this rule, like 'filename' instead of
'file_name', to improve readability.
|
|
descriptors.
|
|
|
|
|
|
Version,PackageFile,MetaIndex).
On our way to close Bug#481061, this converts almost all names to PEP 8 naming
conventions. Missing are now apt_pkg.Version, apt_pkg.PackageFile, apt_pkg.MetaIndex
and apt.progress.*.
In case of the missing apt_pkg classes, they are not converted yet because they
do not use getset descriptors yet.
apt.progress.* has not been converted yet because the extension interacts with it,
and we first need to modify the extension to recognize the new names, as well as
the old names (old applications shouldn't break).
|
|
system (Closes: #525134)
|
|
Introduce PY3K_VERSIONS, a list of all py3k versions the package should
be built for. The default is to build for the currently installed versions.
Introduce 2TO3_VERSION to select a 2to3 version which will convert the
python code to python 3. Points to the latest version by default.
|
|
|
|
|
|
|
|
In order to import modules from a package, 'fromlist' may not be empty. Therefore,
we pass ['*'] now.
When attributes where checked, we just checked their names and did not check
their classes. This meant that in e.g.
Compat-API: A.alpha, B.alpha
Clean-API: A.alpha
The attribute 'alpha' would not be considered deprecated because it is provided
by A.alpha. Now we treat an 'alpha' attribute as deprecated, if at least one class
loses it.
|
|
There was a problem in find_deprecated_cpp() which added '.' to the
module-level functions. Caused by a missing 'not'.
|
|
We now prefix attributes with ., so we do not match global variable names when
checking. This should reduce the number of false positives in some applications.
|
|
functions, attributes, etc.
Has to be run from the python-apt source tree, but can be used for all Python code using
python-apt. The output may not be completely correct, but false positives are better than
not checking the code.
|
|
|
|
|
|
|
|
Some names may be changed before the release, but this is a good draft.
|
|
Instead of accessing the modules __dict__ directly, we should use the
functions provided by Python to add objects to the module.
|
|
|
|
|
|
collections.Mapping.
This works on Python 2.6 and newer and enhances the Record class with some new methods
on these platforms, e.g. keys().
|
|
This new property allows us to get the translated record. This was previously
done in 'summary', but because 'description' also uses translated descriptions,
the lookup has been moved in this property.
|
|
|
|
The function deprecated_args() is used in case a function name is kept, but
the function previously had parameters in mixedCase names.
|
|
|
|
A new module, apt.deprecation, is introduced containing functions and
classes which assist in the deprecation.
The apt_pkg extension gets a new attribute, _COMPAT_0_7 which can be set
by defining COMPAT_0_7 at compile time (-DCOMPAT_0_7).
The names are changed, and compatibility functions are enabled if
bool(apt_pkg._COMPAT_0_7) == True, i.e. if the package has been built with
backward compatibility fixes.
This commit changes the apt and aptsources packages, the apt_pkg and
apt_inst extensions will be the next renames.
|
|
* Introduce support for Python 3 (Closes: #523645)
* Support the 'in' operator (e.g. "k in d") in Configuration{,Ptr,Sub}
objects (e.g. apt_pkg.Config) and in TagSections (apt_pkg.ParseSection())
* Replace support for file objects with a more generic support for any object
providing a fileno() method and for file descriptors (integers).
* Add support for the Breaks fields
* Only create Package objects when they are requested, do not keep them in
a dict. Saves 10MB for 25,000 packages on my machine.
* apt/package.py: Allow to set the candidate of a package (Closes: #523997)
- Support assignments to the 'candidate' property of Package objects.
- Initial patch by Sebastian Heinlein
-- Julian Andres Klode <jak@debian.org> Wed, 15 Apr 2009 13:47:42 +0200
|
|
This is the first pre-release of python-apt 0.8. It is completely backward
compatible (even on Python 3), API changes will appear in 0.7.91.
|
|
|
|
|
|
- Support assignments to the 'candidate' property of Package objects.
- Initial patch by Sebastian Heinlein
|
|
This is the first initial port to Python 3. The API is almost completely
identical to the one found in Python 2, except that functions working with
binary data require bytes (md5sum,sha1sum,sha256sum,Base64Encode).
Using setup3.py to install the modules will not work, because the apt package
still has to be converted to Python 3. For the package, we call 2to3-3.1 in
debian/rules to do this automatically.
|
|
|
|
Only create Package objects when they are requested, do not keep them in
a dict. Saves 10MB for 25,000 packages on my machine.
The set holds the names of all packages which have at least one version,
and the WeakValueDictionary() holds weak references to created Package
objects.
This way accessing the same package two times should return the same object,
kept by the WeakValueDictionary().
|
|
This time, it is a bit more complicated because we have to raise an
AttributeError when no package has been looked up.
|
|
|
|
|
|
|
|
|
|
|