-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
project: policyOrganization of the typeshed projectOrganization of the typeshed project
Description
I have a few suggestions to improve our Python 2 handling for third-party packages:
- Move Python2-only stubs consistently to the
@python2subdir. This makes things more consistent and makes it obvious when a stub doesn't support Python 3. (This has bit me before.) It also enables further changes as outlined below. A stub uploader PR enabling this is ready for review: Allow stub directories with only a @python2 directory typeshed-internal/stub_uploader#15. - Have a separate
METADATA.tomlfile in@python2(and noMETADATA.tomlin the base dir, if the stubs don't support Python 3). This allows us to support older versions of a package on Python 2. This is especially important if a package drops Python 2 support. It also means that the base and the@python2version don't need to be kept in sync. - Split all third-party stubs into Python 2 and 3 versions for the same reasons as outlined in Split stdlib into Python 2 and 3 versions #5442 for the stdlib. This would be especially useful when a third-party library drops Python 2 support.
It also means that Python 2 users can consistently install theEdit: We could continue to support old packages for Python 2 only, while updating to a newer package version for Python 3.types-*-py2package and Python 3 users don't need to worry thattypes-*contains Python 2 only stubs.
One thing to note is that the stub uploader currently doesn't support the python2 and python3 metadata fields anyway. This needs some investigating.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
project: policyOrganization of the typeshed projectOrganization of the typeshed project