horsemeat 2.23.0__tar.gz → 2.23.1__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 (31) hide show
  1. {horsemeat-2.23.0 → horsemeat-2.23.1}/PKG-INFO +1 -1
  2. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/configwrapper.py +23 -11
  3. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/version.py +1 -1
  4. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/webapp/request.py +0 -22
  5. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat.egg-info/PKG-INFO +1 -1
  6. {horsemeat-2.23.0 → horsemeat-2.23.1}/MANIFEST.in +0 -0
  7. {horsemeat-2.23.0 → horsemeat-2.23.1}/README +0 -0
  8. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/__init__.py +0 -0
  9. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/model/__init__.py +0 -0
  10. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/model/newsmessage.py +0 -0
  11. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/model/session.py +0 -0
  12. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/model/user.py +0 -0
  13. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/pg.py +0 -0
  14. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/scripts/make-frippery-project +0 -0
  15. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/tests/__init__.py +0 -0
  16. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/tests/test_configwrapper.py +0 -0
  17. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/webapp/__init__.py +0 -0
  18. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/webapp/bogusrequest.py +0 -0
  19. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/webapp/dispatcher.py +0 -0
  20. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/webapp/framework_templates/__init__.py +0 -0
  21. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/webapp/frameworkhandlers.py +0 -0
  22. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/webapp/handler.py +0 -0
  23. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/webapp/response.py +0 -0
  24. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat/webapp/scrubber.py +0 -0
  25. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat.egg-info/SOURCES.txt +0 -0
  26. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat.egg-info/dependency_links.txt +0 -0
  27. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat.egg-info/requires.txt +0 -0
  28. {horsemeat-2.23.0 → horsemeat-2.23.1}/horsemeat.egg-info/top_level.txt +0 -0
  29. {horsemeat-2.23.0 → horsemeat-2.23.1}/requirements.txt +0 -0
  30. {horsemeat-2.23.0 → horsemeat-2.23.1}/setup.cfg +0 -0
  31. {horsemeat-2.23.0 → horsemeat-2.23.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: horsemeat
3
- Version: 2.23.0
3
+ Version: 2.23.1
4
4
  Summary: Web framework for the damned. The mad.
5
5
  Home-page: https://github.com/216software/horsemeat
6
6
  Author: 216 Software, LLC
@@ -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 = pkg_resources.resource_stream(
82
- cls.configmodule,
83
- filename)
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
- pkg_resources.resource_filename(
301
- 'horsemeat.configs.logging_configs',
302
- x))
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)
@@ -22,4 +22,4 @@ hasn't been installed yet.
22
22
 
23
23
  """
24
24
 
25
- __version__ = '2.23.0'
25
+ __version__ = '2.23.1'
@@ -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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: horsemeat
3
- Version: 2.23.0
3
+ Version: 2.23.1
4
4
  Summary: Web framework for the damned. The mad.
5
5
  Home-page: https://github.com/216software/horsemeat
6
6
  Author: 216 Software, LLC
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes