Skip to content

Keep mypy_extensions versioning in sync with main package #5592

Closed

Description

@eigengrau

On the Arch user repository, we sometimes like to build packages targeting the repository master branch. I’ve been made aware that mypy now hard-depends on the extensions module. Since the Arch Linux packaging tools support building multiple packages from one repository, it would be convenient to produce both packages in tandem. However, the distribution built from the extensions tree of the master branch currently has a version that does not satisfy the dependency imposed by mypy.

Would it make sense to make it so that a from-git build of mypy_extensions satisfies the dependency of a from-git build of mypy proper?

Activity

  1. ilevkivskyi commented on Sep 9, 2018

    @ilevkivskyi
    Member

    @ethanhs Do you have any opinion on this? Any hidden downsides? (This sounds reasonable to me.)

  2. emmatyping commented on Sep 10, 2018

    @emmatyping
    Member

    I think this would be nice, but I am a bit confused on the concrete proposal of how it would work? Would we modify the dependency to be mypy_extensions>=0.4,<0.6? Would we change the mypy_extensions version to be exactly the same as mypy? What happens when we need to bump the mypy_extensions version? (I think there are cases where this gets complicated or weird).

  3. ikelos commented on Oct 4, 2018

    @ikelos

    If the two versions can be bumped independently of each other, and they're seen as different packages by the packages themselves, perhaps they should live in separate repositories? Rather than trying to keep two packages in one repo, it seems as though this should now be moved to something like github.com/python/mypy_extensions, with proper releases and tarballs. I'm facing similar issues trying to package this for Gentoo...

  4. msullivan commented on Oct 10, 2018

    @msullivan
    Collaborator

    I think we should probably spin off mypy_extensions into its own repository.

  5. ikelos commented on Oct 14, 2018

    @ikelos

    That would be very helpful, not least because of the confusion it's causing. The package is called mypy extensions but is required by mypy, so not actually an extension but a required part of the operation of mypy? A better name for what it does would resolve that and make it clearer why it's separate. It should make it easier to justify why it's in its own package, and help answer questions as to what other packages would need this code that don't need the rest of mypy?

    We're also in the situation where it's a pre-release but is depended upon by a full-release version of mypy, which as issue #5763 is showing, can lead to problems where the tarball for mypy isn't actually suitable for installation.

  6. ilevkivskyi commented on Oct 14, 2018

    @ilevkivskyi
    Member

    The name actually means something like "mypy-specific extensions to typing module". I have no preference regarding where to keep it.

  7. ikelos commented on Oct 14, 2018

    @ikelos

    Ok, I see, that does somewhat explain what it does and why it might be used separately (I don't know what a better name would be, but the package name alone suggests it's an extension of mypy, perhaps mypy_type_extensions, unless that's cumbersome?). If it's independent of mypy itself (ie, it could get installed without the need for the rest of mypy) then probably a separate repo would be best, otherwise rolling it back into mypy so that it's not versioned independently seems like a better option, even if the code doesn't change much/at all between releases.

  8. msullivan commented on Oct 16, 2018

    @msullivan
    Collaborator

    It can indeed be installed without needing the rest of mypy, since it is the runtime support for some mypy extensions. Programs that use them (like mypy) will need mypy_extensions installed in order to run, while they only need mypy installed if you want to typecheck them.

    (Unless they avoid actually importing mypy_extensions at runtime by using if MYPY, which maybe we could save ourselves some headaches by doing ourselves. (Though we use the @trait decorator, which would be kind of annoying to handle this way.))

  9. ikelos commented on Oct 16, 2018

    @ikelos

    Ok, cool. Then it sounds like it really is its own standalone package, and having it as a separate repository seems to make the most sense. It should make packaging much simpler than only distributing it as part of a mypy release too... 5:)

  10. ikelos commented on Dec 4, 2018

    @ikelos

    There seems to have been no progress on this in the month and a half since it was discussed. Has there been any further conclusion on this, so that the tarballs being shipped don't have conflicting versions of two packages which can't both be installed from the same tarball? I assume it's too late for 0.650, but it'd be good to consider how this will be resolved for package maintainers by 0.660...

  11. msullivan commented on Jan 15, 2019

    @msullivan
    Collaborator

    OK, mypy_extensions has been split out into its own source project https://github.com/python/mypy_extensions. There are tags for 0.4.0 and 0.4.1 (which due to some sort of miscommunication, differ only by version number :P).

    The extensions directory will be deleted in #6191.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions