summaryrefslogtreecommitdiff
path: root/sqlparse/cli.py
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright notice.Andi Albrecht2020-10-071-1/+1
|
* Remove support for end-of-life PythonsJon Dufresne2020-08-311-23/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update copyright header (fixes #372).Andi Albrecht2018-07-311-1/+2
|
* new option --indent_columns to indent all columns by --indent_widthPatrick Schemitz2018-03-031-0/+7
|
* Merge pull request #345 from johshoff/masterAndi Albrecht2017-11-241-0/+7
|\ | | | | Option to indent after first line
| * Option to indent after first lineJohannes Hoff2017-06-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a command line argument `--indent_after_first` which sets the indentation of all lines after the first one, e.g. SELECT, UPDATE, etc. For example: $ sqlparse/__main__.py -r sample.sql UPDATE foo SET a = 1 WHERE a > 2 AND a < 10; $ sqlparse/__main__.py -r --indent_after_first sample.sql UPDATE foo SET a = 1 WHERE a > 2 AND a < 10;
* | Fix unclosed file warnings discovered during testsJon Dufresne2017-10-281-2/+5
| | | | | | | | | | | | | | | | Appear as: ResourceWarning: unclosed file ... Always explicitly close files or detach file wrappers.
* | Close files during tests.Andi Albrecht2017-09-241-1/+6
|/
* CLI: Add --encoding optionTao Wang2017-01-121-6/+15
| | | | | | | | * Add `--encoding` option with default utf-8 * Make sure input and output are in same encoding * Add test cases Signed-off-by: Tao Wang <twang2218@gmail.com>
* Add formatter option for comma first notation (fixes #141).Andi Albrecht2016-09-141-0/+7
|
* Correct license link (fixes #288).Andi Albrecht2016-09-141-1/+1
|
* Convert string literals to unicode for Py27Oleg Broytman2016-08-311-4/+5
| | | | | | Working with non-ascii in Python require all-unicode approach, but str literals in Python 2.7 are bytes. The patch makes them unicode. Syntax u'' is supported in Python 2.7 and 3.3+.
* Format cli.py and add cli-testsVictor Uriarte2016-06-201-7/+5
|
* Misc. small code clean-up/commentsVictor Uriarte2016-06-181-0/+1
|
* Separate __main__ and main() to allow for testingVictor Uriarte2016-06-151-0/+163
Also reference example in: https://github.com/ionelmc/cookiecutter-pylibrary