Commit Graph

15 Commits

Author SHA1 Message Date
Eric Traut
08572d87d8 Fixed a problem with the openssl-python stubs (#5038)
Fixed a problem with the openssl-python stubs. It was using `unicode`, which is not defined in Python 3. I conditionalized its use based on Python version check.

Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-02-20 13:00:33 -08:00
Alexander Reynolds
0b1cd59896 Updated protobuf descriptor pool (#5018) 2021-02-13 11:23:26 +01:00
jack1142
8f7e2216b6 Update emoji stubs to version 1.2.0 (#5008) 2021-02-08 18:58:30 -08:00
Dean Way
a3f5541830 auth uses PreparedRequest not Request (#5006) 2021-02-05 13:30:14 +01:00
Christopher Dignam
93e2806232 [redis] add overload for blpop and brpop timeout (#4998)
0 is the default value for the timeout argument for both blpop and brpop. When the timeout is `0`, the return type is non-nullable. Otherwise the return type is optional.

I tested my change with the following code
```python
from typing import Optional, Tuple
import redis

def test_blpop_timeout(r: redis.Redis) -> None:
    a: Tuple[bytes, bytes] = r.blpop('')
    b: Tuple[bytes, bytes] = r.blpop('',timeout=0)
    c: Optional[Tuple[bytes, bytes]] = r.blpop('', timeout=1)
    d: Optional[Tuple[bytes, bytes]] = r.blpop('', timeout=1.0)

def test_brpop_timeout(r: redis.Redis) -> None:
    a: Tuple[bytes, bytes] = r.brpop('')
    b: Tuple[bytes, bytes] = r.brpop('',timeout=0)
    c: Optional[Tuple[bytes, bytes]] = r.brpop('', timeout=1)
    d: Optional[Tuple[bytes, bytes]] = r.brpop('', timeout=1.0)
```
2021-02-04 20:32:34 -08:00
Nipunn Koorapati
a3b3f6845b Allow unicode and bytes in the EnumTypeWrapper.Value classmethod (#5004)
Here is a unit test which shows that this behavior is accepted
by protobuf itself at runtime in both py2 and py3
https://github.com/dropbox/mypy-protobuf/pull/205
2021-02-04 15:03:37 +00:00
Jia Chen
ece1a3e525 Remove pyre-extensions (#5001) 2021-02-02 11:43:21 -08:00
Ivan Levkivskyi
2c180dd153 Revert "A temporary change for integration testing. Will be removed soon (#4996)" (#4997)
This reverts commit 8c0cad6e2f.
2021-02-01 21:22:12 +00:00
Ivan Levkivskyi
8c0cad6e2f A temporary change for integration testing. Will be removed soon (#4996)
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-02-01 19:50:26 +00:00
Steve B
243472c9fd Correct return type BufferedFile.read in paramiko (#4994)
According to the docs in paramiko the return type will always be bytes
``` 
.. note::
            ``'b'`` mode flag is ignored (``self.FLAG_BINARY`` in
            ``self._flags``), because SSH treats all files as binary, since we
            have no idea what encoding the file is in, or even if the file is
            text data.

        :param int size: maximum number of bytes to read
        :returns:
            data read from the file (as bytes), or an empty string if EOF was
            encountered immediately
```
2021-02-01 14:28:22 +01:00
Ivan Levkivskyi
e2fd852952 Add more consistency tests (#4983)
Follow up fo #4971

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-29 17:23:35 +00:00
Marti Raudsepp
ed26eced47 cyptography: Add default to few remaining backend= arguments (#4982)
This was changed in cryptography 3.1. Most places in typeshed were
already correct, fixed few remaining omissions.
2021-01-28 09:38:20 -08:00
Ivan Levkivskyi
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00
Matthias Kramm
ec67428914 fix directory hierarchy in third_party/3/ 2015-10-01 18:04:49 -07:00
Matthias Kramm
9edaf83284 Apply stub fixes from o11c.
These are extracted from https://github.com/JukkaL/mypy/pull/721
2015-10-01 14:53:57 -07:00