Skip to content

MySQLdb.NULL is undefined #368

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

Closed
ckclark opened this issue Jul 17, 2019 · 1 comment
Closed

MySQLdb.NULL is undefined #368

ckclark opened this issue Jul 17, 2019 · 1 comment

Comments

@ckclark
Copy link
Contributor

ckclark commented Jul 17, 2019

Expected Behavior

No exception is raised.

Current Behavior

An exception is raised:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'NULL'

Possible Solution

Removed "NULL" from __all__ of __init__.py

Steps to Reproduce

  1. from MySQLdb import *

Context (Environment)

It seems that "NULL" symbol is removed from MySQLdb/_mysql.c in 819688b
Also this issue occurs when google AppEngine deploys a local service for testing. rdbms_mysqldb.py

Possible Fix

#369

@methane
Copy link
Member

methane commented Jul 17, 2019

You can use just "NULL" instead.

@methane methane closed this as completed Jul 17, 2019
methane pushed a commit that referenced this issue Jul 17, 2019
Since the symbol "NULL" is removed in 819688b, it should be also
removed from `__all__`. Fix issue #368.
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