jsqlib 0.8a0__tar.gz → 0.9a0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jsqlib
3
- Version: 0.8a0
3
+ Version: 0.9a0
4
4
  Summary: JSON to SQL query generator
5
5
  Home-page: https://gitlab.com/ru-r5/jsqlib
6
6
  License: MPL-2.0
7
7
  Keywords: sql,json
8
8
  Author: pymancer
9
9
  Author-email: pymancer@gmail.com
10
- Requires-Python: >=3.9,<4.0
10
+ Requires-Python: >=3.9,<3.13
11
11
  Classifier: Development Status :: 3 - Alpha
12
12
  Classifier: Environment :: Console
13
13
  Classifier: Intended Audience :: Information Technology
@@ -21,9 +21,9 @@ Classifier: Programming Language :: Python :: 3.11
21
21
  Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Topic :: Database
23
23
  Classifier: Topic :: Software Development :: Libraries
24
- Requires-Dist: jsonschema (>=4.0,<5.0)
25
- Requires-Dist: python-box (>=5.4,<6.0)
26
- Requires-Dist: sqlfluff (>=0.6,<0.7)
24
+ Requires-Dist: jsonschema (>=4,<5)
25
+ Requires-Dist: python-box (>=5,<8)
26
+ Requires-Dist: sqlfluff (>=3,<4)
27
27
  Project-URL: Documentation, https://gitlab.com/ru-r5/jsqlib/-/wikis/home
28
28
  Project-URL: Repository, https://gitlab.com/ru-r5/jsqlib
29
29
  Description-Content-Type: text/markdown
@@ -86,7 +86,7 @@ $ poetry run black jsqlib -S
86
86
  - lint
87
87
 
88
88
  ```sh
89
- $ poetry run flakehell lint
89
+ $ poetry run ruff check
90
90
  ```
91
91
 
92
92
  - type checking
@@ -96,6 +96,10 @@ $ poetry run pyre
96
96
  ```
97
97
 
98
98
  ## Release History
99
+ - 0.9a0
100
+ - CHANGE: python-box library updated to version 7 (#28)
101
+ - CHANGE: sqlfluff library updated to version 3. Warning: query.prettify output may change. (#34)
102
+ - CHANGE: python 3.12 support (#35)
99
103
  - 0.8a0
100
104
  - CHANGE: nested `select` in `insert from select` statement (#31)
101
105
  - 0.7a0
@@ -56,7 +56,7 @@ $ poetry run black jsqlib -S
56
56
  - lint
57
57
 
58
58
  ```sh
59
- $ poetry run flakehell lint
59
+ $ poetry run ruff check
60
60
  ```
61
61
 
62
62
  - type checking
@@ -66,6 +66,10 @@ $ poetry run pyre
66
66
  ```
67
67
 
68
68
  ## Release History
