Skip to content

Commit

Permalink
Remove support for Python2.7+
Browse files Browse the repository at this point in the history
  • Loading branch information
roramirez committed Oct 21, 2019
1 parent 54c97e0 commit 74040d5
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 22 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ All notable changes to QPanel will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).


## 0.17.0 (unrelased)
## 1.0.0 (unrelased)


### Changed
- Remove Python2.7 Support

### Fixed
- Support Redis version >= 3.0 for Reset stats jobs
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ Also you can use a [API of QPanel](doc/api.md) for data query related to queues


## Requirement
* Python 2.7, 3.4
* [Flask](http://flask.pocoo.org/) 0.10+
* Python 3.4+
* [Asterisk](http://www.asterisk.org) 1.4+ and enabled manager or [FreeSWITCH](http://www.freeswitch.org) and connection permission to Event Socket Library.

The feature to scheduler reset stats a queue is required Redis Redis >= 2.6.0
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.16.1
1.0.0-dev
15 changes: 0 additions & 15 deletions qpanel/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@
if QPanelConfig().has_queuelog_config():
from qpanel.model import queuelog_data_queue

import sys
PY2 = sys.version_info[0] == 2

if PY2: # Python 3 has not setdefaultencoding and UTF-8 is default
reload(sys)
sys.setdefaultencoding('utf-8')

class User(flask_login.UserMixin):
pass
Expand Down Expand Up @@ -417,15 +411,6 @@ def main():
print("Error: There not connection to Redis")
print(" Reset stats will not work\n")

if PY2:
# This change is a fix for issue with Python 2.7
# The error is IOError: [Errno 32] Broken pipe
# All this shit happend if the connection is closed early
# by remove client (browser)
# Long story https://github.com/pallets/werkzeug/issues/954
from gevent.wsgi import WSGIServer
http_server = WSGIServer((cfg.host_bind, cfg.port_bind), app)
http_server.serve_forever()

if cfg.base_url == '/':
app.run(host=cfg.host_bind, port=cfg.port_bind, use_reloader=reloader,
Expand Down
1 change: 0 additions & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ future
rq-scheduler==0.9.0
python-ESL==1.4.18
git+git://github.com/maxcountryman/flask-themes@9eac2dc#egg=Flask-Themes
gevent==1.1.2
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
envlist = py27,py33,py34,py35,py36
envlist = py33,py34,py35,py36
skipsdist = True

[testenv]
commands =
py.test --verbose tests
deps =
-rrequirements/development.txt
-rrequirements/development.txt

0 comments on commit 74040d5

Please sign in to comment.