Skip to content

Table name quoting - #50

Merged
tmylk merged 3 commits into
piskvorky:masterfrom
Digenis:master
Jun 21, 2016
Merged

Table name quoting#50
tmylk merged 3 commits into
piskvorky:masterfrom
Digenis:master

Conversation

@Digenis

@Digenis Digenis commented Jun 16, 2016

Copy link
Copy Markdown
Contributor

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

@tmylk

tmylk commented Jun 21, 2016

Copy link
Copy Markdown
Contributor

Thanks a lot for the PR!

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

Copy link
Copy Markdown
Owner

CHANGELOG / tweet?

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

@tmylk

tmylk commented Jun 22, 2016

Copy link
Copy Markdown
Contributor

@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

Digenis commented Jun 22, 2016

Copy link
Copy Markdown
Contributor Author

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

tmylk commented Jun 28, 2016

Copy link
Copy Markdown
Contributor

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

3 participants