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

hostname is bytes type instead of str #427

beltran opened this issue Jul 24, 2017 · 3 comments

hostname is bytes type instead of str #427

beltran opened this issue Jul 24, 2017 · 3 comments


Copy link

@beltran beltran commented Jul 24, 2017

from eventlet import monkey_patch

import socket

host = socket.getnameinfo(("", 0), 0)[0]
assert isinstance(host, str)

The assertion fails in python3 but it's fine if we remove the monkey_patch. Looks like this string is returned but according to the socket API a string should be returned.

temoto added a commit that referenced this issue Jul 25, 2017
temoto added a commit that referenced this issue Jul 25, 2017
Copy link

@temoto temoto commented Jul 25, 2017

@bjmb Hello. Thanks for report.

Please, try again with this patch. pip install

Copy link
Contributor Author

@beltran beltran commented Jul 25, 2017

@temoto , yes it's working as expected with that patch

Copy link

@temoto temoto commented Jul 25, 2017

Thanks for testing.
It's merged in master 9e8c431

Have fun.

@temoto temoto closed this Jul 25, 2017
@temoto temoto added this to the v0.22 milestone Jul 25, 2017
htouvet added a commit to tranquilit/WAPT that referenced this issue Apr 4, 2018
A number of eventlet fixes which can affect wapt:


    patcher: workaround for monotonic “no suitable implementation”; Thanks to Geoffrey Thomas
    queue: empty except was catching too much
    socket: context manager support; Thanks to Miguel Grinberg
    support: update monotonic 1.3 (5c0322dc559bf)
    support: upgrade bundled dnspython to 1.16.0 (22e9de1d7957e) eventlet/eventlet#427
    websocket: fd leak when client did not close connection properly; Thanks to Konstantin Enchant
    websocket: support permessage-deflate extension; Thanks to Costas Christofi and Peter Kovary
    wsgi: close idle connections (also applies to websockets)
    wsgi: deprecated options are one step closer to removal
    wsgi: handle remote connection resets; Thanks to Stefan Nica

    New timeout error API: .is_timeout=True on exception object It’s now easy to test if network error is transient and retry is appropriate.
wsgi: log_output=False was not disabling startup and accepted messages
    greenio: Fixed OSError: [WinError 10038] Socket operation on nonsocket fix mark_as_closed() wrong number of args
    db_pool: proxy Connection.set_isolation_level()
peewee 2.10.2 -> 3.1.1
incompatibe backward changes :
werkzeug 0.12.2 -> 0.14.1

Version 0.14
    HTTP exceptions are now automatically caught by Request.application.
    Added support for edge as browser.
    Added support for platforms that lack SpooledTemporaryFile.
    Add support for etag handling through if-match
    Added support for the SameSite cookie attribute.
    Added support for filename* filename attributes according to RFC 2231
    Werkzeug will no longer send the content-length header on 1xx or 204/304 responses.

Version 0.13
    response.age is parsed as a timedelta. Previously, it was incorrectly treated as a datetime. The header value is an integer number of seconds, not a date string. (#414)
    Authorization.qop is a string instead of a set, to comply with RFC 2617. (#984)
    The built-in dev server supports receiving requests with chunked transfer encoding. (#1198)

Version 0.12.2
    Fix regression: Pull request #892 prevented Werkzeug from correctly logging the IP of a remote client behind a reverse proxy, even when using ProxyFix.
    Fix a bug in safe_join on Windows.

pyOpenSSL 17.3.0 -> 17.5.0
    Fixed a potential use-after-free in the verify callback and resolved a memory leak when loading PKCS12 files with cacerts. #723
    Added Connection.export_keying_material for RFC 5705 compatible export of keying material. #725

17.4.0 (2017-11-21)
    Re-added a subset of the OpenSSL.rand module. This subset allows conscientious users to reseed the OpenSSL CSPRNG after fork. #708
    Corrected a use-after-free when reusing an issuer or subject from an X509 object after the underlying object has been mutated. #709
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.