Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No obvious way to react to parametrized fixtures deprecation warning #164

Open
khardix opened this issue Nov 14, 2018 · 2 comments
Open

Comments

@khardix
Copy link

khardix commented Nov 14, 2018

Each time I use the betamax_parametrized_session fixture, I'm getting a DeprecationWarning about their behaviour becoming default in 1.0. However, there is no straightforward way to react to those warnings -- switching to the betamax_session breaks the parametrization support (and gives me another warning about it).

My current workaround involves filtering these warnings to not clutter my test outputs. If this is the "correct" way to handle those, I think it should at least be documented as such (and I volunteer for writing that piece). Otherwise, there should be (ideally future-proof) way of getting parametrized fixtures without warning.

One suggestion I can think of is getting rid of the warning for now, until 1.0 comes. At that point, make the switch of betamax_session to parametrized, and provide betamax_parametrized_session as deprecated alias (in other words, add a reworded warning back). Apply the same process to *_recorder. In further future version (2.0? 1.x?), drop the aliases.

@hroncok
Copy link
Member

hroncok commented Nov 14, 2018

See also: #113 (comment) (and further)

@khardix
Copy link
Author

khardix commented Nov 14, 2018

Reading the linked PR, I understand that 1.0 is the target release for dropping the _parametrized versions/names. In that case, I would still like to see a transitory period when both names are available, although parametrized is deprecated, i.e.:

  • 0.8.(2+n): parametrized_X without DeprecationWarning
  • 0.9: parametrized_X and X have the same functionality, paramterized_X issue DeprecationWarning
  • 1.0: parametrized_X is removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants