Skip to content

Commit b0019e5

Browse files
committed
rename _parser
1 parent 5ace287 commit b0019e5

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
.vimrc
2222
aiohttp/_multidict.c
2323
aiohttp/_multidict.html
24-
aiohttp/_parser.c
24+
aiohttp/_http_parser.c
2525
bin
2626
build
2727
cover
File renamed without changes.

aiohttp/http_parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ def feed_eof(self):
571571
HttpRequestParser = HttpRequestParserPy
572572
HttpResponseParser = HttpResponseParserPy
573573
try:
574-
from .parser import HttpRequestParserC, HttpResponseParserC
574+
from ._http_parser import HttpRequestParserC, HttpResponseParserC
575575
if not NO_EXTENSIONS: # pragma: no cover
576576
HttpRequestParser = HttpRequestParserC
577577
HttpResponseParser = HttpResponseParserC

setup.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@
1818
ext = '.pyx' if USE_CYTHON else '.c'
1919

2020
extensions = [Extension('aiohttp._websocket', ['aiohttp/_websocket' + ext]),
21-
Extension('aiohttp._parser',
22-
['aiohttp/_parser' + ext,
21+
Extension('aiohttp._http_parser',
22+
['aiohttp/_http_parser' + ext,
2323
'vendor/http-parser/http_parser.c'],)]
24-
#define_macros=[('HTTP_PARSER_STRICT', '0')])]
2524

2625

2726
if USE_CYTHON:

tests/test_http_parser.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
RESPONSE_PARSERS = [HttpResponseParserPy]
2020

2121
try:
22-
from aiohttp import _parser
23-
REQUEST_PARSERS.append(_parser.HttpRequestParserC)
24-
RESPONSE_PARSERS.append(_parser.HttpResponseParserC)
22+
from aiohttp import _http_parser
23+
REQUEST_PARSERS.append(_http_parser.HttpRequestParserC)
24+
RESPONSE_PARSERS.append(_http_parser.HttpResponseParserC)
2525
except ImportError: # pragma: no cover
2626
pass
2727

0 commit comments

Comments
 (0)