Skip to content
Closed

4.0 #161

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
19fdcb9
WIP
danigosa May 21, 2019
57049e5
WIP
May 21, 2019
8b5c1e2
release 4.0.0rc1
Jun 15, 2019
83c2262
release 4.0.0rc1
Jun 15, 2019
2cfef91
release 4.0.0rc1
Jun 15, 2019
20b3559
Merge remote-tracking branch 'origin/4.0' into 4.0
Jun 15, 2019
adca4b8
Merge remote-tracking branch 'origin/4.0' into 4.0
Jun 15, 2019
067a46f
Merge remote-tracking branch 'origin/4.0' into 4.0
Jun 15, 2019
23669ab
Merge remote-tracking branch 'origin/4.0' into 4.0
Jun 15, 2019
b30473a
Merge remote-tracking branch 'origin/4.0' into 4.0
Jun 15, 2019
74e49bc
releasing 4.0.0rc1
Jun 15, 2019
a0148b8
releasing 4.0.0rc1
Jun 15, 2019
ca995dd
Merge remote-tracking branch 'origin/4.0' into 4.0
Jun 15, 2019
9ed37ef
releasing 4.0.0rc1
Jun 15, 2019
5d8469a
release 4.0.0rc1
Jun 15, 2019
e2191e6
Merge remote-tracking branch 'origin/4.0' into 4.0
Jun 15, 2019
a9f49d4
fix readme
Jun 15, 2019
17dc8f0
fix readme
Jun 15, 2019
39901f2
Merge remote-tracking branch 'origin/4.0' into 4.0
Jun 15, 2019
629c864
fix readme
Jun 15, 2019
e7fed9b
fmt
Jun 15, 2019
21e3247
fmt
Jun 15, 2019
0b8673c
- prioritize EPOLL
Jun 16, 2019
b17d73a
refactor server info (so it has not to be in every request)
Jun 16, 2019
afe4a4d
- make it Python4/5 friendly
Jun 16, 2019
a8bc16f
- make it Python4/5 friendly
Jun 16, 2019
8290163
fix CI
Jun 16, 2019
2375ba1
WIP
Jun 16, 2019
9d1ccc1
fix CI
Jun 16, 2019
07c71bd
WIP - server run simplyfied
Jun 16, 2019
66498d6
Merge branch 'server_run_refactor' into server_info_refactor
Jun 16, 2019
d8a3d96
fix CI
Jun 16, 2019
af047e2
fix CI
Jun 16, 2019
e3f6815
fix CI
Jun 16, 2019
4bfe94e
Python3.5 support
Jun 16, 2019
a4b79e6
release 4.0.0rc2
Jun 16, 2019
b6cc7f4
Update README.md
Jun 16, 2019
56fac6f
Update README.md
Jun 16, 2019
65c940f
Update README.md
Jun 16, 2019
53144a6
WIP: PARSER->field to C
Jun 18, 2019
21d05dd
WIP: PARSER->field to C (optimal, C99)
Jun 18, 2019
16c5b2d
Merge remote-tracking branch 'origin/thread_info' into thread_info
Jun 18, 2019
a113ec7
- protect mallocs
Jun 22, 2019
801f2c9
WIP
Jun 22, 2019
cedfa9a
- status and client_addr are C strings
Jun 22, 2019
8764108
- status and client_addr are C strings
Jun 22, 2019
b216c82
WIP
Jun 23, 2019
eed2ae5
rc4
Jun 24, 2019
39c4bd8
rc4
Jun 24, 2019
c7afa18
Merge remote-tracking branch 'origin/rc3' into rc4
Jun 24, 2019
a32e212
rc5
Jun 24, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ build/
dist/
MANIFEST
bjoern.egg-info/
.idea
*.so
tmp/
callgrind.out.*
9 changes: 6 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "http-parser"]
path = http-parser
url = git://github.com/joyent/http-parser
[submodule "vendors/log.c"]
path = vendors/log.c
url = https://github.com/danigosa/log.c.git
[submodule "vendors/http-parser"]
path = vendors/http-parser
url = https://github.com/nodejs/http-parser.git
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: python

services:
- docker

before_install:
- docker build -t bjoern36-37 .
- docker build -t bjoern35 -f Dockerfile.py35 .

script:
- docker run --rm -t -w /bjoern -v $(pwd):/bjoern bjoern35 make all-35
- docker run --rm -t -w /bjoern -v $(pwd):/bjoern bjoern36-37 make all-36
- docker run --rm -t -w /bjoern -v $(pwd):/bjoern bjoern36-37 make all-37
66 changes: 66 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
CHANGELOG
=========

4.0.0rc4 (June 2019)
- Refactor GILs

4.0.0rc4 (June 2019)
- add expandable buffer in C instead of hooking into IO_module for every chunk

4.0.0rc3 (June 2019)
- refactor thread info

4.0.0rc2 (June 2019)
- refactor server info (so it has not to be in every request)
- make it Python3.5 friendly, and added tests to Travis for Debian Stretch stock python
- refactor run_server: make it more C rather than Python C-API
- Minor Travis docker improvements

