Age | Commit message (Collapse) | Author | Files | Lines |
|
Conflicts:
debian/changelog
python/apt_pkgmodule.cc
|
|
This is mostly meant to be used with tag files that are opened
with a path, rather than a file object.
Closes: #748922
|
|
|
|
|
|
This reverts commit 1b6b123a052ca2d53e90b62da09ce300d701265a, reversing
changes made to 9de6a183f09f0d0adbcc5817872c5a0024f5ef47.
|
|
Conflicts:
debian/control
|
|
In case the encoding attribute does not exist, Python sets an
exception. We must thus clear the exception, otherwise it might
be raised at some later point in the code.
|
|
We should be done now.
DO NOT MERGE
|
|
|
|
|
|
- make TagSecString_FromStringAndSize, TagSecString_FromString
static, thanks to jcristau
|
|
- Correctly handle file descriptor 0 aka stdin (Closes: #669458)
|
|
Python 3, by using bytes instead of str when requested; and
document this in the RST documentation (Closes: #656288)
|
|
|
|
|
|
- add support a filename argument in apt_pkg.TagFile() (in addition
to the file object currently supported)
|
|
|
|
This fix is large, but simple in concept. Instead of relying
on Py_BuildValue and type signatures, or type-specific
conversion functions, create a new set of overloaded
MkPyNumber() functions that automatically do the right
thing for each numerical type.
|
|
- remove bogus comment
* python/tag.cc:
- allow "bytes" type in TagSecNew (for python3)
|
|
- Support gzip compression for control files (Closes: #383617),
requires APT (>> 0.7.26~exp10) to work.
|
|
|
|
Finally, a complete reference to apt_pkg available
via pydoc and __doc__ attributes.
|
|
|
|
- Hack the TagFile iterator to not use shared storage (Closes: #572596):
Scan once, duplicate the section data, and scan again.
|
|
- Handle deprecated attributes and methods in the tp_gettattro slot, this
allows us to easily warn if a deprecated function is used.
|
|
|
|
|
|
|
|
- merge patch from John Wright that adds FindRaw method
(closes: #538723)
|
|
|
|
|
|
This is the first step towards implementing coding guidelines for the
C++ code and providing an usable C++ API.
|
|
This is related to PEP 3123 and fixes some compiler warnings.
|
|
|
|
|
|
If you want to subclass apt_pkg.Cache() and create an apt_pkg.DepCache()
object in it (e.g. as self.depcache) this is needed because otherwise,
Python would not know about the cyclic dependency and refuse to free any
of them.
This also changes apt_pkg.Cache to the standard deallocation schema,
because the underlying CacheFile deletes its pointers automatically on
deletion. Thus a second call is not needed.
|
|
|
|
|
|
PyObject_NEW/DEL
This allows us to finally implement subclassing. Previously deletion of an
instance of a subclass caused segmentation faults, this is not the case
anymore.
|
|
|
|
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.
|
|
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).
|
|
|
|
Some names may be changed before the release, but this is a good draft.
|
|
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.
|
|
|
|
Replace support for file objects with a more generic support for any object
providing a fileno() method and for file descriptors (integers).
This also helps us to port to Python 3, where the previously used PyFile_
functions are not available anymore.
|
|
By using tp_methods and tp_getset instead of a function for tp_getattr,
the resulting object is easier to understand and access to attributes and
methods is faster.
It also helps the port to Python 3, where Py_FindMethod does not exist
anymore.
|
|
Support the replacement of mapping.has_key() for sections, and
update the usage in apt/package.py and apt/debfile accordingly.
This is implemented by extending the TagSecType with sequence
methods, but only settings the contains method there.
The TagSecGetAttr() function has been removed and replaced by
the use of the tp_methods slot.
|
|
|