refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
* Handle inconsistencies in type handling in DatabaseQuery & Database
APIs
* Update incompatible queries with frappe.qb notation
* Fixed use cases discovered by failing ERPNext CI tests
fix: db independent syntax for user_type
fix: handle postgres datetime values
feat: add ability to auto commit on db inserts
feat: add ability to escape underscore in postgres
fix: handle missing data in test runner bootstrapping
fix: db independent syntax for queries
fix: refactor to use qb
fix: update cache for language
fix: use pluck in email_queue
Co-authored-by: gavin <gavin18d@gmail.com>
fix: don't auto insert on tests for make_property_setter
fix: remove auto_commit in custom_field insertion
fix: remove auto_commit functionality
fix: review comments
fix: revert link validation
fix: style suggestion for readability
Co-authored-by: gavin <gavin18d@gmail.com>
fix: revert .lower() in link validation
fix: add rollback for setup_wizard
Revert "fix: add rollback for setup_wizard"
This reverts commit 83b3b0913db17718ccd5edae01858cff15603829.
Revert "feat: add ability to escape underscore in postgres"
This reverts commit 8ed9c2aa3306438e94bb813f60e65b416d0b947b.
fix: more concise representation of order fields
Co-authored-by: gavin <gavin18d@gmail.com>
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
* Remove six for PY2 compatability since our dependencies are not, PY2
is legacy.
* Removed usages of utils from future/past libraries since they are
deprecated. This includes 'from __future__ ...' and 'from past...'
statements.
* Removed compatibility imports for PY2, switched from six imports to
standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
* feat: as_raw update to display content inline not always download as attachment
* fix: string formatting corrected in as_raw()
* fix: missing quotes in filename in as_raw()
* feat: Access log doctype for logging information about private file
downloads, backups downloads, printing and exporting data
* updated: access log
* updated: formattted access_log.js
* access logging: print/pdf/pvt files/export/backup
client side implementation: treeview, query_report
server side implementation on the rest
* fixes: codacy errors
* Update response.py
* Update response.py
* Update response.py
* codacy: please
* travis fixes
* changes:filters=>_filters(lol this works @ times?)
added: tests for access_log, make_access_log formatting, form ui added
buttons
* this hopefully fixes em tests
* changes: fixed indents, session.user, formatting
* fixes: tests, refactor, permissions
emerging from exporter.py => reference doctype in export_data (check
format!)
* fixes: convert dict to json
* changes: added more tests, wrote lesser code?
switched js to display depends on
* fixes: codacy and hopefully travis
* fix: tests? and polishing up
* added column field, removed tracked views
changed access log in exporter.py > export_data
added access log in reportview.py > export_query
* style: Fix indentation
* style: Fix indentation
* fix: Remove problematic string replace
It may replace quotes in the actual filter values which can result in invalid JSON
* fix: Remove filter string conversion
* fix: Error due to quote escapes
TODO: Check for a better way
A file may be attached to multiple documents. It's permission is decided
based on the attached document's permissions. So, the permission
should be checked for each document and should be allowed if atleast
one document is accessible.
* migrate more functions to file class
* add get_content(), returns file content from file_name
* move get_file_path() to get_full_path() to decrease naming ambiguity
Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
* Fixed dict_keys and lists
* [FIX] config.get keys must be list
* [FIX] pickle all objects
* [FIX] get versions in unicode
* [FIX] get log versions
* debugging
* Fixed commit ID reference
* Fixed branch reference
* Fixed doc keys to list
* [LOG] test log
* [LOG] test log
* Convert iterators to list
* removed logs
* [FIX] Trial to load templates
* Fixed codacy