horsemeat 2.23.0__tar.gz → 2.23.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.23.2/PKG-INFO +20 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/configwrapper.py +23 -11
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/version.py +1 -1
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/webapp/handler.py +12 -6
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/webapp/request.py +1 -23
- horsemeat-2.23.2/horsemeat.egg-info/PKG-INFO +20 -0
- horsemeat-2.23.0/PKG-INFO +0 -13
- horsemeat-2.23.0/horsemeat.egg-info/PKG-INFO +0 -13
- {horsemeat-2.23.0 → horsemeat-2.23.2}/MANIFEST.in +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/README +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/__init__.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/model/__init__.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/model/newsmessage.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/model/session.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/model/user.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/pg.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/scripts/make-frippery-project +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/tests/__init__.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/tests/test_configwrapper.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/webapp/__init__.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/webapp/bogusrequest.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/webapp/dispatcher.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/webapp/framework_templates/__init__.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/webapp/frameworkhandlers.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/webapp/response.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat/webapp/scrubber.py +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat.egg-info/SOURCES.txt +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat.egg-info/dependency_links.txt +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat.egg-info/requires.txt +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/horsemeat.egg-info/top_level.txt +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/requirements.txt +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/setup.cfg +0 -0
- {horsemeat-2.23.0 → horsemeat-2.23.2}/setup.py +0 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: horsemeat
|
3
|
+
Version: 2.23.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
|
+
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
|
@@ -3,6 +3,7 @@
|
|
3
3
|
import abc
|
4
4
|
import contextlib
|
5
5
|
import datetime
|
6
|
+
import importlib
|
6
7
|
import json
|
7
8
|
import logging
|
8
9
|
import logging.config
|
@@ -17,7 +18,7 @@ import warnings
|
|
17
18
|
|
18
19
|
# import clepy
|
19
20
|
import jinja2
|
20
|
-
import pkg_resources
|
21
|
+
# import pkg_resources
|
21
22
|
import psycopg2, psycopg2.extras
|
22
23
|
import psycopg
|
23
24
|
import yaml
|
@@ -78,9 +79,11 @@ class ConfigWrapper(object):
|
|
78
79
|
|
79
80
|
else:
|
80
81
|
|
81
|
-
stream =
|
82
|
-
|
83
|
-
|
82
|
+
stream = importlib.resources.files(cls.configmodule).joinpath(filename).open()
|
83
|
+
|
84
|
+
# stream = pkg_resources.resource_stream(
|
85
|
+
# cls.configmodule,
|
86
|
+
# filename)
|
84
87
|
|
85
88
|
self = cls(
|
86
89
|
yaml.safe_load(stream),
|
@@ -106,9 +109,11 @@ class ConfigWrapper(object):
|
|
106
109
|
|
107
110
|
return self
|
108
111
|
|
109
|
-
elif pkg_resources.resource_exists(
|
110
|
-
cls.configmodule,
|
111
|
-
path_to_file):
|
112
|
+
# elif pkg_resources.resource_exists(
|
113
|
+
# cls.configmodule,
|
114
|
+
# path_to_file):
|
115
|
+
|
116
|
+
elif importlib.resources.files(cls.configmodule).joinpath(path_to_file).exists():
|
112
117
|
|
113
118
|
return cls.from_yaml_file_name(path_to_file)
|
114
119
|
|
@@ -250,7 +255,10 @@ class ConfigWrapper(object):
|
|
250
255
|
Add a config entry to use the fancy one.
|
251
256
|
"""
|
252
257
|
|
258
|
+
# Pretty quick, move to psycopg from psycopg2 but this is here
|
259
|
+
# until I get tests passing.
|
253
260
|
if self.config_dictionary["postgresql"].get("psycopg_version") != "psycopg":
|
261
|
+
1/0
|
254
262
|
return self.make_psycopg2_database_connection(register_composite_types=register_composite_types)
|
255
263
|
|
256
264
|
else:
|
@@ -293,13 +301,17 @@ class ConfigWrapper(object):
|
|
293
301
|
|
294
302
|
if isinstance(x, str):
|
295
303
|
|
296
|
-
warnings.warn("Stop it! Define logging configuration "
|
304
|
+
warnings.warn("Stop it! Define logging configuration in"
|
297
305
|
"the same YAML file!")
|
298
306
|
|
299
307
|
logging.config.fileConfig(
|
300
|
-
|
301
|
-
|
302
|
-
|
308
|
+
importlib.resources.files('horsemeat').joinpath("configs").joinpath("logging_configs"),
|
309
|
+
x)
|
310
|
+
|
311
|
+
# logging.config.fileConfig(
|
312
|
+
# pkg_resources.resource_filename(
|
313
|
+
# 'horsemeat.configs.logging_configs',
|
314
|
+
# x))
|
303
315
|
|
304
316
|
elif isinstance(x, dict):
|
305
317
|
logging.config.dictConfig(x)
|
@@ -243,15 +243,21 @@ class Handler(object):
|
|
243
243
|
if not hasattr(rp, "match"):
|
244
244
|
log.warning("This pattern {0!r} might not work right because it has no match method (i.e., it isn't a regex!). You probably forgot to wrap it in re.compile...".format(rp))
|
245
245
|
|
246
|
-
|
246
|
+
# Just to be nice, let's check these as strings
|
247
|
+
if req.line_one == rp:
|
248
|
+
return self.handle
|
247
249
|
|
248
|
-
|
250
|
+
else:
|
249
251
|
|
250
|
-
|
251
|
-
for k in d:
|
252
|
-
req[k] = d[k]
|
252
|
+
match = rp.match(req.line_one)
|
253
253
|
|
254
|
-
|
254
|
+
if match:
|
255
|
+
|
256
|
+
d = match.groupdict()
|
257
|
+
for k in d:
|
258
|
+
req[k] = d[k]
|
259
|
+
|
260
|
+
return self.handle
|
255
261
|
|
256
262
|
def check_route_strings(self, req):
|
257
263
|
|
@@ -537,28 +537,6 @@ class Request(collections.abc.MutableMapping):
|
|
537
537
|
else:
|
538
538
|
return 'UTF-8'
|
539
539
|
|
540
|
-
|
541
|
-
def get_binder_id(self):
|
542
|
-
|
543
|
-
if 'binder_id' in self:
|
544
|
-
return self['binder_id']
|
545
|
-
|
546
|
-
if 'binder_id' in self.wz_req.args:
|
547
|
-
self['binder_id'] = int(self.wz_req.args['binder_id'])
|
548
|
-
return self['binder_id']
|
549
|
-
|
550
|
-
elif 'binder_id' in self.wz_req.form:
|
551
|
-
self['binder_id'] = int(self.wz_req.form['binder_id'])
|
552
|
-
return self['binder_id']
|
553
|
-
|
554
|
-
elif self.global_session_data \
|
555
|
-
and 'binder_id' in self.global_session_data:
|
556
|
-
self['binder_id'] = self.global_session_data['binder_id']
|
557
|
-
return self['binder_id']
|
558
|
-
|
559
|
-
else:
|
560
|
-
raise ValueError('Sorry, could not figure out binder ID')
|
561
|
-
|
562
540
|
@property
|
563
541
|
def json(self):
|
564
542
|
|
@@ -618,7 +596,7 @@ class BiggerThanMemoryBuffer(ValueError):
|
|
618
596
|
allowed amount to load into memory.
|
619
597
|
"""
|
620
598
|
|
621
|
-
class LineOne(
|
599
|
+
class LineOne(str):
|
622
600
|
|
623
601
|
"""
|
624
602
|
Pretty much a boring old string, but can be compared against a
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: horsemeat
|
3
|
+
Version: 2.23.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
|
+
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
|
horsemeat-2.23.0/PKG-INFO
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: horsemeat
|
3
|
-
Version: 2.23.0
|
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
|
-
|
@@ -1,13 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: horsemeat
|
3
|
-
Version: 2.23.0
|
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
|
-
|
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
|