[TIP] Coming changes to unittest2 plugins
Olemis Lang
olemis at gmail.com
Tue Sep 28 12:57:33 PDT 2010
On Mon, Sep 27, 2010 at 8:36 PM, <exarkun at twistedmatrix.com> wrote:
> On 27 Sep, 07:42 pm, holger at merlinux.eu wrote:
>>
>> On Mon, Sep 27, 2010 at 19:19 -0000, exarkun at twistedmatrix.com wrote:
>>>>
>>>> packaging meta data is for consumption of tools. For example, i want to
>>>> write one that converts a newstyle setup.cfg into an oldstyle setup.py.
>>>
>>> What transformation do you need to perform on an arbitrary, application-
>>> specified fully qualified Python name? In general you can't know
>>> anything about it, whether it has a ":" in it or not.
>>
>> Wrong. The ":" carries information. For example, if we have:
>>
>> [global]
>> script-entry-points =
>> somescript = testpath.to:some.function
>>
>> we can easily generate an oldstyle setup.py from it:
>>
>> setup(entry_points={'somescript': 'testpath.to:some.function'}, ...)
>>
>> without having to load live objects. The dotted name does
>> not allow that and thus carries less information.
>
> Thanks for explaining that. This is clearly a case where the ":" helps (a
> sort of self-referential case, where the ":" is only needed because it used
> to be needed).
>
> It's not an important case to me (and I don't think it should be important
> to anyone else). It's still nice to know *why* the ":" might be desired
> though.
>
What d'u think of the example I mentioned before (i.e. the Trac plugin
(macro?) for the lazy dev ...) ???
--
Regards,
Olemis.
Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/
Featured article:
More information about the testing-in-python
mailing list