From 098feb5ac122b1b15604b9db757d1d8c8caa8ee8 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 15 Jul 2024 21:20:53 +0300 Subject: [PATCH 01/16] Feat(wx/ListBooks): Move download button to a separate panel [skip ci] --- m_librarian/wx/ListBooks.py | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/m_librarian/wx/ListBooks.py b/m_librarian/wx/ListBooks.py index 359bd64..dc79786 100644 --- a/m_librarian/wx/ListBooks.py +++ b/m_librarian/wx/ListBooks.py @@ -156,10 +156,6 @@ class ListBooksPanel(GridPanel): grid.AutoSizeRows() grid.Bind(wx.grid.EVT_GRID_CELL_LEFT_CLICK, self.OnClick) - dnld_button = wx.Button(self, label=u'Скачать') - self.GetSizer().Add(dnld_button, 0, wx.ALIGN_CENTER, 0) - dnld_button.Bind(wx.EVT_BUTTON, self.Download) - def toggleCB(self, row): value = self.grid.GetCellValue(row, 0) if value: @@ -222,6 +218,28 @@ class ListBooksWindow(GridWindow): window_title = u"m_Librarian: Список книг" GridPanelClass = ListBooksPanel + def OnInit(self): + GridWindow.OnInit(self) + self.button_panel = button_panel = wx.Panel(self) + + vsizer = wx.BoxSizer(wx.VERTICAL) + self.SetSizer(vsizer) + + vsizer.Add(self.panel, 10, wx.EXPAND, 0) + vsizer.Add(button_panel, 1, wx.EXPAND, 0) + + hsizer = wx.BoxSizer(wx.HORIZONTAL) + button_panel.SetSizer(hsizer) + + hsizer.AddStretchSpacer(1) + dnld_button = wx.Button(button_panel, label=u'Скачать') + hsizer.Add(dnld_button, 0, wx.ALIGN_CENTER_VERTICAL, 0) + hsizer.AddStretchSpacer(1) + dnld_button.Bind(wx.EVT_BUTTON, self.OnDownload) + + for panel in self.panel, button_panel: + panel.SetMinSize(wx.Size(100, 100)) + def InitMenu(self): GridWindow.InitMenu(self) -- 2.39.5 From 5cbaf30fa108a6f0f89ae1b3531820b27f78d7cc Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 16 Jul 2024 16:01:09 +0300 Subject: [PATCH 02/16] Refactor(web): Use classes instead of inline styles [skip ci] --- m_librarian/web/static/style.css | 8 +++ m_librarian/web/views/download.py | 6 +- m_librarian/web/views/index.py | 12 ++-- m_librarian/web/views/layout.py | 14 ++-- m_librarian/web/views/layout.tmpl | 4 +- m_librarian/web/views/list_authors.py | 16 ++--- m_librarian/web/views/list_authors.tmpl | 2 +- m_librarian/web/views/list_books.py | 18 ++--- m_librarian/web/views/list_books.tmpl | 4 +- m_librarian/web/views/search_authors.py | 12 ++-- m_librarian/web/views/search_authors_form.py | 12 ++-- .../web/views/search_authors_form.tmpl | 6 +- m_librarian/web/views/search_books.py | 12 ++-- m_librarian/web/views/search_books_form.py | 68 +++++++++---------- m_librarian/web/views/search_books_form.tmpl | 6 +- 15 files changed, 104 insertions(+), 96 deletions(-) diff --git a/m_librarian/web/static/style.css b/m_librarian/web/static/style.css index 5b80535..128d5ed 100644 --- a/m_librarian/web/static/style.css +++ b/m_librarian/web/static/style.css @@ -44,3 +44,11 @@ td, th { padding-right: 5px; border-left: 1px solid black; } + +.long { + width: 100%; +} + +.center { + text-align: center; +} diff --git a/m_librarian/web/views/download.py b/m_librarian/web/views/download.py index c207ccb..177c0d8 100644 --- a/m_librarian/web/views/download.py +++ b/m_librarian/web/views/download.py @@ -35,10 +35,10 @@ VFN=valueForName currentTime=time.time __CHEETAH_version__ = '3.3.1' __CHEETAH_versionTuple__ = (3, 3, 1, 'final', 0) -__CHEETAH_genTime__ = 1704845598.39619 -__CHEETAH_genTimestamp__ = 'Wed Jan 10 03:13:18 2024' +__CHEETAH_genTime__ = 1721134725.632482 +__CHEETAH_genTimestamp__ = 'Tue Jul 16 15:58:45 2024' __CHEETAH_src__ = 'download.tmpl' -__CHEETAH_srcLastModified__ = 'Wed Jan 10 03:10:53 2024' +__CHEETAH_srcLastModified__ = 'Tue Jul 16 15:57:52 2024' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: diff --git a/m_librarian/web/views/index.py b/m_librarian/web/views/index.py index e066e53..b70a326 100644 --- a/m_librarian/web/views/index.py +++ b/m_librarian/web/views/index.py @@ -35,12 +35,12 @@ VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time -__CHEETAH_version__ = '3.1.0' -__CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1) -__CHEETAH_genTime__ = 1527354191.441549 -__CHEETAH_genTimestamp__ = 'Sat May 26 20:03:11 2018' +__CHEETAH_version__ = '3.3.1' +__CHEETAH_versionTuple__ = (3, 3, 1, 'final', 0) +__CHEETAH_genTime__ = 1721134725.688713 +__CHEETAH_genTimestamp__ = 'Tue Jul 16 15:58:45 2024' __CHEETAH_src__ = 'index.tmpl' -__CHEETAH_srcLastModified__ = 'Sat May 26 20:03:09 2018' +__CHEETAH_srcLastModified__ = 'Tue Jul 16 15:57:52 2024' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -167,7 +167,7 @@ if not hasattr(index, '_initCheetahAttributes'): # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. -# For more information visit http://cheetahtemplate.org/ +# For more information visit https://cheetahtemplate.org/ ################################################## ## if run from command line: diff --git a/m_librarian/web/views/layout.py b/m_librarian/web/views/layout.py index 524a0b7..feae01e 100644 --- a/m_librarian/web/views/layout.py +++ b/m_librarian/web/views/layout.py @@ -32,12 +32,12 @@ VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time -__CHEETAH_version__ = '3.2.6' -__CHEETAH_versionTuple__ = (3, 2, 6, 'final', 0) -__CHEETAH_genTime__ = 1608677601.931249 -__CHEETAH_genTimestamp__ = 'Wed Dec 23 01:53:21 2020' +__CHEETAH_version__ = '3.3.1' +__CHEETAH_versionTuple__ = (3, 3, 1, 'final', 0) +__CHEETAH_genTime__ = 1721134725.743107 +__CHEETAH_genTimestamp__ = 'Tue Jul 16 15:58:45 2024' __CHEETAH_src__ = 'layout.tmpl' -__CHEETAH_srcLastModified__ = 'Wed Dec 23 01:52:26 2020' +__CHEETAH_srcLastModified__ = 'Tue Jul 16 15:57:52 2024' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -103,8 +103,8 @@ class layout(Template): - - +
+ diff --git a/m_librarian/web/views/layout.tmpl b/m_librarian/web/views/layout.tmpl index 10fc0b3..b3dbb4f 100644 --- a/m_librarian/web/views/layout.tmpl +++ b/m_librarian/web/views/layout.tmpl @@ -16,8 +16,8 @@ -

m_Librarian

\u0412\u044b\u0445\u043e\u0434
- +
+ diff --git a/m_librarian/web/views/list_authors.py b/m_librarian/web/views/list_authors.py index e1f0007..a7bf705 100644 --- a/m_librarian/web/views/list_authors.py +++ b/m_librarian/web/views/list_authors.py @@ -37,10 +37,10 @@ VFN=valueForName currentTime=time.time __CHEETAH_version__ = '3.3.1' __CHEETAH_versionTuple__ = (3, 3, 1, 'final', 0) -__CHEETAH_genTime__ = 1720485596.472826 -__CHEETAH_genTimestamp__ = 'Tue Jul 9 03:39:56 2024' +__CHEETAH_genTime__ = 1721134725.803056 +__CHEETAH_genTimestamp__ = 'Tue Jul 16 15:58:45 2024' __CHEETAH_src__ = 'list_authors.tmpl' -__CHEETAH_srcLastModified__ = 'Tue Jul 9 03:39:54 2024' +__CHEETAH_srcLastModified__ = 'Tue Jul 16 15:57:52 2024' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -101,7 +101,7 @@ class list_authors(layout): ''') if VFFSL(SL,"authors",True): # generated from line 12, col 1 - _orig_filter_20064572 = _filter + _orig_filter_98722638 = _filter filterName = u'WebSafe' if "WebSafe" in self._CHEETAH__filters: _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] @@ -115,11 +115,11 @@ class list_authors(layout): _ _ = VFFSL(SL,"getattr",False)(VFFSL(SL,"translations",True), 'ugettext', None) or VFFSL(SL,"translations.gettext",True) for column in VFFSL(SL,"columns",True): # generated from line 17, col 3 - write(u'''

m_Librarian

Выход
''') + write(u''' ''') if False: _(VFFSL(SL,"column",True)) - _v = VFFSL(SL,"_",False)(VFFSL(SL,"column",True)) # u'$_($column)' on line 18, col 36 - if _v is not None: write(_filter(_v, rawExpr=u'$_($column)')) # from line 18, col 36. + _v = VFFSL(SL,"_",False)(VFFSL(SL,"column",True)) # u'$_($column)' on line 18, col 24 + if _v is not None: write(_filter(_v, rawExpr=u'$_($column)')) # from line 18, col 24. write(u''' ''') if VFFSL(SL,"sort",True) in (VFFSL(SL,"column",True), '+'+VFFSL(SL,"column",True), '-'+VFFSL(SL,"column",True)): # generated from line 19, col 5 @@ -178,7 +178,7 @@ class list_authors(layout): ''') write(u'''
''') - _filter = self._CHEETAH__currentFilter = _orig_filter_20064572 + _filter = self._CHEETAH__currentFilter = _orig_filter_98722638 else: # generated from line 52, col 1 write(u'''

\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0430!

