summaryrefslogtreecommitdiff
path: root/tests/test_tokenize.py
Commit message (Collapse)AuthorAgeFilesLines
* Add postgres WINDOW keywordali-tny2020-09-301-0/+6
| | | | | | | | | | | | | | | Postgres allows statements of the form: ```sql SELECT col_1, col_2, SUM(col_3) OVER w FROM x WINDOW w AS (PARTITION BY col_1 ORDER BY col_2) ``` where the window is defined once at the end of the query (see https://www.postgresql.org/docs/9.5/sql-select.html). This change adds WINDOW as a postgres keyword, preventing queries like the above being misparsed, with table name and WINDOW being grouped into an single identifier <Identifier 'x WINDOW'>.
* Remove support for end-of-life PythonsJon Dufresne2020-08-311-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python 2.7 and 3.4 are end-of-life. They are no longer receiving bug fixes, including for security issues. Python 2.7 went EOL on 2020-01-01 and 3.4 on 2019-03-18. For additional details on support Python versions, see: Supported: https://devguide.python.org/#status-of-python-branches EOL: https://devguide.python.org/devcycle/#end-of-life-branches Removing support for EOL Pythons will reduce testing and maintenance resources while allowing the library to move towards modern Python 3. Using pypinfo, we can show the PyPI download statistics, showing less than 10% of users are using Python 2.7. | python_version | percent | download_count | | -------------- | ------: | -------------: | | 3.7 | 45.36% | 3,056,010 | | 3.6 | 26.46% | 1,782,778 | | 3.8 | 12.22% | 823,213 | | 2.7 | 9.97% | 671,459 | | 3.5 | 5.86% | 394,846 | | 3.4 | 0.10% | 6,700 | | 3.9 | 0.03% | 2,346 | | 2.6 | 0.00% | 57 | | 3.3 | 0.00% | 21 | | 3.10 | 0.00% | 6 | | Total | | 6,737,436 | Library users who continue to use Python 2.7 will still be able to install previous versions of sqlparse. Compatibility shims have been dropped, simplifying the code. Using pyupgrade, the codebase has been updated to take advantage of modern syntax <https://github.com/asottile/pyupgrade>. The wheel is no longer marked as "universal" as it is now Python 3 only.
* Add symbols back to comparison testCorey Zumar2020-01-161-1/+1
|
* More test casesCorey Zumar2020-01-161-0/+19
|
* Add support for time zone casts (fixes #489).Andi Albrecht2019-05-161-0/+9
|
* Identitfy NULLS FIRST/LAST as keywords (fixes #487).Andi Albrecht2019-05-011-0/+7
|
* Avoid formatting of psql commands (fixes #469).Andi Albrecht2019-03-111-0/+6
|
* [tokenizer] Grouping GROUP/ORDER BYJohn Bodley2019-03-101-0/+12
|
* Fix parsing of UNION ALL (fixes #294).Andi Albrecht2016-09-261-0/+6
|
* Fix parsing of names containing special chars (fixes 291).Andi Albrecht2016-09-141-0/+14
|
* Avoid double apostrophesOleg Broytman2016-08-061-0/+6
| | | | | | | | If the value is Single it's already quoted with apostrophes. Avoid double apostrophes it that case by using double-quotes instead. For example, if the value is 'value' the output is "'value'" instead of ''value''.
* Parametrize testsVictor Uriarte2016-06-201-24/+7
| | | | | | Allows for tests to continue if the first assert had failed. In particular useful when certain change is dealing with two almost opposing edge cases.
* Remove some test classes and clean-upVictor Uriarte2016-06-201-139/+143
|
* Replace other UnitTest with Py.TestVictor Uriarte2016-06-201-58/+62
|
* Replace ndiffAssertEqual with Py.TestVictor Uriarte2016-06-201-3/+0
|
* Change argument order to match order of all other functionsVictor Uriarte2016-06-141-7/+5
|
* Merge remote-tracking branch 'core/long_live_indexes' into developVictor Uriarte2016-06-141-3/+3
|\
* | Remove token_first; its redundant to token_next(idx=0)Victor Uriarte2016-06-121-3/+3
| |
* | Apply new-style str formatVictor Uriarte2016-06-111-1/+1
| |
* | Allow tokenlists to skip over commentsVictor Uriarte2016-06-041-1/+1
| | | | | | | | Rename ignore_cm to skip_cm for consistency
* | Update test to current lexer functionsVictor Uriarte2016-06-041-9/+4
| |
* | Remove undocumented ws handlers from lexer.pyVictor Uriarte2016-05-291-7/+0
|/ | | | | Removing nl before tokenizing breaks comments (stripnl/stripall) Remove tab-expansion.
* Code cleanup in tests.Andi Albrecht2015-10-261-27/+27
|
* Fix tab expansion for Python 3.Andi Albrecht2015-10-261-2/+0
|
* Use compat module for single Python 2/3 code base.Andi Albrecht2015-10-261-4/+1
| | | | This change includes minor fixes and code cleanup too.
* Add test case for JOIN, update Changelog and AUTHORS.Andi Albrecht2013-10-241-5/+6
|
* Allow whitespaces in certain keywords (fixes #97).Andi Albrecht2013-06-171-0/+26
|
* Python 3 is now fully supported without any patches.Andi Albrecht2012-12-311-1/+6
| | | | | | | | | This change makes the extras/py3k stuff obsolete and installing for Python 3 is as easy as "python3 setup.py install". setup.py uses distribute's use_2to3 flag to automatically run 2to3 when Python 3 is used. \o/ Happy New Year, everyone!
* PEP8'ified to code a bit.Andi Albrecht2012-11-121-30/+31
|
* We can now work with file-like objects.quest2012-04-211-0/+39
|
* Fixed lexer to accept negative numbers (fixes issue56).Kevin Jing Qiu2012-01-101-0/+6
|
* Fix incorrect detection of keyword fragments in names (fixes issue7, ↵Andi Albrecht2009-06-241-0/+21
| | | | reported and initial patch by andyboyko).
* * Python and PHP output filter now add a trailing whitespace.Andi Albrecht2009-05-061-0/+5
| | | | * More test coverage.
* Code cleanup and test coverage.Andi Albrecht2009-05-061-0/+46
|
* Added unittest for issue1 (linebreaks).Andi Albrecht2009-05-031-0/+14
|
* Recognize backticks quoting identifiers.Andi Albrecht2009-04-291-0/+5
|
* Initial import.Andi Albrecht2009-04-031-0/+21