youtype / botocore-stubs

Type annotations and code completion for botocore package
https://youtype.github.io/mypy_boto3_builder/
MIT License
3 stars 4 forks source link

Provide option to tie installable version of `botocore` to that of `botocore-stubs` #6

Closed jakob-keller closed 1 year ago

jakob-keller commented 1 year ago

This request is inspired by the optional boto3 extra offered by boto3-stubs. Selecting the extra sets a hard pin on the versions of boto3 and botocore, effectively providing convenient synchronisation of those packages' installed versions: pip install boto3==1.28.60 boto3-stubs[boto3] will install version 1.28.60 of both boto3 and boto3-stubs. Despite there being available a more recent version of boto3-stubs.

Such a simple mechanism might also be offered by botocore-stubs: A new extra named botocore would set a hard pin to the respective version of botocore.

vemel commented 1 year ago

Hello! Thank you for the feature request.

Sure, good idea!

jakob-keller commented 1 year ago

Here's how pyproject.toml would need to look like to make this work.

[tool.poetry.dependencies]
botocore = { version = "1.31.64", optional = true }
python = "^3.7"
types-awscrt = "*"
typing-extensions = { version = ">=4.1.0", python = "<3.9" }

[tool.poetry.extras]
botocore = [
    "botocore",
]

The actual botocore version would need to be bumped through publish_on_update.yml: poetry add --optional botocore==${STUBS_VERSION}

jakob-keller commented 1 year ago

@vemel I think the CI issues are due to the fact that the PR was slightly stale. This should fix the issues:

poetry add --optional botocore==1.31.73

vemel commented 1 year ago

@jakob-keller thanks for letting me know. I optional botocore it to 1.31.73. Thanks for updating publish CI job as well!