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

Table name quoting #50

Merged
merged 3 commits into from
Jun 21, 2016
Merged

Table name quoting #50

merged 3 commits into from
Jun 21, 2016

Conversation

Digenis
Copy link
Contributor

@Digenis Digenis commented Jun 16, 2016

Tables names that don't start with a letter or aren't alphanumeric
need to be enclosed in double quotes.

@tmylk
Copy link
Contributor

tmylk commented Jun 21, 2016

Thanks a lot for the PR!

@tmylk tmylk merged commit dff92b8 into piskvorky:master Jun 21, 2016
@piskvorky
Copy link
Owner

CHANGELOG / tweet?

Btw @tmylk build fails -- related to repo move?

@tmylk
Copy link
Contributor

tmylk commented Jun 22, 2016

@Digenis Test fails in Python 2.6 probably because asserts need to be backported

ERROR: Irregular table names need to be quoted

Traceback (most recent call last):
File "/home/travis/build/RaRe-Technologies/sqlitedict/tests/test_core.py", line 148, in test_irregular_tablenames
sqlitedict.SqliteDict, ':memory:', '"')
File "/opt/python/2.6.9/lib/python2.6/contextlib.py", line 83, in helper
return GeneratorContextManager(func(_args, *_kwds))
TypeError: assertRaisesRegexp() takes exactly 3 arguments (6 given)

@tmylk tmylk mentioned this pull request Jun 22, 2016
@Digenis
Copy link
Contributor Author

Digenis commented Jun 22, 2016

I just looked into it.

I thought that you should get a different traceback in 2.6 — it lacks assertRaisesRegexp.
Then I noticed tests/accessories.py, it has an incomplete implementation of assertRaisesRegexp
which can work only as a context manager.

I fixed it, you can git pull git@github.com:Digenis/sqlitedict.git master
to avoid PR formalities.
Commit: Digenis@c1e9ebd
Successful build: https://travis-ci.org/Digenis/sqlitedict/builds/139394023

Also, in python-3.something, it should warn about renaming it to assertRaisesRegex.

@tmylk
Copy link
Contributor

tmylk commented Jun 28, 2016

Thx. Merged in bb21215

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.

3 participants