summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-10-01Deprecation tweaksPanu Matilainen5-18/+10
- use PyErr_WarnEx() for better control and leave the tracking up to python - use PendingDeprecationWarning for now - document the replacing functionality in the deprecation messages - make hdr.sprintf() just an alias to hdr.format() without deprecating, at least for now it'd be only a gratuitous incompatible change on python side
2009-10-01Oops, these are mappings, not dicts...Panu Matilainen2-2/+2
2009-10-01Generalize python ts flags and colors set/get fooPanu Matilainen1-59/+93
- make flags, vsflags, color, prefcolor (previously not available) and probFilter appear as internal attributes of ts objects, each with their own setter/getter methods - make the old custom set/get methods access the internal attributes instead - keeping them "internal only" leaves room for adding further sanity checking and nicer interface on python side while giving direct access bits for those who want it - not deprecating the old get/set methods at least yet...
2009-10-01Fix couple of recently introduced compiler warningsPanu Matilainen2-2/+2
2009-10-01Include structmembers.h centrally from rpmsystem-py.hPanu Matilainen3-4/+2
- pretty much everything might need this...
2009-10-01Add API for setting preferred transaction file colorPanu Matilainen2-0/+18
- not strictly needed as it gets its default from a macro but .. shrug
2009-10-01Make python ts rootDir appear as a read-only attributePanu Matilainen1-1/+6
- there's no need to change the rootdir after object creation, better not permit at all
2009-10-01Add python getter for transaction idPanu Matilainen1-0/+6
2009-10-01Eliminate python ts scriptFd kludgeryPanu Matilainen1-31/+24
- make the scriptFd appear as regular attribute by providing a setter method for it, permit any file object to be used and allow disabling too - readonly for now as we dont have rpmfd wrapped yet - remove now unnecessary custom get/setattr functions
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