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

Fix database transport error #37

Merged
merged 1 commit into from
May 16, 2019
Merged

Conversation

ThePrez
Copy link
Member

@ThePrez ThePrez commented May 15, 2019

Database transport was throwing the following error:

getattr(cursor, self.func)(cursor, self.query, parms)
TypeError: callproc() takes at most 3 arguments (4 given)

This is because cursor is the implicit "self" reference but also being explicitly passed

@ThePrez ThePrez requested a review from abmusse May 15, 2019 14:49
Copy link
Member

@abmusse abmusse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ThePrez
Copy link
Member Author

ThePrez commented May 16, 2019

All the TravisCI builds are failing, so we need to look into those.

@abmusse abmusse self-requested a review May 16, 2019 15:57
@jkyeung
Copy link
Contributor

jkyeung commented May 16, 2019

Um, are we completely sure the tests are correct? Judging by the release downloads, the tests changed drastically between 1.5.1 and 1.6.0. Which isn't surprising, given the significant refactoring that was done.

But if anything, the tests should be failing on the 1.6.0 release, because this bug is a showstopper. Out of the box, DatabaseTransport is not usable at all from my PC (with the iSeries Access ODBC driver). But when I apply this fix, it works.

[Edit: I can confirm the bug prevents proper operation on PASE as well, using ibm_db.]

@ThePrez
Copy link
Member Author

ThePrez commented May 16, 2019

I agree. Opened issue #38 for the test case. Will merge this PR

@ThePrez ThePrez merged commit 5810fbc into IBM:master May 16, 2019
@kadler
Copy link
Member

kadler commented May 28, 2019

Wow, I really goofed that up. Apparently when you reference Python methods, it doesn't return the underlying function, but a function bound to its self so you don't need to pass it.

kadler added a commit that referenced this pull request May 28, 2019
kadler added a commit that referenced this pull request May 28, 2019
jkyeung pushed a commit to jkyeung/python-itoolkit that referenced this pull request May 29, 2019
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 this pull request may close these issues.

4 participants