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

Passing mode=None to cx_Oracle.connect() #293

Closed
doerwalter opened this issue Apr 8, 2019 · 4 comments
Closed

Passing mode=None to cx_Oracle.connect() #293

doerwalter opened this issue Apr 8, 2019 · 4 comments
Labels
enhancement patch available Awaiting inclusion in official release

Comments

@doerwalter
Copy link

https://cx-oracle.readthedocs.io/en/latest/module.html#cx_Oracle.Connection states that the default value for the mode parameter of cx_Oracle.connect is None. However when I do

db = cx_Oracle.connect("...", mode=None)

I get

TypeError: an integer is required (got type NoneType)

I guess that none of the constant listed in the documentation (SYSDBA, SYSASM, SYSOPER, SYSBKP, SYSDGD, SYSKMT or SYSRAC) gives me a "normal" connection, so a constant could be added for "normal" connection. But IMHO it would be better if mode=None was supported in the connect call.

@anthony-tuininga
Copy link
Member

Since a numeric value is required, None is not really a valid value. I can add a constant for "default" at some point, though. The value will be 0.

anthony-tuininga added a commit that referenced this issue Apr 29, 2019
(#293) and adjusted
documentation for other cases that specified None where None is not actually
a valid value.
@anthony-tuininga
Copy link
Member

I've pushed a change that should resolve this for you. Take a look and let me know what you think. Thanks!

@doerwalter
Copy link
Author

Looks good to me. Thanks!

@anthony-tuininga anthony-tuininga added the patch available Awaiting inclusion in official release label May 3, 2019
@anthony-tuininga
Copy link
Member

This has been released with cx_Oracle 7.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement patch available Awaiting inclusion in official release
Projects
None yet
Development

No branches or pull requests

2 participants