Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate low-level api from aiohttp namespace #1657

Closed
fafhrd91 opened this issue Feb 18, 2017 · 12 comments
Closed

Deprecate low-level api from aiohttp namespace #1657

fafhrd91 opened this issue Feb 18, 2017 · 12 comments
Labels
Milestone

Comments

@fafhrd91
Copy link
Member

fafhrd91 commented Feb 18, 2017

Deprecate

aiohttp.HttpMessage
aiohttp.Response
aiohttp.Request
aiohttp.RawRequestMessage
aiohttp.RawResponseMessage
aiohttp.HttpRequestParser
aiohttp.HttpResponseParser
aiohttp.HttpPayloadParser

aiohttp.HttpProcessingError
aiohttp.BadHttpMessage
aiohttp.HttpBadRequest
aiohttp.BadStatusLine
aiohttp.LineTooLong
aiohttp.InvalidHeader

aiohttp.ClientDisconnectedError

@fafhrd91 fafhrd91 added this to the 2.0 milestone Feb 18, 2017
@AraHaan
Copy link
Contributor

AraHaan commented Feb 18, 2017

I agree with this. Also I am thinking of making a Pure C++ wrapper of aiohttp using boost's async stuff if possible so that way people who know how to use aiohttp in python would be able to use cpphttp for C++. However the name might change but for sure some C++ native apps where it is not really effective to use python with their code would see better http support in C++ (Because C++ has slim to none support for http client/server API) and so I plan to finally make one based off of aiohttp. Feel free to contribute to it if you need to. I do have to figure out how to keep it up to par with aiohttp as well.

anyway I will start on the classes and the implementation functions would all return 0 until it gets fully working code much like aiohttp has. The classes and the functions will all have the same names except for the __init__ and some other things.

@fafhrd91
Copy link
Member Author

will be removed in 2.1

@AraHaan
Copy link
Contributor

AraHaan commented Feb 18, 2017

ok

@asvetlov
Copy link
Member

@fafhrd91 what are your exact steps in process of deprecation of library's public names?
How to inform users about deprecation?
Also I suspect that dropping deprecated names in aiohttp 2.1 is too fast for smooth transition period.

@fafhrd91
Copy link
Member Author

technically all those names are private, I can not imaging anybody uses those names.
I think specifically for this set of names dropping early should be safe.

@fafhrd91 fafhrd91 reopened this Feb 19, 2017
@fafhrd91
Copy link
Member Author

maybe except aiohttp.ClientDisconnectedError, but we can keep this name longer

@fafhrd91
Copy link
Member Author

I do not have strong opinion on this issue. if you think we should keep this names for longer, let's keep them longer.

@AraHaan
Copy link
Contributor

AraHaan commented Feb 19, 2017

tbh if it was me I would have crammed aiohttp into far less modules. But I am not sure if everyone would like it though so yeah. (Not to mention it is not always a good idea.)

@fafhrd91
Copy link
Member Author

here names that aiohttp2.0 is missing compared to 1.3

# we should not export this names in any case
CIMultiDict
CIMultiDictProxy
MultiDict
MultiDictProxy
istr
upstr
multidict

# this are gone after refactoring, and in any case they are too low-level
ParserBuffer
StreamParser
StreamProtocol
parsers

# deprecated
ProxyConnector
HttpPrefixParser

# this are removed, but we can make backward compatibility names
DisconnectedError
ClientHttpProcessingError
HttpMethodNotAllowed
MsgType

# this long time deprecated
delete
get
head
options
patch
post
put
ws_connect

# modules
errors
protocol
web_reqrep
_ws_impl

we still export this names for backward compatibility

HttpMessage
Request
Response

# http parser, nobody should've use those, to aiohttp specific
# I am not sure if there is any value to keep this names, as api completely changed after
# parser redesign
HttpRequestParser
HttpResponseParser
HttpPayloadParser

# low-level
RawRequestMessage
RawResponseMessage

# this are http parsing specific exceptions and should not escape aiohttp low-level usage
HttpProcessingError
BadHttpMessage,
HttpBadRequest
BadStatusLine
LineTooLong
InvalidHeader

# just backward compatibility
ClientDisconnectedError
ClientTimeoutError
FingerprintMismatch
HttpProxyError
ProxyConnectionError

I am not sure about aiohttp.request(...)

@mzfr
Copy link

mzfr commented Feb 10, 2018

Hi, I'm new to aiohttp and have some code written using aiohttp low level server that needs to be ported to latest standards. Are there any docs that deal specifically with the porting? What things do we need to change?

@asvetlov
Copy link
Member

Are you talking about https://docs.aiohttp.org/en/stable/web_lowlevel.html ?
If yes -- you are not affected.

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants