Skip to content

Commit a8ea44b

Browse files
committed
📦 Build: Modernize Python packaging and Flask 3.x compatibility
Replace the 2013-era build system with modern Python packaging and fix all compatibility issues for Flask 3.x on Python 3.14. Packaging --------- - Replace setup.py and distribute_setup.py with pyproject.toml (PEP 621) - Update dependencies: Flask 3.x, PyYAML 6.x, feedparser 6.x - Replace tornado with gunicorn for production serving - Replace nose/flake8 with pytest/ruff for testing Flask 3.x and Python 3 fixes ---------------------------- - Replace removed flask.ext.mako imports with flask_mako - Replace unsafe yaml.load() with yaml.safe_load() - Remove Python 2 __future__ imports - Fix gravatar email encoding order for Python 3 unicode strings - Simplify app.py by removing defunct Tornado/OpenShift code - Fix ruff import sorting, exclude legacy scripts/ and ipynb/ - Skip YAML files at unexpected directory depth in participants Assisted-by: Claude Opus 4.6 (1M context) Signed-off-by: Justin Wheeler <[email protected]>
1 parent 3c21e36 commit a8ea44b

File tree

9 files changed

+91
-636
lines changed

9 files changed

+91
-636
lines changed

‎app.py‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
1-
import os
2-
31
from hflossk.site import app
4-
from tornado.wsgi import WSGIContainer
5-
from tornado.httpserver import HTTPServer
6-
from tornado.ioloop import IOLoop
72

83
if __name__ == "__main__":
9-
if 'OPENSHIFT_PYTHON_IP' in os.environ:
10-
host = os.environ['OPENSHIFT_PYTHON_IP']
11-
port = int(os.environ['OPENSHIFT_PYTHON_PORT'])
12-
http_server = HTTPServer(WSGIContainer(app))
13-
http_server.listen(port, address=host)
14-
IOLoop.instance().start()
15-
else:
16-
app.debug = True
17-
app.run(threaded=True)
4+
app.run(debug=True)

0 commit comments

Comments
 (0)