Re: [pytest-dev] on opening up single character options via a registry
Am 06.08.2017 um 22:11 schrieb Floris Bruynooghe: > RonnyPfannschmidtwrites: >> as it pains me that we sneakily call private methods to use single >> character options in xdist, >> i propose to open up single character options to other plugins by means >> of a registry, > > What's wrong with the stance that this was a historical mistake and > should never have been allowed? It's a lot easier to handle, i.e. do > nothing but apologise to plugin devs who want to use short options. that is indeed an option, i would prefer a way to have at least use the plugins under pytest-dev use a well defined public specification in future > >> so that plugins that have a registered single character will be able to >> use it in py.test versions that have that association saved >> >> we could even go as far as making the registry a extra pytest plugin >> that can be updated out of band from pytest itself > > A plugin is probably the best way to go here. It also means we'd be > exposing the register functionality via hooks which is cute as it allows > alternate registries to appear. Your definition of cute may obviously > vary, but I think this would work out fine and no chaos would ensue. if we allow alternate registries for the pytest single character options, then we just allow anyone to use anything after all. collisions tend to be a pain, i believe its very helpful to have such a registry as authoritative entity simply to avoid conflict for users its already a pain to see the mess that's happening around marks and mark name collisions, i don't see any compelling reason to repeat that failure for options -- Ronny > > > Cheers, > Floris > ___ pytest-dev mailing list pytest-dev@python.org https://mail.python.org/mailman/listinfo/pytest-dev
Re: [pytest-dev] on opening up single character options via a registry
RonnyPfannschmidtwrites: > as it pains me that we sneakily call private methods to use single > character options in xdist, > i propose to open up single character options to other plugins by means > of a registry, What's wrong with the stance that this was a historical mistake and should never have been allowed? It's a lot easier to handle, i.e. do nothing but apologise to plugin devs who want to use short options. > so that plugins that have a registered single character will be able to > use it in py.test versions that have that association saved > > we could even go as far as making the registry a extra pytest plugin > that can be updated out of band from pytest itself A plugin is probably the best way to go here. It also means we'd be exposing the register functionality via hooks which is cute as it allows alternate registries to appear. Your definition of cute may obviously vary, but I think this would work out fine and no chaos would ensue. Cheers, Floris ___ pytest-dev mailing list pytest-dev@python.org https://mail.python.org/mailman/listinfo/pytest-dev
[pytest-dev] on opening up single character options via a registry
hi everyone, as it pains me that we sneakily call private methods to use single character options in xdist, i propose to open up single character options to other plugins by means of a registry, so that plugins that have a registered single character will be able to use it in py.test versions that have that association saved we could even go as far as making the registry a extra pytest plugin that can be updated out of band from pytest itself -- Ronny ___ pytest-dev mailing list pytest-dev@python.org https://mail.python.org/mailman/listinfo/pytest-dev