summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-09-30Deprecate custom foo.count() methods, support len() insteadPanu Matilainen2-10/+16
2009-09-30Eliminate unused python ts iterator filter stuffPanu Matilainen1-6/+1
- iterators dont take arguments so there's no convenient way to filter while iterating, let python users filter themselves (like they've always been doing)
2009-09-30Take advantage of headerNextTag() in python hdr.keys()Panu Matilainen1-29/+6
- avoids whole lotta unnecessary copying of data, we're only interested in tag numbers here - dont filter out stuff - python consumers can look at i18n data too
2009-09-30Add iterator support to python header objectsPanu Matilainen1-3/+21
2009-09-30Add alternative header iterator methodPanu Matilainen2-10/+26
- we dont always want the actual contents of the tag to be copied on iteration, so add an interface that returns the next tag in the header - this lets callers to decide what to do with the tag and how to retrieve it
2009-09-30Add some flags to rpmtd creationPanu Matilainen1-6/+16
- permit disabling extension retrieval and "raw" (untranslated i18n) tags - always use HEADERGET_ALLOC for data availability sanity
2009-09-30Add beginnings of rpmtd wrappings to pythonPanu Matilainen3-1/+128
- unlike other types, store the C-level td structure directly in the python object, this lets us selectively expose some members directly, avoids having to deal with rpmtd allocation separately and as leaves the reference counting to python as rpmtd's aren't refcounted on C-level
2009-09-30Turn hdrGetHeader() into argument parsing converter interfacePanu Matilainen5-18/+25
2009-09-30Sanitize getattr behavior of header objectsPanu Matilainen1-12/+20
- when generic getattr fails, only try retrieving header tag as attribute if it's a valid tag - clear any python errors if generic getattr failed - split generating a python object from header + tag to an internal helper
2009-09-28Require expected type in PyArg_ParseTupleAndKeywords() alreadyPanu Matilainen1-24/+3
2009-09-28Support numeric expansion in rpm.expandMacro()Panu Matilainen1-5/+11
2009-09-28Push rpm.signalsCaught() to python levelPanu Matilainen2-28/+13
- only implement the bare minimum in C by adding a thin wrapper for rpmsqIsCaught(), the rest can easily be done in python
2009-09-28Implement rpm.readHeaderFromFD() in python instead of CPanu Matilainen3-49/+16
2009-09-28Implement rpm.readHeaderListFromFD() in python instead of CPanu Matilainen4-57/+18
2009-09-28Implement rpmreadHeaderListFromFile() in python instead of CPanu Matilainen3-25/+7
2009-09-28A few cases of Py_RETURN_NONE missed on the first roundPanu Matilainen1-8/+4
2009-09-28Arrange rpm.headerLoad() compatibility on python levelPanu Matilainen3-8/+4
2009-09-28OSGi dependency generator fixes from Alphonse Van Assche (ticket #101)Panu Matilainen1-142/+173
- This patch fix some minor bug, remove unused code and increase drastically the perf by threading execution of tasks and using zip command instead of jar to get meta-data
2009-09-24Enable subtyping on the rest of our type-objectsPanu Matilainen7-7/+8
- not very useful atm as various places return hard-wired built-in types
2009-09-24Eliminate all custom tp_free() type methodsPanu Matilainen4-39/+4
- tp_free()'s purpose is only to free up the memory used by the python object structure, cleaning up our own allocations belongs to tp_dealloc()
2009-09-24Enable subtyping on rpm.ts classPanu Matilainen1-1/+1
2009-09-24Call generic python setattr if not scriptFdPanu Matilainen1-2/+2
- yet more preliminaries for subtyping
2009-09-24tp_setattro() is supposed to return -1 on errorsPanu Matilainen1-1/+1
2009-09-24Call (sub)type tp_free from destructorsPanu Matilainen7-23/+15
- more preliminaries for subtyping - remove pointless NULL checks
2009-09-24Make object allocation type agnosticPanu Matilainen16-43/+43
- pass (sub)type down to wrappers - call subtype tp_alloc() instead of PyObject_New() - preliminaries for allowing subtyping
2009-09-23Remove unnecessary header type checkingPanu Matilainen1-7/+0
- the type is already validated by PyArg_ParseTupleAndKeywords(), no need to doublecheck
2009-09-23Remove the broken tp_print method from specPanu Matilainen1-7/+1
2009-09-23Decouple python spec objects from transaction objectsPanu Matilainen4-29/+44
- ts structure is only necessary for hysterically passing back the parse result from parseSpec(), hide this in the bindings - deprecate ts.parseSpec() for later ripping
2009-09-23Oops, binary data can and should be presented as python stringsPanu Matilainen1-9/+1
2009-09-23Add rpmtd to python object converter, change header code to use thatPanu Matilainen4-107/+74
- vastly simpler than the former goo in hdr_subscribe
2009-09-23Turn tagNumFromPyObject() into an object converter interfacePanu Matilainen7-46/+23
- permits direct validation and conversion from arg parsing
2009-09-23Turn rpmFdFromPyObject() into an object converter interfacePanu Matilainen4-16/+14
- permits direct validation and conversion from arg parsing
2009-09-23Permit any file object in rpm.readHeaderListFromFD()Panu Matilainen1-3/+3
2009-09-23Permit file objects in python header constructorPanu Matilainen1-1/+7
2009-09-23Add write() method to python headersPanu Matilainen1-1/+27
2009-09-23Accept any file object in ts.hdrFromFdno()Panu Matilainen1-4/+4
2009-09-23Add helper to convert python file objects to rpmio FD_t typePanu Matilainen3-0/+31
2009-09-23Add te.NEVRA() method, adjust docsPanu Matilainen1-1/+10
2009-09-23Remove tp_print methods from all rpm-python objectsPanu Matilainen4-51/+4
- these violate the intended use of tp_print, python docs state "A type should never implement tp_print in a way that produces different output than tp_repr or tp_str would."
2009-09-23Lose the debug junk from python bindingsPanu Matilainen5-176/+0
2009-09-23Add hdr.format(), deprecate hdr.sprintf()Panu Matilainen1-1/+9
- sprintf() is a C'ism and format() is closer to current librpm anyway
2009-09-23Make fiFromHeader() static inside header-py, deprecatePanu Matilainen3-7/+7
2009-09-23Deprecate rpm.headerLoad()Panu Matilainen1-22/+4
- this is not needed now, just call rpm.hdr(<blob) to load
2009-09-23Deprecate header filelist munging methodsPanu Matilainen1-0/+8
- hdr.convert() is the generic way, the old stuff is not needed anymore - macro to issue warnings just once
2009-09-23Eliminate unnecessary functionPanu Matilainen1-6/+2
2009-09-23Permit headerConvert() from pythonPanu Matilainen2-0/+17
2009-09-23Add has_key() method to header objectPanu Matilainen1-0/+11
2009-09-23Add support for creating new header objectsPanu Matilainen1-1/+30
- without arguments, rpm.hdr() creates an empty header - with another header as argument, make a copy - string argument is considered an unloaded header blob and copy-loaded
2009-09-23Rpm's allocators dont return on OOM, remove unnecessary checkPanu Matilainen1-5/+1
2009-09-23Add type checking macros for all rpm python type objectsPanu Matilainen8-0/+16