Skip to content
Permalink
master
Switch branches/tags

Commits on May 21, 2022

  1. More setuptools.command.easy_install definitions. (#7145)

    Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
    Co-authored-by: Akuli <akuviljanen17@gmail.com>
    3 people committed May 21, 2022
  2. random: explicitly mention int for seed (#7916)

    #7906 (comment)
    I felt this better documents how seed is used in practice
    
    Co-authored-by: hauntsaninja <>
    hauntsaninja committed May 21, 2022
  3. Update pyright (#7914)

    Required for #7865
    srittau committed May 21, 2022
  4. Annotations for psycopg2.ConnectionInfo (#7834)

    * Annotations for psycopg2.ConnectionInfo
    
    These annotations come from the documentation here:
    
    https://www.psycopg.org/docs/extensions.html#psycopg2.extensions.ConnectionInfo
    If there was doubt, I referred to the libpq documentation cited by
    psycopg2's docs.
    
    I wasn't completely sure about `dsn_parameters`. Psycopg2's docs list it
    as an `dict`, and the example suggests it's a `dict[str, str]` at that.
    From psycopg2's source I found
    
        https://github.com/psycopg/psycopg2/blob/1d3a89a0bba621dc1cc9b32db6d241bd2da85ad1/psycopg/conninfo_type.c#L183-L206
    
    which is implemented here:
    
        https://github.com/psycopg/psycopg2/blob/1d3a89a0bba621dc1cc9b32db6d241bd2da85ad1/psycopg/utils.c#L251-L279
    
    I'm no expert in CPython's API, but this looks to me like it's building
    a `dict[str, str]`.
    
    Additionally, the libpq docs
    
    https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PQCONNINFO
    https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PQCONNDEFAULTS
    
    show that the underlying data just consists of strings.
    
    Additionally, I'm pretty sure from this chunk of source
    
        https://github.com/psycopg/psycopg2/blob/1d3a89a0bba621dc1cc9b32db6d241bd2da85ad1/psycopg/conninfo_type.c#L581-L598
    
    That `ConnectionInfo.__init__` takes one positional-only argument, which
    must be a `psycopg2.connection`. But I don't think users are intended to
    be constructing this type, so I've not added that annotation.
    
    * Annotate `connection.info` and related attributes
    
    * Make ConnectionInfo attributes properties
    
    According to https://github.com/psycopg/psycopg2/blob/1d3a89a0bba621dc1cc9b32db6d241bd2da85ad1/psycopg/conninfo_type.c#L534-L563
    
    * Mark connection attributes as readonly
    
    according to https://github.com/psycopg/psycopg2/blob/8ef195f2ff187454cc709d7857235676bb4176ee/psycopg/connection_type.c#L1244
    
    * Explain why some properties aren't `T | None`
    DMRobertson committed May 21, 2022
  5. types: 3.11 (and earlier) fixes (#7900)

    - New attributes in 3.11
    - Arguments to CodeType.__init__ are always positional (have fun)
    - co_consts can use object instead of Any
    JelleZijlstra committed May 21, 2022
  6. zipfile: 3.11 fixes (#7898)

    * zipfile: 3.11 fixes
    
    Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
    JelleZijlstra and AlexWaygood committed May 21, 2022
  7. CI: Don't install tomli for stubtest_stdlib (#7901)

    The script doesn't import tomli
    AlexWaygood committed May 21, 2022

Commits on May 20, 2022

  1. CI: Don't run stubtest_stdlib on PRs that don't touch the stdlib (#7895)

    * Don't run stubtest_stdlib on PRs that don't touch the stdlib
    AlexWaygood committed May 20, 2022
  2. Ignore mypy errors in Python 2 builtins and typing (#7894)

    Similar errors are already ignored in Python 3 stubs. The
    errors break Python 2 tests of mypy.
    
    See #7367 (comment)
    for context.
    JukkaL committed May 20, 2022
  3. Only run CI on pushes to main/master and pull requests (#7883)

    Currently, when a maintainer opens a pull request from a branch in the
    typeshed repository (instead of a fork), CI is run twice: once for the
    PR and once for the push. This not only wastes CI minutes (and it seems
    we're running into some limits lately), but also makes CI output twice
    as large and more difficult to process.
    
    The disadvantage is that a PR needs to be opened to run CI.
    Alternatively, CI can be triggered manually.
    srittau committed May 20, 2022
Older