q2rad 0.1.210__tar.gz → 0.1.212__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.
Potentially problematic release.
This version of q2rad might be problematic. Click here for more details.
- {q2rad-0.1.210 → q2rad-0.1.212}/PKG-INFO +1 -1
- {q2rad-0.1.210 → q2rad-0.1.212}/pyproject.toml +1 -1
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2modules.py +2 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2packages.py +2 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2queries.py +2 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2rad.py +7 -6
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2raddb.py +4 -1
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2reports.py +1 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2utils.py +3 -0
- q2rad-0.1.212/q2rad/version.py +1 -0
- q2rad-0.1.210/q2rad/version.py +0 -1
- {q2rad-0.1.210 → q2rad-0.1.212}/LICENSE +0 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/README.md +0 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/__init__.py +0 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/__main__.py +0 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2actions.py +0 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2appmanager.py +0 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2appselector.py +0 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2constants.py +0 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2forms.py +0 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2lines.py +0 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2make.py +0 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2market.py +0 -0
- {q2rad-0.1.210 → q2rad-0.1.212}/q2rad/q2stylesettings.py +0 -0
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
from q2db.cursor import Q2Cursor
|
|
17
17
|
from q2gui.q2model import Q2CursorModel
|
|
18
18
|
from q2gui.q2dialogs import q2AskYN
|
|
19
|
+
from q2gui import q2app
|
|
19
20
|
from q2rad.q2utils import Q2Form
|
|
20
21
|
from q2rad.q2utils import Q2_save_and_run
|
|
21
22
|
from q2gui.q2utils import num
|
|
@@ -34,6 +35,7 @@ class Q2Modules(Q2Form, Q2_save_and_run):
|
|
|
34
35
|
|
|
35
36
|
def on_init(self):
|
|
36
37
|
self.editor_actions = Q2Actions()
|
|
38
|
+
self.db = q2app.q2_app.db_logic
|
|
37
39
|
self.add_control(
|
|
38
40
|
"name",
|
|
39
41
|
_("Name"),
|
|
@@ -18,6 +18,7 @@ from q2gui.q2model import Q2CursorModel
|
|
|
18
18
|
from q2gui.q2dialogs import q2Mess, q2AskYN
|
|
19
19
|
|
|
20
20
|
from q2rad.q2utils import Q2Form
|
|
21
|
+
from q2gui import q2app
|
|
21
22
|
import gettext
|
|
22
23
|
|
|
23
24
|
|
|
@@ -30,6 +31,7 @@ class Q2Packages(Q2Form):
|
|
|
30
31
|
self.no_view_action = True
|
|
31
32
|
|
|
32
33
|
def on_init(self):
|
|
34
|
+
self.db = q2app.q2_app.db_logic
|
|
33
35
|
self.add_control("package_name", _("Name"), datatype="char", datalen=100, pk="*")
|
|
34
36
|
self.add_control("package_pipname", _("Pip name"), datatype="char", datalen=100)
|
|
35
37
|
self.add_control("package_version", _("Version"), datatype="char", datalen=10)
|
|
@@ -23,6 +23,7 @@ import json
|
|
|
23
23
|
import gettext
|
|
24
24
|
import re
|
|
25
25
|
from q2rad.q2utils import Q2Form
|
|
26
|
+
from q2gui import q2app
|
|
26
27
|
|
|
27
28
|
_ = gettext.gettext
|
|
28
29
|
re_find_param = re.compile(r"(?::\b\w+\b|\{.+\})")
|
|
@@ -35,6 +36,7 @@ class Q2Queries(Q2Form, Q2_save_and_run):
|
|
|
35
36
|
|
|
36
37
|
def on_init(self):
|
|
37
38
|
self.create_form()
|
|
39
|
+
self.db = q2app.q2_app.db_logic
|
|
38
40
|
|
|
39
41
|
cursor: Q2Cursor = self.q2_app.db_logic.table(table_name="queries")
|
|
40
42
|
model = Q2CursorModel(cursor)
|
|
@@ -766,16 +766,15 @@ class Q2RadApp(Q2App):
|
|
|
766
766
|
continue
|
|
767
767
|
self.process_events()
|
|
768
768
|
if force or latest_version != current_version and latest_version:
|
|
769
|
-
self.pip_install(package, latest_version)
|
|
770
769
|
try:
|
|
771
770
|
self.pip_install(package, latest_version)
|
|
772
771
|
except Exception as error:
|
|
773
772
|
try:
|
|
774
773
|
self.pip_install(package, latest_version)
|
|
775
|
-
except Exception:
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
774
|
+
except Exception as error:
|
|
775
|
+
latest_version = None
|
|
776
|
+
logging.warning(f"pip update {package} error:{error}")
|
|
777
|
+
# latest_version, new_current_version = self.get_package_versions(package)
|
|
779
778
|
if latest_version:
|
|
780
779
|
upgraded.append(
|
|
781
780
|
f"{package if isinstance(package, str) else package[0]} - "
|
|
@@ -792,6 +791,7 @@ class Q2RadApp(Q2App):
|
|
|
792
791
|
mess = ("Upgrading complete!<p>" "The program will be restarted!" "<p><p>") + "<p>".join(upgraded)
|
|
793
792
|
else:
|
|
794
793
|
mess = "Updates not found!<p>"
|
|
794
|
+
q2mess(mess)
|
|
795
795
|
if upgraded:
|
|
796
796
|
self.restart()
|
|
797
797
|
|
|
@@ -1144,13 +1144,13 @@ class Q2RadApp(Q2App):
|
|
|
1144
1144
|
return self.get_form(child_form_name)
|
|
1145
1145
|
|
|
1146
1146
|
return worker
|
|
1147
|
-
|
|
1148
1147
|
form.add_action(
|
|
1149
1148
|
x["action_text"],
|
|
1150
1149
|
self.code_runner(x["action_worker"]) if x["action_worker"] else None,
|
|
1151
1150
|
child_form=get_action_form(child_form_name),
|
|
1152
1151
|
child_where=x["child_where"],
|
|
1153
1152
|
hotkey=x["action_key"],
|
|
1153
|
+
mess=x["action_mess"],
|
|
1154
1154
|
icon=x["action_icon"],
|
|
1155
1155
|
tag=x["tag"],
|
|
1156
1156
|
child_noshow=x["child_noshow"],
|
|
@@ -1163,6 +1163,7 @@ class Q2RadApp(Q2App):
|
|
|
1163
1163
|
self.code_runner(x["action_worker"], form=form) if x["action_worker"] else None,
|
|
1164
1164
|
hotkey=x["action_key"],
|
|
1165
1165
|
icon=x["action_icon"],
|
|
1166
|
+
mess=x["action_mess"],
|
|
1166
1167
|
tag=x["tag"],
|
|
1167
1168
|
child_noshow=x["child_noshow"],
|
|
1168
1169
|
child_copy_mode=x["child_copy_mode"],
|
|
@@ -111,7 +111,7 @@ def insert(table, row, q2_db=None):
|
|
|
111
111
|
return q2_db.insert(table, row)
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
def
|
|
114
|
+
def insert_if_not_exists(table, row, key_column, q2_db=None):
|
|
115
115
|
q2_db: Q2Db = get_default_db(q2_db)
|
|
116
116
|
value = row.get(key_column, "0")
|
|
117
117
|
if q2_db.get(table, f"{key_column} = '{value}'") == {}:
|
|
@@ -124,6 +124,9 @@ def insert_if_not_exist(table, row, key_column, q2_db=None):
|
|
|
124
124
|
return True
|
|
125
125
|
|
|
126
126
|
|
|
127
|
+
insert_if_not_exist = insert_if_not_exists
|
|
128
|
+
|
|
129
|
+
|
|
127
130
|
def raw_insert(table, row, q2_db=None):
|
|
128
131
|
q2_db = get_default_db(q2_db)
|
|
129
132
|
return q2_db.raw_insert(table, row)
|
|
@@ -233,6 +233,7 @@ class Q2Form(_Q2Form):
|
|
|
233
233
|
self.db,
|
|
234
234
|
)
|
|
235
235
|
form = Q2Form(f"Changelog ({self.title})")
|
|
236
|
+
form.db = self.db
|
|
236
237
|
form.add_control("/")
|
|
237
238
|
form.add_control("/h", "-")
|
|
238
239
|
form.add_control("q2_mode", "Mode", datalen=3)
|
|
@@ -290,12 +291,14 @@ class q2cursor(Q2Cursor):
|
|
|
290
291
|
def __init__(self, sql="", q2_db=None, data=[]):
|
|
291
292
|
if q2_db is None:
|
|
292
293
|
q2_db = q2app.q2_app.db_data
|
|
294
|
+
self._q2_db = q2_db
|
|
293
295
|
super().__init__(q2_db, sql, data=data)
|
|
294
296
|
if q2_db.last_sql_error:
|
|
295
297
|
print(q2_db.last_sql_error)
|
|
296
298
|
|
|
297
299
|
def q2form(self):
|
|
298
300
|
form = Q2Form(self.sql)
|
|
301
|
+
form.db = self._q2_db
|
|
299
302
|
for x in self.record(0):
|
|
300
303
|
form.add_control(x, x, datalen=250)
|
|
301
304
|
form.set_model(Q2CursorModel(self))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.212"
|
q2rad-0.1.210/q2rad/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.210"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|