pyams-catalog 2.2.0__tar.gz → 2.2.2__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.
Files changed (35) hide show
  1. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/PKG-INFO +11 -1
  2. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/docs/HISTORY.rst +10 -0
  3. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/setup.py +1 -1
  4. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/doctests/README.rst +3 -1
  5. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/query.py +1 -1
  6. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/utils.py +7 -6
  7. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog.egg-info/PKG-INFO +11 -1
  8. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/LICENSE +0 -0
  9. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/MANIFEST.in +0 -0
  10. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/docs/README.rst +0 -0
  11. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/setup.cfg +0 -0
  12. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/__init__.py +0 -0
  13. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/events.py +0 -0
  14. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/generations/__init__.py +0 -0
  15. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/i18n.py +0 -0
  16. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/include.py +0 -0
  17. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/index.py +0 -0
  18. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/interfaces.py +0 -0
  19. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/locales/fr/LC_MESSAGES/pyams_catalog.mo +0 -0
  20. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/locales/fr/LC_MESSAGES/pyams_catalog.po +0 -0
  21. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/locales/pyams_catalog.pot +0 -0
  22. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/nltk.py +0 -0
  23. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/scripts/__init__.py +0 -0
  24. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/testing.py +0 -0
  25. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/tests/__init__.py +0 -0
  26. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/tests/test_utilsdocs.py +0 -0
  27. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/tests/test_utilsdocstrings.py +0 -0
  28. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog/zmi/__init__.py +0 -0
  29. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog.egg-info/SOURCES.txt +0 -0
  30. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog.egg-info/dependency_links.txt +0 -0
  31. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog.egg-info/entry_points.txt +0 -0
  32. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog.egg-info/namespace_packages.txt +0 -0
  33. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog.egg-info/not-zip-safe +0 -0
  34. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog.egg-info/requires.txt +0 -0
  35. {pyams_catalog-2.2.0 → pyams_catalog-2.2.2}/src/pyams_catalog.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyams_catalog
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: PyAMS extensions for Hypatia catalog
5
5
  Home-page: https://pyams.readthedocs.io
6
6
  Author: Thierry Florac
@@ -51,6 +51,16 @@ indexed contents, helpers based on NLTK library for fulltext indexing, and a few
51
51
  Changelog
52
52
  =========
53
53
 
54
+ 2.2.2
55
+ -----
56
+ - updated query length getter
57
+ - updated doctests and Gitlab-CI
58
+
59
+ 2.2.1
60
+ -----
61
+ - updated index script logging
62
+ - added support for Python 3.12
63
+
54
64
  2.2.0
55
65
  -----
56
66
  - updated interfaces support in catalog indexes, so that objects which don't implement
@@ -1,6 +1,16 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 2.2.2
5
+ -----
6
+ - updated query length getter
7
+ - updated doctests and Gitlab-CI
8
+
9
+ 2.2.1
10
+ -----
11
+ - updated index script logging
12
+ - added support for Python 3.12
13
+
4
14
  2.2.0
5
15
  -----
6
16
  - updated interfaces support in catalog indexes, so that objects which don't implement
