[pypy-commit] pypy py3.7: hg merge py3.6

rlamy pypy.commits at gmail.com
Sun Sep 1 13:08:17 EDT 2019


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.7
Changeset: r97362:02225b17d8ee
Date: 2019-09-01 16:14 +0100
http://bitbucket.org/pypy/pypy/changeset/02225b17d8ee/

Log:	hg merge py3.6

diff --git a/lib_pypy/_cffi_ssl/_stdssl/__init__.py b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
--- a/lib_pypy/_cffi_ssl/_stdssl/__init__.py
+++ b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
@@ -73,7 +73,7 @@
 OP_NO_SSLv2 = lib.SSL_OP_NO_SSLv2
 OP_NO_SSLv3 = lib.SSL_OP_NO_SSLv3
 OP_NO_TLSv1_3 = lib.SSL_OP_NO_TLSv1_3
- 
+
 
 SSL_CLIENT = 0
 SSL_SERVER = 1
@@ -90,7 +90,7 @@
         PROTOCOL_SSLv3  = 1
         lib.SSL_CTX_free(ctx)
         SSLv3_method_ok = True
-        
+
 PROTOCOL_SSLv23 = 2
 PROTOCOL_TLS    = PROTOCOL_SSLv23
 PROTOCOL_TLSv1    = 3
@@ -100,7 +100,7 @@
     PROTOCOL_TLSv1_2 = 5
 PROTOCOL_TLS_CLIENT = 0x10
 PROTOCOL_TLS_SERVER = 0x11
-HAS_TLSv1_3 = False  # XXX: temporary hack!
+HAS_TLSv1_3 = bool(lib.Cryptography_HAS_TLSv1_3)
 
 _PROTOCOL_NAMES = (name for name in dir(lib) if name.startswith('PROTOCOL_'))
 
diff --git a/lib_pypy/_curses.py b/lib_pypy/_curses.py
--- a/lib_pypy/_curses.py
+++ b/lib_pypy/_curses.py
@@ -412,7 +412,10 @@
         else:
             raise error("get_wch requires 0 or 2 arguments")
         _check_ERR(val, "get_wch")
-        return wch[0]
+        if val == lib.KEY_CODE_YES:
+            return wch[0]
+        else:
+            return chr(wch[0])
 
     def getkey(self, *args):
         if len(args) == 0:
diff --git a/lib_pypy/_curses_build.py b/lib_pypy/_curses_build.py
--- a/lib_pypy/_curses_build.py
+++ b/lib_pypy/_curses_build.py
@@ -90,6 +90,7 @@
 static const int ERR, OK;
 static const int TRUE, FALSE;
 static const int KEY_MIN, KEY_MAX;
+static const int KEY_CODE_YES;
 
 static const int COLOR_BLACK;
 static const int COLOR_RED;


More information about the pypy-commit mailing list