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

Signature change of ddt.idata in 1.4.3 breaks downstream uses #97

Closed
jakelishman opened this issue Sep 27, 2021 · 0 comments · Fixed by #98
Closed

Signature change of ddt.idata in 1.4.3 breaks downstream uses #97

jakelishman opened this issue Sep 27, 2021 · 0 comments · Fixed by #98
Assignees

Comments

@jakelishman
Copy link
Contributor

jakelishman commented Sep 27, 2021

In #92, the signature of idata was changed from idata(values) to idata(values, index_len), with no default handling for the latter argument. This means that all current uses of idata(values) are now broken on upgrade to 1.4.3, and there's no compatible calling method for versions 1.4.2 and 1.4.3.

I'm not too familiar with your internals, but glancing through PR #92, it looks like it could be handled safely without affecting that PR by changing the signature to something like:

def idata(values, index_len=None):
    if index_len is None:
        # Avoid accidentally consuming a one-time-use iterable.
        values = tuple(values)
        index_len = len(str(len(values)))
    # ... continue as normal ...

If so, I'd be happy to make the PR.

Byron pushed a commit to gitpython-developers/GitPython that referenced this issue Sep 30, 2021
The ddt package changed the function signature in version 1.4.3 from
idata(iterable) to idata(iterable, index_len). Hopefully this was just a
mistake and the new argument will be optional in future versions (see
issue datadriventests/ddt#97)
@wswld wswld self-assigned this Oct 4, 2021
@wswld wswld closed this as completed in #98 Oct 4, 2021
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

Successfully merging a pull request may close this issue.

2 participants