Skip to content
Permalink
Tree: 3fc8aec425
Commits on Sep 4, 2019
  1. Allow passing str to Python 2's bytearray.extend. (#3223)

    benjaminp authored and srittau committed Sep 4, 2019
  2. Mark some types as non-hashable (#3219)

    srittau committed Sep 4, 2019
    Based on @JelleZijlstra's PR #2221.
    
    Fixes #2148
Commits on Sep 3, 2019
  1. ssl.pyi: Add functions, support Path (#3044)

    dholth authored and srittau committed Sep 3, 2019
  2. Type response of Flask test client methods: get, post, etc. (#2904)

    pcorpet authored and srittau committed Sep 3, 2019
Commits on Aug 31, 2019
  1. Use Literal to improve tempfile.[Named]TemporaryFile. (#3215)

    rchen152 authored and srittau committed Aug 31, 2019
Commits on Aug 30, 2019
  1. Update pyre_extensions stub (#3214)

    shannonzhu authored and JelleZijlstra committed Aug 30, 2019
Commits on Aug 29, 2019
  1. Mark ParamType.fail() as NoReturn (#3213)

    hexane360 authored and srittau committed Aug 29, 2019
    This function just raises a click.BadParameter exception with the supplied arguments.
  2. Remove custom _Text type (#3211)

    srittau authored and JelleZijlstra committed Aug 29, 2019
    * Remove custom _Text type
    
    Since the custom type was only used in argument types, it was
    effectively only an alias for typing.Text.
    
    * Run requests/api.pyi through black
  3. Make target optional in contextlib redirecting managers (#3212)

    ateraz authored and srittau committed Aug 29, 2019
    Fixes #3210
  4. requests: Allow bytes for url parameters. (#3209)

    benjaminp authored and msullivan committed Aug 29, 2019
    typeshed already partially reflected psf/requests#2238 but not completely.
  5. Add unquote_to_bytes to Python 3 six.moves.urllib.parse. (#3208)

    benjaminp authored and JelleZijlstra committed Aug 29, 2019
Commits on Aug 27, 2019
  1. Add typestubs for unittest.util (#3186)

    jermenkoo authored and srittau committed Aug 27, 2019
Commits on Aug 24, 2019
  1. doctest: fix type of DocTestParser.get_doctest(lineno) (#3206)

    bluetech authored and JelleZijlstra committed Aug 24, 2019
    Reference:
    https://docs.python.org/3/library/doctest.html#doctest.DocTest.lineno
    
    Also noticed a typo in get_examples() argument name.
Commits on Aug 23, 2019
  1. Add sys.flags.utf8_mode. (#3205)

    rchen152 committed Aug 23, 2019
  2. zipfile.ZipFile: Add start_dir attribute. (#3203)

    benjaminp authored and srittau committed Aug 23, 2019
  3. create_server returns a Server, not AbstractServer (#3131)

    scottbelden authored and srittau committed Aug 23, 2019
    * remove create_unix_connection and use ABCMeta
  4. cadata param can (and PEM-encoded cadata must) be unicode under PY2 (#…

    sfreilich authored and srittau committed Aug 23, 2019
Commits on Aug 20, 2019
  1. Update how mock classes alias to Any (#3182)

    shannonzhu authored and JelleZijlstra committed Aug 20, 2019
    * Update how mock classes alias to Any
    
    > First, the z: Any situation looks like a bug or accidental feature to me.
    This is definitely meant (and works) as a variable declaration; that it
    also allows using z as a type seems wrong. I can't find any evidence in
    PEP 484 that this was intended; in mypy it's likely the accidental result
    of other design choices meant to shut up errors about Any.
    
    Ideally these classes could be declared as empty class stubs, but since the comments suggest this isn't possible yet, let's update these to be type aliases to Any rather than global variables of type Any. This would avoid invalid type errors when the implementation of type checkers respect the intention that `z: Any` does not make `z` a valid type.
    
    * Update mock.pyi
Commits on Aug 19, 2019
  1. adds threading related members to queue.pyi (#3198)

    mchlnix authored and srittau committed Aug 19, 2019
  2. multiprocessing.Value can also take a Type (#3200)

    alanhdu authored and srittau committed Aug 19, 2019
  3. Add stubs for CGIHTTPServer (#3196)

    Bouteillebleu authored and srittau committed Aug 19, 2019
    This commit adds:
    * Stubs for CGIHTTPServer in the Python 2 standard library, as requested in #1147.
    * Stubs for six.moves.CGIHTTPServer in Python 2, as requested in #22.
Commits on Aug 17, 2019
  1. builtins: add __trunc__ to int and float (#3194)

    bluetech authored and JelleZijlstra committed Aug 17, 2019
  2. Remove unnecessary quotes around forward references. (#3191)

    rchen152 authored and JelleZijlstra committed Aug 17, 2019
Commits on Aug 16, 2019
  1. Make most contextmanager `__exit__` signatures return Optional[bool] (#…

    Michael0x2a authored and JelleZijlstra committed Aug 16, 2019
    …3179)
    
    This pull request is a follow-up to python/mypy#7214.
    
    In short, within that mypy issue, we found it would be helpful to
    determine between contextmanagers that can "swallow" exceptions vs ones
    that can't. This helps prevent some false positive when using flags that
    analyze control flow such as `--warn-unreachable`. To do this,
    Jelle proposed assuming that only contextmanagers where the `__exit__`
    returns `bool` are assumed to swallow exceptions.
    
    This unfortunately required the following typeshed changes:
    
    1. The typing.IO, threading.Lock, and concurrent.futures.Executor
       were all modified so `__exit__` returns `Optional[None]` instead
       of None -- along with all of their subclasses.
    
       I believe these three types are meant to be subclassed, so I felt
       picking the more general type was correct.
    
    2. There were also a few concrete types (e.g. see socketserver,
       subprocess, ftplib...) that I modified to return `None` -- I checked
       the source code, and these all seem to return None (and don't appear
       to be meant to be subclassable).
    
    3. contextlib.suppress was changed to return bool. I also double-checked
       the unittest modules and modified a subset of those contextmanagers,
       leaving ones like `_AssertRaisesContext` alone.
  2. Partially restore old (imprecise) signature of Match.group() (#3190)

    ilevkivskyi committed Aug 16, 2019
    This partially reverts #3172
  3. Fix #3187 : Wrong Signatures in socketserver (#3189)

    nielsbuwen authored and srittau committed Aug 16, 2019
    Fixes #3187
  4. Update __import__ function annotations (#3188)

    jdufresne authored and srittau committed Aug 16, 2019
    Per the docs, globals/locals is an optional argument.
    Additionally, globals/locals can be any mapping type, not only a dict.
    Likewise, fromlist can be any sequence (the docs mention a tuple, not a
    list).
    The function returns a ModuleType, not Any.
Commits on Aug 15, 2019
  1. Fix a typo (self -> cls) in stdlib/2/subprocess.pyi. (#3185)

    rchen152 authored and JelleZijlstra committed Aug 15, 2019
Commits on Aug 11, 2019
  1. Add Match.regs (#2819)

    scop authored and JelleZijlstra committed Aug 11, 2019
Commits on Aug 10, 2019
  1. Update URL: python/black → psf/black (#3180)

    jdufresne authored and JelleZijlstra committed Aug 10, 2019
  2. Implement ZipExtFile in the zipfile type stubs (#3074)

    CraftSpider authored and JelleZijlstra committed Aug 10, 2019
  3. Add some redis types (#3092)

    pvalsecc authored and JelleZijlstra committed Aug 10, 2019
Older
You can’t perform that action at this time.