69
+ - 0.9a0
70
+ - CHANGE: python-box library updated to version 7 (#28)
71
+ - CHANGE: sqlfluff library updated to version 3. Warning: query.prettify output may change. (#34)
72
+ - CHANGE: python 3.12 support (#35)
69
73
  - 0.8a0
70
74
  - CHANGE: nested `select` in `insert from select` statement (#31)
71
75
  - 0.7a0
@@ -6,6 +6,5 @@ Created on Jul 29, 2021
6
6
 
7
7
  @author: pymancer@gmail.com (polyanalitika.ru)
8
8
  """
9
- from jsqlib.engine import Query
10
9
 
11
- __version__ = '0.8a0'
10
+ from jsqlib.engine import Query as Query
@@ -6,6 +6,7 @@ Created on Aug 10, 2021
6
6
 
7
7
  @author: pymancer@gmail.com (polyanalitika.ru)
8
8
  """
9
+
9
10
  from __future__ import annotations
10
11
 
11
12
  from abc import ABCMeta
@@ -6,6 +6,7 @@ Created on Jul 29, 2021
6
6
 
7
7
  @author: pymancer@gmail.com (polyanalitika.ru)
8
8
  """
9
+
9
10
  import json
10
11
  import sqlfluff
11
12
 
@@ -88,7 +89,7 @@ class Query:
88
89
  if not isinstance(schema, dict):
89
90
  schema = True
90
91
 
91
- return validator_for(schema)(schema)
92
+ return validator_for(schema)(schema) # pyre-ignore[20]
92
93
 
93
94
  def prettify(
94
95
  self, sql: Optional[str] = None, dialect: Optional[str] = None, rules: Optional[List[str]] = None
@@ -6,6 +6,7 @@ Created on Aug 10, 2021
6
6
 
7
7
  @author: pymancer@gmail.com (polyanalitika.ru)
8
8
  """
9
+
9
10
  from __future__ import annotations
10
11
 
11
12
  from re import sub as resub
@@ -234,7 +235,7 @@ class Tokenizer:
234
235
  false = self.translator.cast.false
235
236
  null = self.translator.cast.null
236
237
 
237
- if type_ == bool:
238
+ if type_ is bool:
238
239
  result = true if value else false
239
240
  elif type_ == NoneType:
240
241
  result = null
@@ -6,6 +6,7 @@ Created on Aug 10, 2021
6
6
 
7
7
  @author: pymancer@gmail.com (polyanalitika.ru)
8
8
  """
9
+
9
10
  from box import Box
10
11
 
11
12
  POSTGRESQL_DIALECT = 'postgresql'
@@ -6,6 +6,7 @@ Created on Aug 14, 2021
6
6
 
7
7
  @author: pymancer@gmail.com (polyanalitika.ru)
8
8
  """
9
+
9
10
  from typing import Union
10
11
  from typing_extensions import TypeAlias
11
12
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "jsqlib"
3
- version = "0"
3
+ version = "0.9a0"
4
4
  license = "MPL-2.0"
5
5
  description = "JSON to SQL query generator"
6
6
  authors = ["pymancer <pymancer@gmail.com>"]
@@ -16,39 +16,40 @@ classifiers = [
16
16
  "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
17
17
  "Operating System :: OS Independent",
18
18
  "Programming Language :: Python :: 3.9",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
19
22
  "Topic :: Database",
20
23
  "Topic :: Software Development :: Libraries"
21
24
  ]
22
25
 
23
26
  [tool.poetry.dependencies]
24
- python = "^3.9"
25
- python-box = "^5.4"
26
- sqlfluff = "^0.6"
27
- jsonschema = "^4.0"
27
+ python = ">=3.9,<3.13"
28
+ python-box = ">=5,<8"
29
+ sqlfluff = "^3"
30
+ jsonschema = "^4"
28
31
 
29
32
  [tool.poetry.group.dev.dependencies]
30
- black = "^22.3.0"
31
- icecream = "^2.1.2"
33
+ black = "^24.0"
34
+ icecream = "^2.0"
32
35
 
33
36
  [tool.poetry.dev-dependencies]
34
- pytest = "^6"
35
- coverage = {extras = ["toml"], version = "^5"}
36
- pytest-cov = "^2"
37
- pre-commit = "^2"
38
- pylint = "^2"
39
- flake8 = "^3"
40
- flakehell = "^0.9"
37
+ pytest = "^8"
38
+ coverage = {extras = ["toml"], version = "^7"}
39
+ pytest-cov = "^5"
40
+ pre-commit = "^3"
41
+ ruff = "^0"
41
42
  pyre-check = "^0.9"
42
43
 
43
44
  [build-system]
44
- requires = ["setuptools", "poetry-core"]
45
+ requires = ["poetry-core"]
45
46
  build-backend = "poetry.core.masonry.api"
46
47
 
47
48
  [tool.poetry-version-plugin]
48
49
  source = "init"
49
50
 
50
51
  [tool.pytest.ini_options]
51
- minversion = "6.0"
52
+ minversion = "8.0"
52
53
  addopts = "-q"
53
54
  testpaths = ["tests"]
54
55
 
@@ -60,38 +61,21 @@ fail_under = 90
60
61
 
61
62
  [tool.black]
62
63
  line-length = 120
63
- target-version = ['py39']
64
+ target-version = ['py312']
64
65
  include = "jsqlib"
65
66
 
66
- [tool.flakehell]
67
- exclude = ["README.md", "tests/", ".venv/"]
68
- format = "colored"
69
- max_line_length = 120
70
- show_source = true
71
- extended_default_ignore=[]
72
-
73
- [tool.flakehell.plugins]
74
- flake8-bandit = ["+*", "-S322"]
75
- flake8-bugbear = ["+*"]
76
- flake8-builtins = ["+*"]
77
- flake8-comprehensions = ["+*"]
78
- flake8-darglint = ["+*"]
79
- flake8-docstrings = ["+*"]
80
- flake8-eradicate = ["+*"]
81
- flake8-isort = ["+*"]
82
- flake8-mutable = ["+*"]
83
- flake8-pytest-style = ["+*"]
84
- flake8-spellcheck = ["+*"]
85
- pep8-naming = ["+*"]
86
- pycodestyle = ["+*", "-E203", "-E501", "-W503"]
87
- pyflakes = ["+*"]
88
- pylint = ["+*"]
67
+ [tool.ruff]
68
+ line-length = 120
69
+ indent-width = 4
70
+ target-version = "py312"
71
+ exclude = [
72
+ 'README.md',
73
+ 'tests',
74
+ '.venv'
75
+ ]
89
76
 
90
- [tool.flakehell.exceptions."tests/"]
91
- flake8-bandit = ["-*"]
92
- pyflakes = ["-*"]
93
- flake8-darglint = ["-*"]
94
- flake8-docstrings = ["-*"]
77
+ [tool.ruff.lint]
78
+ ignore = ['E501']
95
79
 
96
- [tool.flakehell.exceptions."jsqlib/__init__.py"]
97
- pyflakes = ["-F401"]
80
+ [tool.ruff.lint.per-file-ignores]
81
+ "__init__.py" = ["E402"]