4.0.0rc1 (June 2019)
- added Travis CI support
- added legacy benchmarks
- removed server level logs to improve performance
- Backport 3.0.1 commits where applicable
- Added tcp_nodelay, max_body_len, max_header_fields, max_header_field_len, max_uri_len, max_query_len to make
DoS attacks less feasible
- Refactor python code
- Better HTTP compliant error codes
- Added 505 HTTP Version Not Supported on HTTP2
- Improvements in C logging
- Refactor runner so args and kwrags are well known
- Improvements on sock configuration, like TCP NODELAY and KEEPALIVE
- Fix several issues calling the gworker.BjoernWorker with gunicorn
- Added benchmarks for gunicorn worker
- Fix bad import when building from source externally with setup.py
- configurable listen backlog, defaulted to the half of /proc/sys/net/core/somaxconn, if listen_backlog para is 0, to
the max of the underlying hardware/runtime
- Fixed benchmarks
- Fixed file logging
- use http_parser.h methods for BAD_REQUEST, REQUIRED_LENGTH and SERVER_ERROR
- Fix when to raise HTTP_STATUS_REQUIRED_LENGTH(411)
- allow separated file logger from console logger
- added gunicorn worker
- gross refactor of tests and main module
- increased default backlog
- Added tests
- Tests passing on Py37
- Added benchmarks with image input
- Refactored Makefile
- Initial config for Py37
- Fixed problems uploading big POST bodies
- Fork from master@9884381ffdbc279fbf1ef640003fcce0a6f0996a
- Drop support for Python2, supporting only Python3.6+
- Updated to `http-parser` latest stable version 2.9.2
- Tested on Ubuntu18.04 with `libev` version 4.22
- Added unit testing support with Pytest
- Added tests for Flask, Falcon and Bottle
- Replace in hand url parser by `http-parser.http_parser_url`
- Added a Dockerfile and `run-dev` script to run development easily
- Added modern `core-avx2` compilation options
- Added wheel building support
- Added Flask, Bottle and Falcon ab benchmarks
- Added Black & iSort formatting for python files

3.0.1 (June 6, 2019)
- Fix #158, #160: Correct string type for WSGI environ

3.0.0 (May 7, 2019)
- Fix #91: Support for SIGTERM/SIGINT handling

Expand Down
72 changes: 72 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
FROM ubuntu:bionic

MAINTAINER <danius danigosa@gmail.com>

ENV LC_ALL=C.UTF-8
ENV LC_CTYPE=C.UTF-8

# base packages
RUN \
apt-get -qq update && \
apt-get -qq install --no-install-recommends \
build-essential \
gnupg2 \
git \
vim \
wget \
curl \
httpie \
make \
gdb \
psmisc \
valgrind \
apache2-utils \
gridsite-clients \
libev-dev && \
wget -O /tmp/checkmake.deb \
--content-disposition https://packagecloud.io/mrtazz/checkmake/packages/ubuntu/trusty/checkmake_0.1.0-1_amd64.deb/download.deb && \
dpkg -i /tmp/checkmake.deb && rm -f /tmp/checkmake.deb && \
rm -rf /var/lib/apt/lists/*

# Python3.6
RUN \
apt-get -qq update && \
apt-get -qq install --no-install-recommends \
python3-dev \
python3-dev \
python3-dbg \
python3-venv \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*

RUN pip3 install \
black \
isort[requirements]

RUN python3 -m venv --system-site-packages /.py36-venv && \
/.py36-venv/bin/python -m pip install --upgrade \
pip \
setuptools\
wheel \
Cython

# Python3.7
RUN \
apt-get -qq update && \
apt-get -qq install --no-install-recommends \
python3.7-dev \
python3.7-dev \
python3.7-dbg \
python3.7-venv && \
rm -rf /var/lib/apt/lists/*

RUN python3.7 -m venv --system-site-packages /.py37-venv && \
/.py37-venv/bin/python -m pip install --upgrade \
pip \
setuptools\
wheel \
Cython

RUN ldconfig
51 changes: 51 additions & 0 deletions Dockerfile.py35
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM debian:stretch

MAINTAINER <danius danigosa@gmail.com>

ENV LC_ALL=C.UTF-8
ENV LC_CTYPE=C.UTF-8

# base packages
RUN \
apt-get -qq update && \
apt-get -qq install --no-install-recommends \
build-essential \
gnupg2 \
git \
vim \
wget \
curl \
httpie \
make \
gdb \
psmisc \
valgrind \
apache2-utils \
gridsite-clients \
libev-dev && \
wget -O /tmp/checkmake.deb \
--content-disposition https://packagecloud.io/mrtazz/checkmake/packages/ubuntu/trusty/checkmake_0.1.0-1_amd64.deb/download.deb && \
dpkg -i /tmp/checkmake.deb && rm -f /tmp/checkmake.deb && \
rm -rf /var/lib/apt/lists/*

# Python3.5
RUN \
apt-get -qq update && \
apt-get -qq install --no-install-recommends \
python3-dev \
python3-dev \
python3-dbg \
python3-venv \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*

RUN python3 -m venv --system-site-packages /.py35-venv && \
/.py35-venv/bin/python -m pip install --upgrade \
pip \
setuptools\
wheel \
Cython

RUN ldconfig
10 changes: 8 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
include http-parser/http_parser.[ch]
include bjoern/*
include vendors/http-parser/http_parser.c
include vendors/http-parser/contrib/*.c
include vendors/http-parser/http_parser.h
include vendors/http-parser/LICENSE-MIT
include vendors/log.c/*.c
include vendors/log.c/*.h
include vendors/log.c/LICENSE
include src/*
include LICENSE
Loading