@@ -23,7 +23,7 @@ DOCS = os.path.join(os.path.dirname(__file__),
23
23
  README = os.path.join(DOCS, 'README.rst')
24
24
  HISTORY = os.path.join(DOCS, 'HISTORY.rst')
25
25
 
26
- version = '2.2.0'
26
+ version = '2.2.2'
27
27
  long_description = open(README).read() + '\n\n' + open(HISTORY).read()
28
28
 
29
29
  tests_require = [
@@ -16,6 +16,8 @@ This package is composed of a set of utility functions, usable into any Pyramid
16
16
  >>> include_zodbconn(config)
17
17
  >>> from cornice import includeme as include_cornice
18
18
  >>> include_cornice(config)
19
+ >>> from cornice_swagger import includeme as include_swagger
20
+ >>> include_swagger(config)
19
21
  >>> from pyams_utils import includeme as include_utils
20
22
  >>> include_utils(config)
21
23
  >>> from pyams_site import includeme as include_site
@@ -374,7 +376,7 @@ by the *pyams_index* command line script:
374
376
  >>> from pyams_catalog.utils import index_site
375
377
  >>> request = DummyRequest(context=app)
376
378
  >>> index_site(request, autocommit=False)
377
- Indexing: <pyams_site.site.BaseSiteRoot object at 0x... oid 0x1 in <ZODB.Connection.Connection object at 0x...>>
379
+ 1: Indexing <pyams_site.site.BaseSiteRoot object at 0x... oid 0x1 in <ZODB.Connection.Connection object at 0x...>>
378
380
  <pyams_site.site.BaseSiteRoot object at 0x... oid 0x1 in <ZODB.Connection.Connection object at 0x...>>
379
381
 
380
382
  >>> from pyams_utils.context import capture_all
@@ -85,7 +85,7 @@ class CatalogResultSet:
85
85
  yield item
86
86
 
87
87
  def __len__(self):
88
- if isinstance(self.query, ResultSet):
88
+ if isinstance(self.query, (list, tuple, ResultSet)):
89
89
  nb_docs = len(self.query)
90
90
  else:
91
91
  nb_docs = self.query[0]
@@ -38,7 +38,8 @@ __docformat__ = 'restructuredtext'
38
38
  LOGGER = logging.getLogger('PyAMS (catalog)')
39
39
 
40
40
 
41
- @adapter_config(required=ICatalog, provides=ICacheKeyValue)
41
+ @adapter_config(required=ICatalog,
42
+ provides=ICacheKeyValue)
42
43
  def catalog_key_adapter(obj):
43
44
  """Catalog key value adapter"""
44
45
  return 'catalog::{}'.format(str(sorted(obj)))
@@ -46,7 +47,7 @@ def catalog_key_adapter(obj):
46
47
 
47
48
  def index_object(obj, catalog='', ignore_notyet=False):
48
49
  """Index given object into catalog"""
49
- LOGGER.debug("Indexing object {0!r}".format(obj))
50
+ LOGGER.debug(f"Indexing object {obj!r}")
50
51
  intids = query_utility(IIntIds)
51
52
  if intids is not None:
52
53
  try:
@@ -64,7 +65,7 @@ def index_object(obj, catalog='', ignore_notyet=False):
64
65
 
65
66
  def reindex_object(obj, catalog=''):
66
67
  """Reindex given object into catalog"""
67
- LOGGER.debug("Re-indexing object {0!r}".format(obj))
68
+ LOGGER.debug(f"Re-indexing object {obj!r}")
68
69
  intids = query_utility(IIntIds)
69
70
  if intids is not None:
70
71
  object_id = intids.queryId(obj)
@@ -78,7 +79,7 @@ def reindex_object(obj, catalog=''):
78
79
 
79
80
  def unindex_object(obj, catalog=''):
80
81
  """Un-index given object from catalog"""
81
- LOGGER.debug("Un-indexing object {0!r}".format(obj))
82
+ LOGGER.debug(f"Un-indexing object {obj!r}")
82
83
  intids = query_utility(IIntIds)
83
84
  if intids is not None:
84
85
  object_id = intids.queryId(obj)
@@ -103,9 +104,9 @@ def index_site(request, autocommit=True):
103
104
  if INoAutoIndex.providedBy(document):
104
105
  continue
105
106
  if IBroken.providedBy(document):
106
- print("Skipping broken object: {0!r}".format(document))
107
+ print(f"Skipping broken object: {document!r}")
107
108
  else:
108
- print("Indexing: {0!r}".format(document))
109
+ print(f"{index+1:10}: Indexing {document!r}")
109
110
  catalog.reindex_doc(intids.register(document), document)
110
111
  if not index % 100:
111
112
  transaction.savepoint()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyams-catalog
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: PyAMS extensions for Hypatia catalog
5
5
  Home-page: https://pyams.readthedocs.io
6
6
  Author: Thierry Florac
@@ -51,6 +51,16 @@ indexed contents, helpers based on NLTK library for fulltext indexing, and a few
51
51
  Changelog
52
52
  =========
53
53
 
54
+ 2.2.2
55
+ -----
56
+ - updated query length getter
57
+ - updated doctests and Gitlab-CI
58
+
59
+ 2.2.1
60
+ -----
61
+ - updated index script logging
62
+ - added support for Python 3.12
63
+
54
64
  2.2.0
55
65
  -----
56
66
  - updated interfaces support in catalog indexes, so that objects which don't implement
File without changes
File without changes
File without changes