Skip to content

Commit

Permalink
Replace gevent dependency with waitress
Browse files Browse the repository at this point in the history
  • Loading branch information
1over137 committed Sep 29, 2024
1 parent 8a45a8f commit 28f8e4d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cx_freeze/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"readmdict",
"packaging",
"pynput",
"gevent"
"waitress"
] + PYNPUT_PLATFORM_SPECIFIC_MODULES.get(sys.platform, []),
"include_files": include_files,
"zip_include_packages": ["PyQt5"],
Expand Down
3 changes: 0 additions & 3 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,3 @@ ignore_missing_imports = True

[mypy-pysubs2.*]
ignore_missing_imports = True

[mypy-gevent.*]
ignore_missing_imports = True
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ simplemma
pystardict
bidict
flask
gevent
waitress
charset-normalizer
slpp
mobi
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = vocabsieve
version = 0.12.1
version = 0.12.2
author = FreeLanguageTools
author_email = [email protected]
description = A simple, effective sentence mining tool.
Expand Down Expand Up @@ -45,7 +45,7 @@ install_requires =
loguru
packaging
typing_extensions
gevent
waitress
pynput


Expand Down
5 changes: 2 additions & 3 deletions vocabsieve/reader/server.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ast import parse
from flask import Flask, render_template, flash, request, redirect, url_for, send_from_directory
from gevent.pywsgi import WSGIServer
from waitress import serve
from requests import get
import os
import re
Expand Down Expand Up @@ -64,5 +64,4 @@ def send_epub(path):
return "No books directory set"
return send_from_directory(books_dir, path)

http_server = WSGIServer((self.host, self.port), app)
http_server.serve_forever()
serve(app, host=self.host, port=self.port)

0 comments on commit 28f8e4d

Please sign in to comment.