''') diff --git a/m_librarian/web/views/list_authors.tmpl b/m_librarian/web/views/list_authors.tmpl index 3848618..1d0c772 100644 --- a/m_librarian/web/views/list_authors.tmpl +++ b/m_librarian/web/views/list_authors.tmpl @@ -15,7 +15,7 @@ $search_authors_form(searchList=$searchList) #set $_ = $getattr($translations, 'ugettext', None) or $translations.gettext #for $column in $columns - $_($column) + $_($column) #if $sort in ($column, '+'+$column, '-'+$column) #if $sort in ($column, '+'+$column) #set $sort_param='-'+$column diff --git a/m_librarian/web/views/list_books.py b/m_librarian/web/views/list_books.py index 7a327ed..2da3e3e 100644 --- a/m_librarian/web/views/list_books.py +++ b/m_librarian/web/views/list_books.py @@ -36,10 +36,10 @@ VFN=valueForName currentTime=time.time __CHEETAH_version__ = '3.3.1' __CHEETAH_versionTuple__ = (3, 3, 1, 'final', 0) -__CHEETAH_genTime__ = 1718725757.733093 -__CHEETAH_genTimestamp__ = 'Tue Jun 18 18:49:17 2024' +__CHEETAH_genTime__ = 1721134725.866559 +__CHEETAH_genTimestamp__ = 'Tue Jul 16 15:58:45 2024' __CHEETAH_src__ = 'list_books.tmpl' -__CHEETAH_srcLastModified__ = 'Tue Jun 18 18:49:15 2024' +__CHEETAH_srcLastModified__ = 'Tue Jul 16 15:57:52 2024' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -117,7 +117,7 @@ function toggleSeries(name, value) { ''') if VFFSL(SL,"books_by_author",True): # generated from line 31, col 1 - _orig_filter_17563757 = _filter + _orig_filter_31788103 = _filter filterName = u'WebSafe' if "WebSafe" in self._CHEETAH__filters: _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] @@ -134,11 +134,11 @@ function toggleSeries(name, value) { _ _ = VFFSL(SL,"getattr",False)(VFFSL(SL,"translations",True), 'ugettext', None) or VFFSL(SL,"translations.gettext",True) for column in VFFSL(SL,"columns",True): # generated from line 39, col 3 - write(u''' ''') + write(u''' ''') if False: _(VFFSL(SL,"column",True)) - _v = VFFSL(SL,"_",False)(VFFSL(SL,"column",True)) # u'$_($column)' on line 40, col 36 - if _v is not None: write(_filter(_v, rawExpr=u'$_($column)')) # from line 40, col 36. + _v = VFFSL(SL,"_",False)(VFFSL(SL,"column",True)) # u'$_($column)' on line 40, col 24 + if _v is not None: write(_filter(_v, rawExpr=u'$_($column)')) # from line 40, col 24. write(u''' ''') write(u''' @@ -225,12 +225,12 @@ function toggleSeries(name, value) { + write(u'''" class="center"> ''') - _filter = self._CHEETAH__currentFilter = _orig_filter_17563757 + _filter = self._CHEETAH__currentFilter = _orig_filter_31788103 else: # generated from line 89, col 1 write(u'''

\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u043a\u043d\u0438\u0433\u0438!

