experimental.gracefulblobmissing 2.0__tar.gz → 3.0.0__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.
- experimental.gracefulblobmissing-2.0/CHANGES.rst → experimental_gracefulblobmissing-3.0.0/CHANGES.md +21 -18
- experimental_gracefulblobmissing-3.0.0/MANIFEST.in +7 -0
- experimental_gracefulblobmissing-3.0.0/PKG-INFO +134 -0
- experimental_gracefulblobmissing-3.0.0/README.md +41 -0
- experimental_gracefulblobmissing-3.0.0/docs/INSTALL.md +50 -0
- experimental_gracefulblobmissing-3.0.0/pyproject.toml +177 -0
- {experimental.gracefulblobmissing-2.0 → experimental_gracefulblobmissing-3.0.0}/setup.py +16 -20
- experimental_gracefulblobmissing-3.0.0/src/experimental/gracefulblobmissing/__init__.py +1 -0
- experimental_gracefulblobmissing-3.0.0/src/experimental/gracefulblobmissing/configure.zcml +49 -0
- {experimental.gracefulblobmissing-2.0 → experimental_gracefulblobmissing-3.0.0/src}/experimental/gracefulblobmissing/patches.py +10 -13
- experimental_gracefulblobmissing-3.0.0/src/experimental/gracefulblobmissing/tests.py +62 -0
- experimental_gracefulblobmissing-3.0.0/src/experimental.gracefulblobmissing.egg-info/PKG-INFO +134 -0
- experimental_gracefulblobmissing-3.0.0/src/experimental.gracefulblobmissing.egg-info/SOURCES.txt +20 -0
- {experimental.gracefulblobmissing-2.0 → experimental_gracefulblobmissing-3.0.0/src}/experimental.gracefulblobmissing.egg-info/requires.txt +1 -1
- experimental.gracefulblobmissing-2.0/MANIFEST.in +0 -6
- experimental.gracefulblobmissing-2.0/PKG-INFO +0 -134
- experimental.gracefulblobmissing-2.0/README.rst +0 -57
- experimental.gracefulblobmissing-2.0/docs/INSTALL.txt +0 -43
- experimental.gracefulblobmissing-2.0/experimental/__init__.py +0 -6
- experimental.gracefulblobmissing-2.0/experimental/gracefulblobmissing/__init__.py +0 -2
- experimental.gracefulblobmissing-2.0/experimental/gracefulblobmissing/configure.zcml +0 -43
- experimental.gracefulblobmissing-2.0/experimental/gracefulblobmissing/tests.py +0 -57
- experimental.gracefulblobmissing-2.0/experimental.gracefulblobmissing.egg-info/PKG-INFO +0 -134
- experimental.gracefulblobmissing-2.0/experimental.gracefulblobmissing.egg-info/SOURCES.txt +0 -21
- experimental.gracefulblobmissing-2.0/experimental.gracefulblobmissing.egg-info/namespace_packages.txt +0 -1
- {experimental.gracefulblobmissing-2.0 → experimental_gracefulblobmissing-3.0.0}/docs/LICENSE.GPL +0 -0
- {experimental.gracefulblobmissing-2.0 → experimental_gracefulblobmissing-3.0.0}/docs/LICENSE.txt +0 -0
- {experimental.gracefulblobmissing-2.0 → experimental_gracefulblobmissing-3.0.0}/setup.cfg +0 -0
- {experimental.gracefulblobmissing-2.0 → experimental_gracefulblobmissing-3.0.0/src}/experimental/gracefulblobmissing/dummies/blob.png +0 -0
- {experimental.gracefulblobmissing-2.0 → experimental_gracefulblobmissing-3.0.0/src}/experimental.gracefulblobmissing.egg-info/dependency_links.txt +0 -0
- {experimental.gracefulblobmissing-2.0 → experimental_gracefulblobmissing-3.0.0/src}/experimental.gracefulblobmissing.egg-info/entry_points.txt +0 -0
- {experimental.gracefulblobmissing-2.0 → experimental_gracefulblobmissing-3.0.0/src}/experimental.gracefulblobmissing.egg-info/not-zip-safe +0 -0
- {experimental.gracefulblobmissing-2.0 → experimental_gracefulblobmissing-3.0.0/src}/experimental.gracefulblobmissing.egg-info/top_level.txt +0 -0
experimental.gracefulblobmissing-2.0/CHANGES.rst → experimental_gracefulblobmissing-3.0.0/CHANGES.md
RENAMED
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
Changelog
|
|
2
|
-
=========
|
|
1
|
+
# Changelog
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<!-- towncrier release notes start -->
|
|
4
|
+
|
|
5
|
+
## 3.0.0 (2026-11-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Internal
|
|
9
|
+
|
|
10
|
+
- Support Python 3.11+ and Plone 6.2+
|
|
11
|
+
- Switch to PEP-420 and remove pkg_resources
|
|
12
|
+
- Update configuration files @plone
|
|
13
|
+
|
|
14
|
+
## 2.0 (2023-08-03)
|
|
6
15
|
|
|
7
16
|
- Remove Archetypes compatibility code.
|
|
8
17
|
[thet]
|
|
9
18
|
|
|
10
19
|
|
|
11
|
-
1.0 (2022-03-11)
|
|
12
|
-
----------------
|
|
20
|
+
## 1.0 (2022-03-11)
|
|
13
21
|
|
|
14
22
|
- Add support for relstorage.
|
|
15
23
|
[pbauer]
|
|
@@ -18,15 +26,13 @@ Changelog
|
|
|
18
26
|
[ale-rt, mauritsvanrees]
|
|
19
27
|
|
|
20
28
|
|
|
21
|
-
0.5.0 (2018-12-14)
|
|
22
|
-
------------------
|
|
29
|
+
## 0.5.0 (2018-12-14)
|
|
23
30
|
|
|
24
31
|
- Only patch plone.app.blob and Products.ATContentTypes if they are installed.
|
|
25
32
|
This makes this package compatible with a Archetypes-free Plone.
|
|
26
33
|
[gforcada]
|
|
27
34
|
|
|
28
|
-
0.4.0 (2015-04-29)
|
|
29
|
-
------------------
|
|
35
|
+
## 0.4.0 (2015-04-29)
|
|
30
36
|
|
|
31
37
|
* modify patch to not touch every file but only create file with a string in it when it is missing [pbauer]
|
|
32
38
|
* patch ZEO to create missing blob-files [pbauer]
|
|
@@ -35,20 +41,17 @@ Changelog
|
|
|
35
41
|
* Added a patch for ZODB egg that Create the blob folder path and create (touch)
|
|
36
42
|
an empty file for each blob file if it's missing. [sneridagh]
|
|
37
43
|
|
|
38
|
-
0.3.0 (2011-09-30)
|
|
39
|
-
------------------
|
|
44
|
+
## 0.3.0 (2011-09-30)
|
|
40
45
|
|
|
41
|
-
* fixed dependency on
|
|
42
|
-
*
|
|
46
|
+
* fixed dependency on `collective.monkeypatcher` >= 1.0 [keul]
|
|
47
|
+
* patched also getScale method, used by some atct views [keul]
|
|
43
48
|
|
|
44
|
-
0.2.0 (2011-06-06)
|
|
45
|
-
------------------
|
|
49
|
+
## 0.2.0 (2011-06-06)
|
|
46
50
|
|
|
47
51
|
* fixed dependencies [keul]
|
|
48
52
|
* direct access to files with missing blobs
|
|
49
53
|
now redirect to the view with a warning [keul]
|
|
50
54
|
|
|
51
|
-
0.1.0 (2010-11-19)
|
|
52
|
-
------------------
|
|
55
|
+
## 0.1.0 (2010-11-19)
|
|
53
56
|
|
|
54
57
|
* initial release
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: experimental.gracefulblobmissing
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: Patch for Plone. Don't raise errors for file contents with missing BLOB file
|
|
5
|
+
Author: RedTurtle Technology
|
|
6
|
+
Author-email: sviluppoplone@redturtle.it
|
|
7
|
+
License-Expression: GPL-2.0-or-later
|
|
8
|
+
Project-URL: Homepage, https://github.com/collective/experimental.gracefulblobmissing
|
|
9
|
+
Keywords: plone blob patch
|
|
10
|
+
Classifier: Framework :: Plone
|
|
11
|
+
Classifier: Framework :: Plone :: 6.2
|
|
12
|
+
Classifier: Framework :: Plone :: 6.3
|
|
13
|
+
Classifier: Programming Language :: Python
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
Requires-Dist: collective.monkeypatcher>=1.0
|
|
23
|
+
Requires-Dist: ZODB
|
|
24
|
+
Dynamic: author
|
|
25
|
+
Dynamic: author-email
|
|
26
|
+
Dynamic: classifier
|
|
27
|
+
Dynamic: description
|
|
28
|
+
Dynamic: description-content-type
|
|
29
|
+
Dynamic: keywords
|
|
30
|
+
Dynamic: license-expression
|
|
31
|
+
Dynamic: project-url
|
|
32
|
+
Dynamic: requires-dist
|
|
33
|
+
Dynamic: requires-python
|
|
34
|
+
Dynamic: summary
|
|
35
|
+
|
|
36
|
+
# How to use
|
|
37
|
+
|
|
38
|
+
The [BLOB support in Plone](https://pypi.org/project/plone.app.blob) is amazing for a lot of reasons.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
However Plone will raise errors when you visit a file content that use BLOB support without also having the BLOB file.
|
|
42
|
+
|
|
43
|
+
For developers this can be a little bit boring.
|
|
44
|
+
It's quite common to copy a production `Data.fs` for developing using production data, but you don't always want to copy all blobs.
|
|
45
|
+
|
|
46
|
+
This product monkey-patches parts of Plone, so that visiting objects that store content in the blob storage without having the BLOB available will not lead to errors.
|
|
47
|
+
Instead, a placeholder image is created where the missing blob file should be.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## Requirements
|
|
51
|
+
|
|
52
|
+
This product supports Plone 6.2 and later on Python 3.11 and later.
|
|
53
|
+
|
|
54
|
+
For Plone 4 / Archetypes compatibility stay below version 2.0.
|
|
55
|
+
For Plone 3 compatibility stay on version 0.3.0 or lower.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## Warning
|
|
59
|
+
|
|
60
|
+
This is designed only for **development/staging** environment. *Do not use in production* if you are not 100% sure of what you are doing!
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## Credits
|
|
64
|
+
|
|
65
|
+
Developed with the support of [S. Anna Hospital, Ferrara](http://www.ospfe.it/); S. Anna Hospital supports the [PloneGov initiative](http://www.plonegov.it/).
|
|
66
|
+
|
|
67
|
+

|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## Authors
|
|
72
|
+
|
|
73
|
+
This product was developed by RedTurtle Technology team.
|
|
74
|
+
|
|
75
|
+
[](http://www.redturtle.it/)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
# Changelog
|
|
79
|
+
|
|
80
|
+
<!-- towncrier release notes start -->
|
|
81
|
+
|
|
82
|
+
## 3.0.0 (2026-11-23)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Internal
|
|
86
|
+
|
|
87
|
+
- Support Python 3.11+ and Plone 6.2+
|
|
88
|
+
- Switch to PEP-420 and remove pkg_resources
|
|
89
|
+
- Update configuration files @plone
|
|
90
|
+
|
|
91
|
+
## 2.0 (2023-08-03)
|
|
92
|
+
|
|
93
|
+
- Remove Archetypes compatibility code.
|
|
94
|
+
[thet]
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## 1.0 (2022-03-11)
|
|
98
|
+
|
|
99
|
+
- Add support for relstorage.
|
|
100
|
+
[pbauer]
|
|
101
|
+
|
|
102
|
+
- Create dummy image blobs on the fly.
|
|
103
|
+
[ale-rt, mauritsvanrees]
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## 0.5.0 (2018-12-14)
|
|
107
|
+
|
|
108
|
+
- Only patch plone.app.blob and Products.ATContentTypes if they are installed.
|
|
109
|
+
This makes this package compatible with a Archetypes-free Plone.
|
|
110
|
+
[gforcada]
|
|
111
|
+
|
|
112
|
+
## 0.4.0 (2015-04-29)
|
|
113
|
+
|
|
114
|
+
* modify patch to not touch every file but only create file with a string in it when it is missing [pbauer]
|
|
115
|
+
* patch ZEO to create missing blob-files [pbauer]
|
|
116
|
+
* add logging-message when creating a missing blog-file [pbauer]
|
|
117
|
+
* fixed errors when reindexing SearchbleText index [keul]
|
|
118
|
+
* Added a patch for ZODB egg that Create the blob folder path and create (touch)
|
|
119
|
+
an empty file for each blob file if it's missing. [sneridagh]
|
|
120
|
+
|
|
121
|
+
## 0.3.0 (2011-09-30)
|
|
122
|
+
|
|
123
|
+
* fixed dependency on `collective.monkeypatcher` >= 1.0 [keul]
|
|
124
|
+
* patched also getScale method, used by some atct views [keul]
|
|
125
|
+
|
|
126
|
+
## 0.2.0 (2011-06-06)
|
|
127
|
+
|
|
128
|
+
* fixed dependencies [keul]
|
|
129
|
+
* direct access to files with missing blobs
|
|
130
|
+
now redirect to the view with a warning [keul]
|
|
131
|
+
|
|
132
|
+
## 0.1.0 (2010-11-19)
|
|
133
|
+
|
|
134
|
+
* initial release
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# How to use
|
|
2
|
+
|
|
3
|
+
The [BLOB support in Plone](https://pypi.org/project/plone.app.blob) is amazing for a lot of reasons.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
However Plone will raise errors when you visit a file content that use BLOB support without also having the BLOB file.
|
|
7
|
+
|
|
8
|
+
For developers this can be a little bit boring.
|
|
9
|
+
It's quite common to copy a production `Data.fs` for developing using production data, but you don't always want to copy all blobs.
|
|
10
|
+
|
|
11
|
+
This product monkey-patches parts of Plone, so that visiting objects that store content in the blob storage without having the BLOB available will not lead to errors.
|
|
12
|
+
Instead, a placeholder image is created where the missing blob file should be.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
This product supports Plone 6.2 and later on Python 3.11 and later.
|
|
18
|
+
|
|
19
|
+
For Plone 4 / Archetypes compatibility stay below version 2.0.
|
|
20
|
+
For Plone 3 compatibility stay on version 0.3.0 or lower.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Warning
|
|
24
|
+
|
|
25
|
+
This is designed only for **development/staging** environment. *Do not use in production* if you are not 100% sure of what you are doing!
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## Credits
|
|
29
|
+
|
|
30
|
+
Developed with the support of [S. Anna Hospital, Ferrara](http://www.ospfe.it/); S. Anna Hospital supports the [PloneGov initiative](http://www.plonegov.it/).
|
|
31
|
+
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## Authors
|
|
37
|
+
|
|
38
|
+
This product was developed by RedTurtle Technology team.
|
|
39
|
+
|
|
40
|
+
[](http://www.redturtle.it/)
|
|
41
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# experimental.gracefulblobmissing Installation
|
|
2
|
+
|
|
3
|
+
To install experimental.gracefulblobmissing into the global Python environment (or a workingenv),
|
|
4
|
+
using a traditional Zope 2 instance, you can do this:
|
|
5
|
+
|
|
6
|
+
* When you're reading this you have probably already run
|
|
7
|
+
`easy_install experimental.gracefulblobmissing`. Find out how to install setuptools
|
|
8
|
+
(and EasyInstall) here:
|
|
9
|
+
http://peak.telecommunity.com/DevCenter/EasyInstall
|
|
10
|
+
|
|
11
|
+
* Create a file called `experimental.gracefulblobmissing-configure.zcml` in the
|
|
12
|
+
`/path/to/instance/etc/package-includes` directory. The file
|
|
13
|
+
should only contain this:
|
|
14
|
+
|
|
15
|
+
```xml
|
|
16
|
+
<include package="experimental.gracefulblobmissing" />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Alternatively, if you are using zc.buildout and the plone.recipe.zope2instance
|
|
21
|
+
recipe to manage your project, you can do this:
|
|
22
|
+
|
|
23
|
+
* Add `experimental.gracefulblobmissing` to the list of eggs to install, e.g.:
|
|
24
|
+
|
|
25
|
+
```ini
|
|
26
|
+
[buildout]
|
|
27
|
+
...
|
|
28
|
+
eggs =
|
|
29
|
+
...
|
|
30
|
+
experimental.gracefulblobmissing
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
* Tell the plone.recipe.zope2instance recipe to install a ZCML slug:
|
|
34
|
+
|
|
35
|
+
```ini
|
|
36
|
+
[instance]
|
|
37
|
+
recipe = plone.recipe.zope2instance
|
|
38
|
+
...
|
|
39
|
+
zcml =
|
|
40
|
+
experimental.gracefulblobmissing
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
* Re-run buildout, e.g. with:
|
|
44
|
+
|
|
45
|
+
```console
|
|
46
|
+
$ ./bin/buildout
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
You can skip the ZCML slug if you are going to explicitly include the package
|
|
50
|
+
from another package's configure.zcml file.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Generated from:
|
|
2
|
+
# https://github.com/plone/meta/tree/2.x/src/plone/meta/default
|
|
3
|
+
# See the inline comments on how to expand/tweak this configuration file
|
|
4
|
+
[build-system]
|
|
5
|
+
requires = ["setuptools>=68.2,<83", "wheel"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
[tool.towncrier]
|
|
10
|
+
directory = "news/"
|
|
11
|
+
filename = "CHANGES.md"
|
|
12
|
+
start_string = "<!-- towncrier release notes start -->\n"
|
|
13
|
+
title_format = "## {version} ({project_date})"
|
|
14
|
+
template = "news/.changelog_template.jinja"
|
|
15
|
+
underlines = ["", "", ""]
|
|
16
|
+
|
|
17
|
+
[[tool.towncrier.type]]
|
|
18
|
+
directory = "breaking"
|
|
19
|
+
name = "Breaking changes"
|
|
20
|
+
showcontent = true
|
|
21
|
+
|
|
22
|
+
[[tool.towncrier.type]]
|
|
23
|
+
directory = "feature"
|
|
24
|
+
name = "New features"
|
|
25
|
+
showcontent = true
|
|
26
|
+
|
|
27
|
+
[[tool.towncrier.type]]
|
|
28
|
+
directory = "bugfix"
|
|
29
|
+
name = "Bug fixes"
|
|
30
|
+
showcontent = true
|
|
31
|
+
|
|
32
|
+
[[tool.towncrier.type]]
|
|
33
|
+
directory = "internal"
|
|
34
|
+
name = "Internal"
|
|
35
|
+
showcontent = true
|
|
36
|
+
|
|
37
|
+
[[tool.towncrier.type]]
|
|
38
|
+
directory = "documentation"
|
|
39
|
+
name = "Documentation"
|
|
40
|
+
showcontent = true
|
|
41
|
+
|
|
42
|
+
[[tool.towncrier.type]]
|
|
43
|
+
directory = "tests"
|
|
44
|
+
name = "Tests"
|
|
45
|
+
showcontent = true
|
|
46
|
+
|
|
47
|
+
##
|
|
48
|
+
# Add extra configuration options in .meta.toml:
|
|
49
|
+
# [pyproject]
|
|
50
|
+
# towncrier_extra_lines = """
|
|
51
|
+
# extra_configuration
|
|
52
|
+
# """
|
|
53
|
+
##
|
|
54
|
+
|
|
55
|
+
[tool.isort]
|
|
56
|
+
profile = "plone"
|
|
57
|
+
|
|
58
|
+
##
|
|
59
|
+
# Add extra configuration options in .meta.toml:
|
|
60
|
+
# [pyproject]
|
|
61
|
+
# isort_extra_lines = """
|
|
62
|
+
# extra_configuration
|
|
63
|
+
# """
|
|
64
|
+
##
|
|
65
|
+
|
|
66
|
+
[tool.black]
|
|
67
|
+
target-version = ["py311"]
|
|
68
|
+
|
|
69
|
+
##
|
|
70
|
+
# Add extra configuration options in .meta.toml:
|
|
71
|
+
# [pyproject]
|
|
72
|
+
# black_extra_lines = """
|
|
73
|
+
# extra_configuration
|
|
74
|
+
# """
|
|
75
|
+
##
|
|
76
|
+
|
|
77
|
+
[tool.codespell]
|
|
78
|
+
ignore-words-list = "discreet,assertin,thet,"
|
|
79
|
+
skip = "*.po,"
|
|
80
|
+
##
|
|
81
|
+
# Add extra configuration options in .meta.toml:
|
|
82
|
+
# [pyproject]
|
|
83
|
+
# codespell_ignores = "foo,bar"
|
|
84
|
+
# codespell_skip = "*.po,*.map,package-lock.json"
|
|
85
|
+
##
|
|
86
|
+
|
|
87
|
+
[tool.dependencychecker]
|
|
88
|
+
Zope = [
|
|
89
|
+
# Zope own provided namespaces
|
|
90
|
+
'App', 'OFS', 'Products.Five', 'Products.OFSP', 'Products.PageTemplates',
|
|
91
|
+
'Products.SiteAccess', 'Shared', 'Testing', 'ZPublisher', 'ZTUtils',
|
|
92
|
+
'Zope2', 'webdav', 'zmi',
|
|
93
|
+
# ExtensionClass own provided namespaces
|
|
94
|
+
'ExtensionClass', 'ComputedAttribute', 'MethodObject',
|
|
95
|
+
# Zope dependencies
|
|
96
|
+
'AccessControl', 'Acquisition', 'AuthEncoding', 'beautifulsoup4', 'BTrees',
|
|
97
|
+
'cffi', 'Chameleon', 'DateTime', 'DocumentTemplate',
|
|
98
|
+
'MultiMapping', 'multipart', 'PasteDeploy', 'Persistence', 'persistent',
|
|
99
|
+
'pycparser', 'python-gettext', 'pytz', 'RestrictedPython', 'roman',
|
|
100
|
+
'soupsieve', 'transaction', 'waitress', 'WebOb', 'WebTest', 'WSGIProxy2',
|
|
101
|
+
'z3c.pt', 'zc.lockfile', 'ZConfig', 'zExceptions', 'ZODB', 'zodbpickle',
|
|
102
|
+
'zope.annotation', 'zope.browser', 'zope.browsermenu', 'zope.browserpage',
|
|
103
|
+
'zope.browserresource', 'zope.cachedescriptors', 'zope.component',
|
|
104
|
+
'zope.configuration', 'zope.container', 'zope.contentprovider',
|
|
105
|
+
'zope.contenttype', 'zope.datetime', 'zope.deferredimport',
|
|
106
|
+
'zope.deprecation', 'zope.dottedname', 'zope.event', 'zope.exceptions',
|
|
107
|
+
'zope.filerepresentation', 'zope.globalrequest', 'zope.hookable',
|
|
108
|
+
'zope.i18n', 'zope.i18nmessageid', 'zope.interface', 'zope.lifecycleevent',
|
|
109
|
+
'zope.location', 'zope.pagetemplate', 'zope.processlifetime', 'zope.proxy',
|
|
110
|
+
'zope.ptresource', 'zope.publisher', 'zope.schema', 'zope.security',
|
|
111
|
+
'zope.sequencesort', 'zope.site', 'zope.size', 'zope.structuredtext',
|
|
112
|
+
'zope.tal', 'zope.tales', 'zope.testbrowser', 'zope.testing',
|
|
113
|
+
'zope.traversing', 'zope.viewlet'
|
|
114
|
+
]
|
|
115
|
+
'Products.CMFCore' = [
|
|
116
|
+
'docutils', 'five.localsitemanager', 'Missing', 'Products.BTreeFolder2',
|
|
117
|
+
'Products.GenericSetup', 'Products.MailHost', 'Products.PythonScripts',
|
|
118
|
+
'Products.StandardCacheManagers', 'Products.ZCatalog', 'Record',
|
|
119
|
+
'zope.sendmail', 'Zope'
|
|
120
|
+
]
|
|
121
|
+
'plone.base' = [
|
|
122
|
+
'plone.batching', 'plone.registry', 'plone.schema','plone.z3cform',
|
|
123
|
+
'Products.CMFCore', 'Products.CMFDynamicViewFTI',
|
|
124
|
+
]
|
|
125
|
+
python-dateutil = ['dateutil']
|
|
126
|
+
pytest-plone = ['pytest', 'zope.pytestlayer', 'plone.testing', 'plone.app.testing']
|
|
127
|
+
ignore-packages = ['ZEO', 'relstorage']
|
|
128
|
+
|
|
129
|
+
##
|
|
130
|
+
# Add extra configuration options in .meta.toml:
|
|
131
|
+
# [pyproject]
|
|
132
|
+
# dependencies_ignores = "['zestreleaser.towncrier']"
|
|
133
|
+
# dependencies_mappings = [
|
|
134
|
+
# "gitpython = ['git']",
|
|
135
|
+
# "pygithub = ['github']",
|
|
136
|
+
# ]
|
|
137
|
+
#
|
|
138
|
+
# The Zope and Plone mappings above are included by default. For a package
|
|
139
|
+
# used outside the Zope world they are noise, and can be turned off with:
|
|
140
|
+
# [pyproject]
|
|
141
|
+
# plone_mappings = false
|
|
142
|
+
##
|
|
143
|
+
|
|
144
|
+
[tool.check-manifest]
|
|
145
|
+
ignore = [
|
|
146
|
+
".editorconfig",
|
|
147
|
+
".flake8",
|
|
148
|
+
".meta.toml",
|
|
149
|
+
".pre-commit-config.yaml",
|
|
150
|
+
"dependabot.yml",
|
|
151
|
+
"mx.ini",
|
|
152
|
+
"tox.ini",
|
|
153
|
+
|
|
154
|
+
]
|
|
155
|
+
|
|
156
|
+
##
|
|
157
|
+
# Add extra configuration options in .meta.toml:
|
|
158
|
+
# [pyproject]
|
|
159
|
+
# check_manifest_ignores = """
|
|
160
|
+
# "*.map.js",
|
|
161
|
+
# "*.pyc",
|
|
162
|
+
# """
|
|
163
|
+
# check_manifest_extra_lines = """
|
|
164
|
+
# ignore-bad-ideas = [
|
|
165
|
+
# "some/test/file/PKG-INFO",
|
|
166
|
+
# ]
|
|
167
|
+
# """
|
|
168
|
+
##
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
##
|
|
172
|
+
# Add extra configuration options in .meta.toml:
|
|
173
|
+
# [pyproject]
|
|
174
|
+
# extra_lines = """
|
|
175
|
+
# _your own configuration lines_
|
|
176
|
+
# """
|
|
177
|
+
##
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
from setuptools import find_packages
|
|
2
1
|
from setuptools import setup
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
version = "2.0"
|
|
3
|
+
version = "3.0.0"
|
|
6
4
|
|
|
7
5
|
setup(
|
|
8
6
|
name="experimental.gracefulblobmissing",
|
|
@@ -11,37 +9,35 @@ setup(
|
|
|
11
9
|
"Patch for Plone. "
|
|
12
10
|
"Don't raise errors for file contents with missing BLOB file"
|
|
13
11
|
),
|
|
14
|
-
long_description=open("README.
|
|
15
|
-
|
|
16
|
-
+ open("CHANGES.rst").read(),
|
|
12
|
+
long_description=open("README.md").read() + "\n" + open("CHANGES.md").read(),
|
|
13
|
+
long_description_content_type="text/markdown",
|
|
17
14
|
# Get more strings from
|
|
18
15
|
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
|
|
19
16
|
classifiers=[
|
|
20
17
|
"Framework :: Plone",
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
|
|
18
|
+
"Framework :: Plone :: 6.2",
|
|
19
|
+
"Framework :: Plone :: 6.3",
|
|
24
20
|
"Programming Language :: Python",
|
|
25
21
|
"Development Status :: 4 - Beta",
|
|
26
|
-
"Programming Language :: Python",
|
|
27
|
-
"Programming Language :: Python ::
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
'Programming Language :: Python :: 3.9',
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Programming Language :: Python :: 3.14",
|
|
26
|
+
"Programming Language :: Python :: 3.15",
|
|
32
27
|
],
|
|
33
28
|
keywords="plone blob patch",
|
|
34
29
|
author="RedTurtle Technology",
|
|
35
30
|
author_email="sviluppoplone@redturtle.it",
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
project_urls={
|
|
32
|
+
"Homepage": "https://github.com/collective/experimental.gracefulblobmissing"
|
|
33
|
+
},
|
|
34
|
+
license_expression="GPL-2.0-or-later",
|
|
40
35
|
include_package_data=True,
|
|
41
36
|
zip_safe=False,
|
|
37
|
+
python_requires=">=3.11",
|
|
42
38
|
install_requires=[
|
|
43
|
-
"setuptools",
|
|
44
39
|
"collective.monkeypatcher>=1.0",
|
|
40
|
+
"ZODB",
|
|
45
41
|
],
|
|
46
42
|
entry_points="""
|
|
47
43
|
# -*- Entry points: -*-
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# -*- extra stuff goes here -*-
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<configure
|
|
2
|
+
xmlns="http://namespaces.zope.org/zope"
|
|
3
|
+
xmlns:monkey="http://namespaces.plone.org/monkey"
|
|
4
|
+
xmlns:zcml="http://namespaces.zope.org/zcml"
|
|
5
|
+
>
|
|
6
|
+
|
|
7
|
+
<include package="collective.monkeypatcher" />
|
|
8
|
+
<include
|
|
9
|
+
package="collective.monkeypatcher"
|
|
10
|
+
file="meta.zcml"
|
|
11
|
+
/>
|
|
12
|
+
|
|
13
|
+
<monkey:patch
|
|
14
|
+
original="__init__"
|
|
15
|
+
replacement=".patches.patched_blob_init"
|
|
16
|
+
class="ZODB.blob.BlobFile"
|
|
17
|
+
docstringWarning="true"
|
|
18
|
+
description="Create the blob folder path and create (touch) an empty file for each blob file if it's missing."
|
|
19
|
+
/>
|
|
20
|
+
|
|
21
|
+
<configure zcml:condition="installed ZEO">
|
|
22
|
+
<monkey:patch
|
|
23
|
+
original="loadBlob"
|
|
24
|
+
replacement=".patches.patched_loadBlob"
|
|
25
|
+
class="ZEO.ClientStorage.ClientStorage"
|
|
26
|
+
docstringWarning="true"
|
|
27
|
+
description="Create the blob-file if it's missing."
|
|
28
|
+
/>
|
|
29
|
+
</configure>
|
|
30
|
+
|
|
31
|
+
<monkey:patch
|
|
32
|
+
original="loadBlob"
|
|
33
|
+
replacement=".patches.patched_loadBlob_zodb"
|
|
34
|
+
class="ZODB.blob.BlobStorageMixin"
|
|
35
|
+
docstringWarning="true"
|
|
36
|
+
description="Create the blob-file if it's missing."
|
|
37
|
+
/>
|
|
38
|
+
|
|
39
|
+
<configure zcml:condition="installed relstorage">
|
|
40
|
+
<monkey:patch
|
|
41
|
+
original="loadBlob"
|
|
42
|
+
replacement=".patches.patched_loadBlob_relstorage"
|
|
43
|
+
class="relstorage.blobhelper.BlobHelper"
|
|
44
|
+
docstringWarning="true"
|
|
45
|
+
description="Create the blob-file if it's missing."
|
|
46
|
+
/>
|
|
47
|
+
</configure>
|
|
48
|
+
|
|
49
|
+
</configure>
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
from pkg_resources import resource_filename
|
|
1
|
+
from importlib.resources import files
|
|
3
2
|
from shutil import copyfile
|
|
4
|
-
from ZEO import ClientStorage
|
|
5
3
|
from ZODB.blob import BlobFile
|
|
6
4
|
from ZODB.POSException import POSKeyError
|
|
7
5
|
from ZODB.POSException import Unsupported
|
|
@@ -9,14 +7,13 @@ from ZODB.POSException import Unsupported
|
|
|
9
7
|
import logging
|
|
10
8
|
import os
|
|
11
9
|
|
|
12
|
-
|
|
13
10
|
logger = logging.getLogger(__name__)
|
|
14
11
|
|
|
15
12
|
|
|
16
13
|
def patched_blob_init(self, name, mode, blob):
|
|
17
14
|
if not os.path.exists(name):
|
|
18
15
|
create_empty_blob(name)
|
|
19
|
-
super(BlobFile, self).__init__(name, mode +
|
|
16
|
+
super(BlobFile, self).__init__(name, mode + "b")
|
|
20
17
|
self.blob = blob
|
|
21
18
|
|
|
22
19
|
|
|
@@ -24,6 +21,7 @@ def patched_loadBlob(self, oid, serial):
|
|
|
24
21
|
# Load a blob. If it isn't present and we have a shared blob
|
|
25
22
|
# directory, then assume that it doesn't exist on the server
|
|
26
23
|
# and return None.
|
|
24
|
+
from ZEO import ClientStorage
|
|
27
25
|
|
|
28
26
|
if self.fshelper is None:
|
|
29
27
|
raise Unsupported("No blob cache directory is configured.")
|
|
@@ -56,7 +54,7 @@ def patched_loadBlob(self, oid, serial):
|
|
|
56
54
|
|
|
57
55
|
# OK, it's not here and we (or someone) needs to get it. We
|
|
58
56
|
# want to avoid getting it multiple times. We want to avoid
|
|
59
|
-
# getting it multiple times even
|
|
57
|
+
# getting it multiple times even across separate client
|
|
60
58
|
# processes on the same machine. We'll use file locking.
|
|
61
59
|
|
|
62
60
|
lock = ClientStorage._lock_blob(blob_filename)
|
|
@@ -69,7 +67,7 @@ def patched_loadBlob(self, oid, serial):
|
|
|
69
67
|
return ClientStorage._accessed(blob_filename)
|
|
70
68
|
|
|
71
69
|
# Ask the server to send it to us. When this function
|
|
72
|
-
# returns, it will have been sent. (The
|
|
70
|
+
# returns, it will have been sent. (The receiving will
|
|
73
71
|
# have been handled by the asyncore thread.)
|
|
74
72
|
|
|
75
73
|
self._server.sendBlob(oid, serial)
|
|
@@ -84,8 +82,7 @@ def patched_loadBlob(self, oid, serial):
|
|
|
84
82
|
|
|
85
83
|
|
|
86
84
|
def patched_loadBlob_zodb(self, oid, serial):
|
|
87
|
-
"""Return the filename where the blob file can be found.
|
|
88
|
-
"""
|
|
85
|
+
"""Return the filename where the blob file can be found."""
|
|
89
86
|
filename = self.fshelper.getBlobFilename(oid, serial)
|
|
90
87
|
if not os.path.exists(filename):
|
|
91
88
|
create_empty_blob(filename)
|
|
@@ -118,7 +115,7 @@ def patched_loadBlob_relstorage(self, cursor, oid, serial):
|
|
|
118
115
|
|
|
119
116
|
# OK, it's not here and we (or someone) needs to get it. We
|
|
120
117
|
# want to avoid getting it multiple times. We want to avoid
|
|
121
|
-
# getting it multiple times even
|
|
118
|
+
# getting it multiple times even across separate client
|
|
122
119
|
# processes on the same machine. We'll use file locking.
|
|
123
120
|
|
|
124
121
|
lock = _lock_blob(blob_filename)
|
|
@@ -148,9 +145,9 @@ def create_empty_blob(filename):
|
|
|
148
145
|
if not os.path.isdir(dirname):
|
|
149
146
|
os.makedirs(dirname, 0o700)
|
|
150
147
|
|
|
151
|
-
source =
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
source = files("experimental.gracefulblobmissing").joinpath(
|
|
149
|
+
"dummies",
|
|
150
|
+
"blob.png",
|
|
154
151
|
)
|
|
155
152
|
|
|
156
153
|
copyfile(source, filename)
|