horsemeat 2.25.1__tar.gz → 2.26.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.
- horsemeat-2.26.2/PKG-INFO +13 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/__init__.py +35 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/configwrapper.py +1 -1
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/version.py +1 -1
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/webapp/request.py +16 -3
- horsemeat-2.26.2/horsemeat.egg-info/PKG-INFO +13 -0
- horsemeat-2.25.1/PKG-INFO +0 -20
- horsemeat-2.25.1/horsemeat.egg-info/PKG-INFO +0 -20
- {horsemeat-2.25.1 → horsemeat-2.26.2}/MANIFEST.in +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/README +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/model/__init__.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/model/newsmessage.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/model/session.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/model/user.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/pg.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/scripts/make-frippery-project +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/tests/__init__.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/tests/test_configwrapper.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/webapp/__init__.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/webapp/bogusrequest.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/webapp/dispatcher.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/webapp/framework_templates/__init__.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/webapp/frameworkhandlers.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/webapp/handler.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/webapp/response.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat/webapp/scrubber.py +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat.egg-info/SOURCES.txt +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat.egg-info/dependency_links.txt +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat.egg-info/requires.txt +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/horsemeat.egg-info/top_level.txt +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/requirements.txt +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/setup.cfg +0 -0
- {horsemeat-2.25.1 → horsemeat-2.26.2}/setup.py +0 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: horsemeat
|
3
|
+
Version: 2.26.2
|
4
|
+
Summary: Web framework for the damned. The mad.
|
5
|
+
Home-page: https://github.com/216software/horsemeat
|
6
|
+
Author: 216 Software, LLC
|
7
|
+
Author-email: info@216software.com
|
8
|
+
License: UNKNOWN
|
9
|
+
Platform: UNKNOWN
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
11
|
+
|
12
|
+
UNKNOWN
|
13
|
+
|
@@ -55,3 +55,38 @@ fancyjsondumps = functools.partial(
|
|
55
55
|
sort_keys=True,
|
56
56
|
indent=4,
|
57
57
|
separators=(',', ': '))
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
class CookieWrapper:
|
62
|
+
|
63
|
+
"""
|
64
|
+
This CookieWrapper allows us to be backwards compatible with https
|
65
|
+
SimpleCookie.
|
66
|
+
|
67
|
+
We need to switch to werkzeug cookie because google and facebook
|
68
|
+
have recently been using malformed cookies, which breaks the reading
|
69
|
+
of our cookies
|
70
|
+
|
71
|
+
"""
|
72
|
+
|
73
|
+
|
74
|
+
def __repr__(self):
|
75
|
+
return str(self._cookies)
|
76
|
+
|
77
|
+
def __init__(self, cookie_dict):
|
78
|
+
self._cookies = cookie_dict
|
79
|
+
|
80
|
+
def __getitem__(self, key):
|
81
|
+
return MockMorsel(self._cookies[key])
|
82
|
+
|
83
|
+
def __contains__(self, key):
|
84
|
+
return key in self._cookies
|
85
|
+
|
86
|
+
def get(self, key, default=None):
|
87
|
+
value = self._cookies.get(key, default)
|
88
|
+
return MockMorsel(value) if value is not None else None
|
89
|
+
|
90
|
+
class MockMorsel:
|
91
|
+
def __init__(self, value):
|
92
|
+
self.value = value
|
@@ -258,7 +258,7 @@ class ConfigWrapper(object):
|
|
258
258
|
# Pretty quick, move to psycopg from psycopg2 but this is here
|
259
259
|
# until I get tests passing.
|
260
260
|
if self.config_dictionary["postgresql"].get("psycopg_version") != "psycopg":
|
261
|
-
|
261
|
+
log.warning("psycopg2 is fine but psycopg is the library that is going to keep getting better")
|
262
262
|
return self.make_psycopg2_database_connection(register_composite_types=register_composite_types)
|
263
263
|
|
264
264
|
else:
|
@@ -15,7 +15,10 @@ import urllib.parse
|
|
15
15
|
import warnings
|
16
16
|
import wsgiref.util
|
17
17
|
|
18
|
+
from horsemeat import CookieWrapper
|
19
|
+
|
18
20
|
from werkzeug.wrappers import Request as WerkzeugRequest
|
21
|
+
from werkzeug.http import parse_cookie
|
19
22
|
|
20
23
|
log = logging.getLogger(__name__)
|
21
24
|
|
@@ -94,13 +97,23 @@ class Request(collections.abc.MutableMapping):
|
|
94
97
|
self['parsed_QS'] = parsed_qs
|
95
98
|
return parsed_qs
|
96
99
|
|
100
|
+
|
97
101
|
@property
|
98
102
|
def parsed_cookie(self):
|
99
103
|
|
104
|
+
"""
|
105
|
+
Switched from Simple Cookie to werkzeug cookie, with a cookie
|
106
|
+
wrapper to maintain functionality
|
107
|
+
"""
|
108
|
+
|
100
109
|
if self.HTTP_COOKIE:
|
101
|
-
c = http.cookies.SimpleCookie()
|
102
|
-
c.load(self.HTTP_COOKIE)
|
103
|
-
|
110
|
+
#c = http.cookies.SimpleCookie()
|
111
|
+
#c.load(self.HTTP_COOKIE)
|
112
|
+
|
113
|
+
c = parse_cookie(self.HTTP_COOKIE)
|
114
|
+
if c:
|
115
|
+
return CookieWrapper(c)
|
116
|
+
|
104
117
|
|
105
118
|
@property
|
106
119
|
def body(self):
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: horsemeat
|
3
|
+
Version: 2.26.2
|
4
|
+
Summary: Web framework for the damned. The mad.
|
5
|
+
Home-page: https://github.com/216software/horsemeat
|
6
|
+
Author: 216 Software, LLC
|
7
|
+
Author-email: info@216software.com
|
8
|
+
License: UNKNOWN
|
9
|
+
Platform: UNKNOWN
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
11
|
+
|
12
|
+
UNKNOWN
|
13
|
+
|
horsemeat-2.25.1/PKG-INFO
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.2
|
2
|
-
Name: horsemeat
|
3
|
-
Version: 2.25.1
|
4
|
-
Summary: Web framework for the damned. The mad.
|
5
|
-
Home-page: https://github.com/216software/horsemeat
|
6
|
-
Author: 216 Software, LLC
|
7
|
-
Author-email: info@216software.com
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
9
|
-
Requires-Dist: Jinja2>=2.6
|
10
|
-
Requires-Dist: PyYAML>=3.10
|
11
|
-
Requires-Dist: Werkzeug>=0.10.1
|
12
|
-
Requires-Dist: decorator>=3.4.0
|
13
|
-
Requires-Dist: psycopg2>=2.7
|
14
|
-
Requires-Dist: gunicorn
|
15
|
-
Dynamic: author
|
16
|
-
Dynamic: author-email
|
17
|
-
Dynamic: classifier
|
18
|
-
Dynamic: home-page
|
19
|
-
Dynamic: requires-dist
|
20
|
-
Dynamic: summary
|
@@ -1,20 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.2
|
2
|
-
Name: horsemeat
|
3
|
-
Version: 2.25.1
|
4
|
-
Summary: Web framework for the damned. The mad.
|
5
|
-
Home-page: https://github.com/216software/horsemeat
|
6
|
-
Author: 216 Software, LLC
|
7
|
-
Author-email: info@216software.com
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
9
|
-
Requires-Dist: Jinja2>=2.6
|
10
|
-
Requires-Dist: PyYAML>=3.10
|
11
|
-
Requires-Dist: Werkzeug>=0.10.1
|
12
|
-
Requires-Dist: decorator>=3.4.0
|
13
|
-
Requires-Dist: psycopg2>=2.7
|
14
|
-
Requires-Dist: gunicorn
|
15
|
-
Dynamic: author
|
16
|
-
Dynamic: author-email
|
17
|
-
Dynamic: classifier
|
18
|
-
Dynamic: home-page
|
19
|
-
Dynamic: requires-dist
|
20
|
-
Dynamic: summary
|
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
|
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
|