''') diff --git a/m_librarian/web/views/list_books.tmpl b/m_librarian/web/views/list_books.tmpl index 3127fec..4a5c283 100644 --- a/m_librarian/web/views/list_books.tmpl +++ b/m_librarian/web/views/list_books.tmpl @@ -37,7 +37,7 @@ function toggleSeries(name, value) { onClick="toggleAll(this.checked)"> #set $_ = $getattr($translations, 'ugettext', None) or $translations.gettext #for $column in $columns - $_($column) + $_($column) #end for #set $columns1 = $len($columns)+1 @@ -81,7 +81,7 @@ $series, 1#slurp #end for #end for - + diff --git a/m_librarian/web/views/search_authors.py b/m_librarian/web/views/search_authors.py index cfa9083..1218736 100644 --- a/m_librarian/web/views/search_authors.py +++ b/m_librarian/web/views/search_authors.py @@ -34,12 +34,12 @@ VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time -__CHEETAH_version__ = '3.1.0' -__CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1) -__CHEETAH_genTime__ = 1522961824.208664 -__CHEETAH_genTimestamp__ = 'Thu Apr 5 23:57:04 2018' +__CHEETAH_version__ = '3.3.1' +__CHEETAH_versionTuple__ = (3, 3, 1, 'final', 0) +__CHEETAH_genTime__ = 1721134725.921719 +__CHEETAH_genTimestamp__ = 'Tue Jul 16 15:58:45 2024' __CHEETAH_src__ = 'search_authors.tmpl' -__CHEETAH_srcLastModified__ = 'Thu Apr 5 23:54:16 2018' +__CHEETAH_srcLastModified__ = 'Tue Jul 16 15:57:52 2024' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -162,7 +162,7 @@ if not hasattr(search_authors, '_initCheetahAttributes'): # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. -# For more information visit http://cheetahtemplate.org/ +# For more information visit https://cheetahtemplate.org/ ################################################## ## if run from command line: diff --git a/m_librarian/web/views/search_authors_form.py b/m_librarian/web/views/search_authors_form.py index 78a1c36..0677349 100644 --- a/m_librarian/web/views/search_authors_form.py +++ b/m_librarian/web/views/search_authors_form.py @@ -35,10 +35,10 @@ VFN=valueForName currentTime=time.time __CHEETAH_version__ = '3.3.1' __CHEETAH_versionTuple__ = (3, 3, 1, 'final', 0) -__CHEETAH_genTime__ = 1720463312.154712 -__CHEETAH_genTimestamp__ = 'Mon Jul 8 21:28:32 2024' +__CHEETAH_genTime__ = 1721134725.976445 +__CHEETAH_genTimestamp__ = 'Tue Jul 16 15:58:45 2024' __CHEETAH_src__ = 'search_authors_form.tmpl' -__CHEETAH_srcLastModified__ = 'Mon Jul 8 21:28:30 2024' +__CHEETAH_srcLastModified__ = 'Tue Jul 16 15:57:52 2024' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -142,12 +142,12 @@ class search_authors_form(Template): ## START - generated method body write(u'''
-
+
+ write(u'''" type="text" class="long">
\u0420\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u0435/\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435
-
+
diff --git a/m_librarian/web/views/search_authors_form.tmpl b/m_librarian/web/views/search_authors_form.tmpl index 10fa94b..6908663 100644 --- a/m_librarian/web/views/search_authors_form.tmpl +++ b/m_librarian/web/views/search_authors_form.tmpl @@ -11,9 +11,9 @@ checked#slurp #end if #end def
-
+
+ ''))" type="text" class="long">
Подстрока в начале @@ -25,7 +25,7 @@ checked#slurp Различать прописные/строчные
-
+
diff --git a/m_librarian/web/views/search_books.py b/m_librarian/web/views/search_books.py index 2e8636b..6c4984c 100644 --- a/m_librarian/web/views/search_books.py +++ b/m_librarian/web/views/search_books.py @@ -34,12 +34,12 @@ VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time -__CHEETAH_version__ = '3.1.0' -__CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1) -__CHEETAH_genTime__ = 1527354048.738532 -__CHEETAH_genTimestamp__ = 'Sat May 26 20:00:48 2018' +__CHEETAH_version__ = '3.3.1' +__CHEETAH_versionTuple__ = (3, 3, 1, 'final', 0) +__CHEETAH_genTime__ = 1721134726.030654 +__CHEETAH_genTimestamp__ = 'Tue Jul 16 15:58:46 2024' __CHEETAH_src__ = 'search_books.tmpl' -__CHEETAH_srcLastModified__ = 'Sat May 26 19:59:55 2018' +__CHEETAH_srcLastModified__ = 'Tue Jul 16 15:57:52 2024' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -162,7 +162,7 @@ if not hasattr(search_books, '_initCheetahAttributes'): # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. -# For more information visit http://cheetahtemplate.org/ +# For more information visit https://cheetahtemplate.org/ ################################################## ## if run from command line: diff --git a/m_librarian/web/views/search_books_form.py b/m_librarian/web/views/search_books_form.py index 01b8770..2046375 100644 --- a/m_librarian/web/views/search_books_form.py +++ b/m_librarian/web/views/search_books_form.py @@ -33,12 +33,12 @@ VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time -__CHEETAH_version__ = '3.3.3' -__CHEETAH_versionTuple__ = (3, 3, 3, 'final', 0) -__CHEETAH_genTime__ = 1704324466.1203597 -__CHEETAH_genTimestamp__ = 'Thu Jan 4 02:27:46 2024' +__CHEETAH_version__ = '3.3.1' +__CHEETAH_versionTuple__ = (3, 3, 1, 'final', 0) +__CHEETAH_genTime__ = 1721134726.086564 +__CHEETAH_genTimestamp__ = 'Tue Jul 16 15:58:46 2024' __CHEETAH_src__ = 'search_books_form.tmpl' -__CHEETAH_srcLastModified__ = 'Thu Jan 4 02:27:28 2024' +__CHEETAH_srcLastModified__ = 'Tue Jul 16 15:57:52 2024' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -87,7 +87,7 @@ class search_books_form(Template): ## START - generated method body if VFFSL(SL,"getVar",False)('search_type', '') == VFFSL(SL,"value",True): # generated from line 4, col 1 - write('''checked''') + write(u'''checked''') ######################################## ## END - generated method body @@ -115,7 +115,7 @@ class search_books_form(Template): ## START - generated method body if VFFSL(SL,"getVar",False)('case_sensitive', None): # generated from line 9, col 1 - write('''checked''') + write(u'''checked''') ######################################## ## END - generated method body @@ -143,7 +143,7 @@ class search_books_form(Template): ## START - generated method body if VFFSL(SL,"getVar",False)('use_filters', VFN(VFFSL(SL,"get_config",False)(),"getint",False)('filters', 'use_in_search_forms', 1)): # generated from line 14, col 1 - write('''checked''') + write(u'''checked''') ######################################## ## END - generated method body @@ -169,43 +169,43 @@ class search_books_form(Template): ######################################## ## START - generated method body - write('''
-
+ write(u''' +
+ if _v is not None: write(_filter(_v, rawExpr=u"$html_escape($getVar('search_books',\n ''))")) # from line 20, col 37. + write(u'''" type="text" class="long">
- Подстрока в начале + _v = VFFSL(SL,"search_type_checked",False)('start') # u"$search_type_checked('start')" on line 23, col 43 + if _v is not None: write(_filter(_v, rawExpr=u"$search_type_checked('start')")) # from line 23, col 43. + write(u''' type="radio"> + \u041f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0430 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 - Подстрока + _v = VFFSL(SL,"search_type_checked",False)('substring') # u"$search_type_checked('substring')" on line 25, col 47 + if _v is not None: write(_filter(_v, rawExpr=u"$search_type_checked('substring')")) # from line 25, col 47. + write(u''' type="radio"> + \u041f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0430 - Точное совпадение + _v = VFFSL(SL,"search_type_checked",False)('full') # u"$search_type_checked('full')" on line 27, col 42 + if _v is not None: write(_filter(_v, rawExpr=u"$search_type_checked('full')")) # from line 27, col 42. + write(u''' type="radio"> + \u0422\u043e\u0447\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435
- Различать прописные/строчные + _v = VFFSL(SL,"case_sensitive_checked",True) # u'$case_sensitive_checked' on line 30, col 48 + if _v is not None: write(_filter(_v, rawExpr=u'$case_sensitive_checked')) # from line 30, col 48. + write(u'''> + \u0420\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u0435/\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 - Использовать фильтры + _v = VFFSL(SL,"use_filters_check",True) # u'$use_filters_check' on line 32, col 45 + if _v is not None: write(_filter(_v, rawExpr=u'$use_filters_check')) # from line 32, col 45. + write(u'''> + \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440\u044b
-
- +
+
''') diff --git a/m_librarian/web/views/search_books_form.tmpl b/m_librarian/web/views/search_books_form.tmpl index 6ac0ca7..6bac07a 100644 --- a/m_librarian/web/views/search_books_form.tmpl +++ b/m_librarian/web/views/search_books_form.tmpl @@ -16,9 +16,9 @@ checked#slurp #end if #end def
-
+
+ ''))" type="text" class="long">
Подстрока в начале @@ -32,7 +32,7 @@ checked#slurp Использовать фильтры
-
+
-- 2.39.5 From 0585baf663f897287a3010498c208db66d0b64c7 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 16 Jul 2024 20:50:54 +0300 Subject: [PATCH 03/16] Feat(web): Fix button "Save" at the bottom of the screen [skip ci] --- m_librarian/web/static/style.css | 13 +++++++++++++ m_librarian/web/views/list_books.py | 23 ++++++++++------------- m_librarian/web/views/list_books.tmpl | 8 ++++---- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/m_librarian/web/static/style.css b/m_librarian/web/static/style.css index 128d5ed..98c2ef5 100644 --- a/m_librarian/web/static/style.css +++ b/m_librarian/web/static/style.css @@ -52,3 +52,16 @@ td, th { .center { text-align: center; } + +#list_books { + width: 100%; + margin-bottom: 3ex; +} + +#bottom { + position: fixed; + bottom: 0; + width: 100%; + height: 3ex; + background-color: white; +} diff --git a/m_librarian/web/views/list_books.py b/m_librarian/web/views/list_books.py index 2da3e3e..0b0fa39 100644 --- a/m_librarian/web/views/list_books.py +++ b/m_librarian/web/views/list_books.py @@ -36,10 +36,10 @@ VFN=valueForName currentTime=time.time __CHEETAH_version__ = '3.3.1' __CHEETAH_versionTuple__ = (3, 3, 1, 'final', 0) -__CHEETAH_genTime__ = 1721134725.866559 -__CHEETAH_genTimestamp__ = 'Tue Jul 16 15:58:45 2024' +__CHEETAH_genTime__ = 1721152062.147147 +__CHEETAH_genTimestamp__ = 'Tue Jul 16 20:47:42 2024' __CHEETAH_src__ = 'list_books.tmpl' -__CHEETAH_srcLastModified__ = 'Tue Jul 16 15:57:52 2024' +__CHEETAH_srcLastModified__ = 'Tue Jul 16 20:47:39 2024' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -117,7 +117,7 @@ function toggleSeries(name, value) { ''') if VFFSL(SL,"books_by_author",True): # generated from line 31, col 1 - _orig_filter_31788103 = _filter + _orig_filter_65030134 = _filter filterName = u'WebSafe' if "WebSafe" in self._CHEETAH__filters: _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] @@ -125,7 +125,7 @@ function toggleSeries(name, value) { _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''
- +
@@ -221,16 +221,13 @@ function toggleSeries(name, value) { ''') write(u''' ''') - write(u''' - - -
+ write(u''' +
+ +
''') - _filter = self._CHEETAH__currentFilter = _orig_filter_31788103 + _filter = self._CHEETAH__currentFilter = _orig_filter_65030134 else: # generated from line 89, col 1 write(u'''

\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u043a\u043d\u0438\u0433\u0438!

''') diff --git a/m_librarian/web/views/list_books.tmpl b/m_librarian/web/views/list_books.tmpl index 4a5c283..2557a50 100644 --- a/m_librarian/web/views/list_books.tmpl +++ b/m_librarian/web/views/list_books.tmpl @@ -31,7 +31,7 @@ function toggleSeries(name, value) { #if $books_by_author #filter WebSafe
- +
@@ -80,10 +80,10 @@ $series, 1#slurp #end for #end for - - -
+
+ +
#end filter WebSafe #else -- 2.39.5 From ad78d036622b06ec8b9b42cbc3afe96316700523 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 18 Jul 2024 17:32:57 +0300 Subject: [PATCH 04/16] Version 0.4.1: Fix button "Save" at the bottom of the screen Make it always visible. [skip ci] --- docs-ru/news.rst | 5 +++++ docs/news.rst | 5 +++++ m_librarian/__version__.py | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs-ru/news.rst b/docs-ru/news.rst index fbbb0d3..17d15b3 100644 --- a/docs-ru/news.rst +++ b/docs-ru/news.rst @@ -1,6 +1,11 @@ Новости ======= +Версия 0.4.1 (2024-07-18) +------------------------- + +* Зафиксировать кнопку "Сохранить" в нижней части экрана, всегда видимую. + Версия 0.4.0 (2024-07-09) ------------------------- diff --git a/docs/news.rst b/docs/news.rst index e9a23ac..88c7ed9 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -1,6 +1,11 @@ News ==== +Version 0.4.1 (2024-07-18) +-------------------------- + +* Fix button "Save" at the bottom of the screen to be always visible. + Version 0.4.0 (2024-07-09) -------------------------- diff --git a/m_librarian/__version__.py b/m_librarian/__version__.py index abeeedb..f0ede3d 100644 --- a/m_librarian/__version__.py +++ b/m_librarian/__version__.py @@ -1 +1 @@ -__version__ = '0.4.0' +__version__ = '0.4.1' -- 2.39.5 From a5833756dd889c53ccc1302cbd4bf05da566d39c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 24 Jul 2024 18:38:54 +0300 Subject: [PATCH 05/16] CI(GHActions): Switch to `setup-miniconda` --- .github/workflows/run-tests.yaml | 16 ++++++++++++---- docs-ru/news.rst | 5 +++++ docs/news.rst | 5 +++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index df8183c..73e12a7 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -29,15 +29,19 @@ jobs: # Setup Python/pip - uses: actions/checkout@v4 - - uses: s-weigand/setup-conda@v1 + - uses: conda-incubator/setup-miniconda@v3 with: - conda-channels: conda-forge + miniforge-version: latest python-version: ${{ matrix.python-version }} if: ${{ !contains(fromJSON(env.not_in_conda), matrix.python-version) }} - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} if: ${{ contains(fromJSON(env.not_in_conda), matrix.python-version) }} + - uses: actions/cache@v3 + with: + path: ~/conda_pkgs_dir + key: ${{ runner.os }}-conda - name: Cache pip uses: actions/cache@v3 with: @@ -52,8 +56,10 @@ jobs: python -m pip install --upgrade pip setuptools wheel pip --version pip install --upgrade virtualenv "tox >= 3.15, < 4" + shell: bash -el {0} - name: Set TOXENV run: | + python -c " import os, sys ld_library_path = None pyver = '%d%d' % tuple(sys.version_info[:2]) @@ -67,12 +73,14 @@ jobs: toxenv += '-w32' with open(os.environ['GITHUB_ENV'], 'a') as f: if ld_library_path: - f.write('LD_LIBRARY_PATH=' + ld_library_path + '\n') + f.write('LD_LIBRARY_PATH=' + ld_library_path + '\n') f.write('TOXENV=' + toxenv + '\n') - shell: python + " + shell: bash -el {0} - name: Run tox run: | python -c "import os; print(os.environ['TOXENV'])" tox --version tox + shell: bash -el {0} diff --git a/docs-ru/news.rst b/docs-ru/news.rst index 17d15b3..3a8b578 100644 --- a/docs-ru/news.rst +++ b/docs-ru/news.rst @@ -1,6 +1,11 @@ Новости ======= +Version 0.4.2 (2024-??-??) +-------------------------- + +* CI(GHActions): Переключиться на ``setup-miniconda``. + Версия 0.4.1 (2024-07-18) ------------------------- diff --git a/docs/news.rst b/docs/news.rst index 88c7ed9..ed28ae4 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -1,6 +1,11 @@ News ==== +Version 0.4.2 (2024-??-??) +-------------------------- + +* CI(GHActions): Switch to ``setup-miniconda``. + Version 0.4.1 (2024-07-18) -------------------------- -- 2.39.5 From aa6d5551aabf2abcb1077bd7fa7e543caf1ac0b9 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 24 Jul 2024 18:42:24 +0300 Subject: [PATCH 06/16] CI(GHActions): Exclude Python 2.7 at w32 It requires VC9 and cannot be installed. --- .github/workflows/run-tests.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 73e12a7..dc51d9d 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -11,6 +11,9 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + exclude: + - os: windows-latest + python-version: "2.7" include: - os: ubuntu-latest os-name: Linux -- 2.39.5 From 03343cbccfce44b4a295492301ab0d2e0aa057bf Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 24 Jul 2024 18:49:25 +0300 Subject: [PATCH 07/16] Style(m_librarian/search): Fix `flake8` E111 indentation is not a multiple of 4 --- m_librarian/search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m_librarian/search.py b/m_librarian/search.py index d3b1008..b0ac090 100644 --- a/m_librarian/search.py +++ b/m_librarian/search.py @@ -1,7 +1,7 @@ try: - from urllib.parse import quote + from urllib.parse import quote except ImportError: - from urllib import quote + from urllib import quote from sqlobject.sqlbuilder import AND, OR, func, CONCAT -- 2.39.5 From 93888e25aa5845c3edee63305689bc01c95c170d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 24 Jul 2024 18:57:07 +0300 Subject: [PATCH 08/16] CI(GHActions): Exclude Python 2.7-3.7 at MacOS-arm64 Absent in conda. --- .github/workflows/run-tests.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index dc51d9d..c2bd4f7 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -14,6 +14,14 @@ jobs: exclude: - os: windows-latest python-version: "2.7" + - os: macos-latest + python-version: "2.7" + - os: macos-latest + python-version: "3.5" + - os: macos-latest + python-version: "3.6" + - os: macos-latest + python-version: "3.7" include: - os: ubuntu-latest os-name: Linux -- 2.39.5 From 3108cdd7b3c09cd4c0289162ad527c9edabb5b5d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 26 Jul 2024 04:34:09 +0300 Subject: [PATCH 09/16] Build(setup.py): Improve classifiers [skip ci] --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8670397..c5bc7f9 100755 --- a/setup.py +++ b/setup.py @@ -41,8 +41,10 @@ setup( keywords=['books', 'library', 'Flibusta', 'LibRusEc', 'lib.rus.ec'], platforms="Any", classifiers=[ - 'Development Status :: 2 - Pre-Alpha', + 'Development Status :: 4 - Beta', 'Environment :: Console', + 'Environment :: Web Environment', + 'Environment :: X11 Applications', 'Intended Audience :: End Users/Desktop', 'License :: OSI Approved :: GNU General Public License (GPL)', 'Natural Language :: English', -- 2.39.5 From 802f41b4492f0a468397394c02d75627b5d49856 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 24 Sep 2024 21:32:47 +0300 Subject: [PATCH 10/16] CI(GHActions): Python 3.13 --- .github/workflows/run-tests.yaml | 3 ++- docs-ru/news.rst | 2 ++ docs/news.rst | 2 ++ setup.py | 1 + tox.ini | 8 ++++---- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index c2bd4f7..1edecfd 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -10,7 +10,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] exclude: - os: windows-latest python-version: "2.7" @@ -42,6 +42,7 @@ jobs: - uses: actions/checkout@v4 - uses: conda-incubator/setup-miniconda@v3 with: + channels: conda-forge, conda-forge/label/python_rc miniforge-version: latest python-version: ${{ matrix.python-version }} if: ${{ !contains(fromJSON(env.not_in_conda), matrix.python-version) }} diff --git a/docs-ru/news.rst b/docs-ru/news.rst index 3a8b578..7929319 100644 --- a/docs-ru/news.rst +++ b/docs-ru/news.rst @@ -6,6 +6,8 @@ Version 0.4.2 (2024-??-??) * CI(GHActions): Переключиться на ``setup-miniconda``. +* Tests, CI(GHActions): Python 3.13. + Версия 0.4.1 (2024-07-18) ------------------------- diff --git a/docs/news.rst b/docs/news.rst index ed28ae4..3be9c0a 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -6,6 +6,8 @@ Version 0.4.2 (2024-??-??) * CI(GHActions): Switch to ``setup-miniconda``. +* Tests, CI(GHActions): Python 3.13. + Version 0.4.1 (2024-07-18) -------------------------- diff --git a/setup.py b/setup.py index c5bc7f9..ce8c01e 100755 --- a/setup.py +++ b/setup.py @@ -62,6 +62,7 @@ setup( 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', ], packages=['m_librarian', 'm_librarian.web'], package_data={'m_librarian': [ diff --git a/tox.ini b/tox.ini index aff3292..096ceed 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 3.15 -envlist = py27-sqlite,py3{4,5,6,7,8,9,10,11}-sqlite,py{27,37,312}-flake8 +envlist = py27-sqlite,py3{4,5,6,7,8,9,10,11,12,13}-sqlite,py{27,37,312}-flake8 # Base test environment settings [testenv] @@ -13,13 +13,13 @@ deps = passenv = CI DISTUTILS_USE_SDK MSSdk INCLUDE LIB WINDIR platform = linux|darwin -[testenv:py{27,34,35,36,37,38,39,310,311,312}-sqlite] +[testenv:py{27,34,35,36,37,38,39,310,311,312,313}-sqlite] commands = {[testenv]commands} -rm.py -f /tmp/test.sqdb {envpython} -m pytest -D sqlite:///tmp/test.sqdb -[testenv:py{27,34,35,36,37,38,39,310,311,312}-sqlite-w32] +[testenv:py{27,34,35,36,37,38,39,310,311,312,313}-sqlite-w32] platform = win32 commands = {[testenv]commands} @@ -28,7 +28,7 @@ commands = rm.py -f {env:TEMP}/test.sqdb # flake8 -[testenv:py{27,34,35,36,37,38,39,310,311,312}-flake8] +[testenv:py{27,34,35,36,37,38,39,310,311,312,313}-flake8] deps = flake8 pytest < 7.0 -- 2.39.5 From 170d2bf8ba7192b1ef2f45260f4af9d692fdf9f6 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 26 Sep 2024 13:47:24 +0300 Subject: [PATCH 11/16] Build(requirements): Fix Python version at 2.7 There will never be 2.8. [skip ci] --- devscripts/requirements/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devscripts/requirements/requirements.txt b/devscripts/requirements/requirements.txt index 94cef49..44cc430 100644 --- a/devscripts/requirements/requirements.txt +++ b/devscripts/requirements/requirements.txt @@ -1,3 +1,3 @@ -SQLObject>=2.2.1; python_version >= '2.7' and python_version < '3.0' +SQLObject>=2.2.1; python_version == '2.7' SQLObject>=3.0.0; python_version >= '3.4' m_lib.defenc>=1.0 -- 2.39.5 From 9cb9a7c7b7411a33c238acaf976e824a3377df6d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 9 Dec 2024 19:31:43 +0300 Subject: [PATCH 12/16] Build(.gitattributes): Simplify [skip ci] --- .gitattributes | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index cf217cc..e4504cf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1 @@ .git* export-ignore -/README.rus.txt encoding=utf-8 -*.py encoding=utf-8 -*.rst encoding=utf-8 -*.txt text -- 2.39.5 From 617ccf879424ec3d9524cd83af16f772dcfa47c9 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 9 Dec 2024 19:33:07 +0300 Subject: [PATCH 13/16] Docs(glst): Convert to UTF-8 [skip ci] --- m_librarian/glst/.gitattributes | 3 +-- m_librarian/glst/README.rus.txt | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/m_librarian/glst/.gitattributes b/m_librarian/glst/.gitattributes index ba08f50..76b5f39 100644 --- a/m_librarian/glst/.gitattributes +++ b/m_librarian/glst/.gitattributes @@ -1,3 +1,2 @@ /License.txt encoding=windows-1251 eol=CRLF -/README.rus.txt encoding=koi8-r -/genres_*.glst text encoding=utf-8 eol=CRLF +/genres_*.glst eol=CRLF diff --git a/m_librarian/glst/README.rus.txt b/m_librarian/glst/README.rus.txt index 2dbd962..5880a9f 100644 --- a/m_librarian/glst/README.rus.txt +++ b/m_librarian/glst/README.rus.txt @@ -1,25 +1,25 @@ -æÁÊÌÙ ÓÏ ÓÐÉÓËÁÍÉ ÖÁÎÒÏ× (genres_*.glst) ×ÚÑÔÙ ÉÚ ÐÒÏÇÒÁÍÍÙ MyHomeLib. -ðÒÏÇÒÁÍÍÁ Ñ×ÌÑÅÔÓÑ Ó×ÏÂÏÄÎÏÊ, ÒÁÓÐÒÏÓÔÒÁÎÑÅÔÓÑ ÐÏÄ ÌÉÃÅÎÚÉÅÊ ÔÉÐÁ BSD. ôÏÞÎÙÅ -ÕÓÌÏ×ÉÑ ÌÉÃÅÎÚÉÉ ÓÍ. × ÆÁÊÌÅ License.txt. äÏÍÁÛÎÑÑ ÓÔÒÁÎÉÃÁ ÐÒÏÇÒÁÍÍÙ: +Файлы со списками жанров (genres_*.glst) взяты из программы MyHomeLib. +Программа является свободной, распространяется под лицензией типа BSD. Точные +условия лицензии см. в файле License.txt. Домашняя страница программы: http://myhomelib.org/ -óÔÒÕËÔÕÒÁ inp: https://forum.myhomelib.org/viewtopic.php?f=17&t=16 -óÐÉÓÏË ËÏÌÏÎÏË ÌÉÂÏ × ÆÁÊÌÅ structure.info, ÌÉÂÏ +Структура inp: https://forum.myhomelib.org/viewtopic.php?f=17&t=16 +Список колонок либо в файле structure.info, либо -óÔÁÎÄÁÒÔÎÁÑ ÓÔÒÕËÔÕÒÁ (librusec.inpx É librusec_usr.inpx): +Стандартная структура (librusec.inpx и librusec_usr.inpx): AUTHOR;GENRE;TITLE;SERIES;SERNO;FILE;SIZE;LIBID;DEL;EXT;DATE; -óÔÒÕËÔÕÒÁ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌØÓËÉÈ ËÏÌÌÅËÃÉÊ: +Структура для пользовательских коллекций: AUTHOR;GENRE;TITLE;SERIES;SERNO;FILE;SIZE;LIBID;DEL;EXT;DATE;INSNO;FOLDER; -îÏ×ÙÊ librusec.inpx: +Новый librusec.inpx: AUTHOR;GENRE;TITLE;SERIES;SERNO;FILE;SIZE;LIBID;DEL;EXT;DATE;LANG;LIBRATE;KEYWORDS; -óËÁÞÁÔØ: +Скачать: http://myhomelib.org/download/inpx/librusec_local_fb2.inpx -http://myhomelib.org/download/inpx/librusec_local_usr.inpx (ÎÅ ÏÂÎÏ×ÌÑÅÔÓÑ) -http://myhomelib.org/download/inpx/librusec_local_all.inpx (ÎÅ ÏÂÎÏ×ÌÑÅÔÓÑ) +http://myhomelib.org/download/inpx/librusec_local_usr.inpx (не обновляется) +http://myhomelib.org/download/inpx/librusec_local_all.inpx (не обновляется) -- 2.39.5 From 4b9bd5e6f4581a8757bbc64043e82c757bcb114a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 20 Dec 2024 18:52:06 +0300 Subject: [PATCH 14/16] Build: For Python 3.13 SQLObject requires unreleased FormEncode Install SQLObject and FormEncode from GitHub. --- devscripts/requirements/requirements.txt | 3 ++- setup.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/devscripts/requirements/requirements.txt b/devscripts/requirements/requirements.txt index 44cc430..8829f81 100644 --- a/devscripts/requirements/requirements.txt +++ b/devscripts/requirements/requirements.txt @@ -1,3 +1,4 @@ SQLObject>=2.2.1; python_version == '2.7' -SQLObject>=3.0.0; python_version >= '3.4' +SQLObject>=3.0.0; python_version >= '3.4' and python_version <= '3.12' +SQLObject @ git+https://github.com/sqlobject/sqlobject.git#egg=sqlobject ; python_version >= '3.13' m_lib.defenc>=1.0 diff --git a/setup.py b/setup.py index ce8c01e..748f17e 100755 --- a/setup.py +++ b/setup.py @@ -76,7 +76,10 @@ setup( python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', install_requires=[ 'SQLObject>=2.2.1; python_version=="2.7"', - 'SQLObject>=3.0.0; python_version>="3.4"', + 'SQLObject>=3.0.0; python_version>="3.4" and python_version<="3.12"', + "SQLObject @ " + "git+https://github.com/sqlobject/sqlobject.git#egg=sqlobject" + " ; python_version >= '3.13'", 'm_lib.defenc>=1.0', ], extras_require={ -- 2.39.5 From 40ff289ac03e655cd91bf9247899c8ee87a1513c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 13 Jan 2025 19:50:12 +0300 Subject: [PATCH 15/16] CI(GHActions): Upgrade `setup-python` and `cache` actions --- .github/workflows/run-tests.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 1edecfd..6e5c407 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -46,16 +46,16 @@ jobs: miniforge-version: latest python-version: ${{ matrix.python-version }} if: ${{ !contains(fromJSON(env.not_in_conda), matrix.python-version) }} - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} if: ${{ contains(fromJSON(env.not_in_conda), matrix.python-version) }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/conda_pkgs_dir key: ${{ runner.os }}-conda - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ matrix.pip-cache-path }} key: ${{ runner.os }}-pip -- 2.39.5 From 4ae9e869eefcf18796ff83250ddf3755c4170d8c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 14 Jan 2025 00:36:53 +0300 Subject: [PATCH 16/16] Tests(tox): Change syntax for `envlist` `[testenv:]` doesn't allow lists like `[testenv:py27,py3{4,5}]`; it only allows syntax like `[testenv:py{27,34,35}]`. This commit changes syntax for `envlist` to make it closer to `[testenv:]`. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 096ceed..c41a511 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 3.15 -envlist = py27-sqlite,py3{4,5,6,7,8,9,10,11,12,13}-sqlite,py{27,37,312}-flake8 +envlist = py{27,34,35,36,37,38,39,310,311,312,313}-sqlite,py{27,37,312}-flake8 # Base test environment settings [testenv] -- 2.39.5