Skip to content

Python: Provide per-version overrides for test-only / optional dependencies #354

@tswast

Description

@tswast

Is your feature request related to a problem? Please describe.

Whenever a new Python is released, just as Python 3.8, it takes pandas and related data science libraries a while to make a compatible release. Our choices are:

  1. Update the noxfile to exclude the problematic dependencies until there is a Python 3.8 release (chore(bigquery): run unit tests with Python 3.8 google-cloud-python#9880).
  2. Wait until all optional & test dependencies have been released for Python 3.8. (test(bigquery_storage): add 3.8 unit tests (via synth)  google-cloud-python#9932 (comment))

Option 1 is much more preferable to option 2, as it means we'll be able to catch problems with the latest Python sooner rather than later.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Update the unit_test_dependencies and system_test_dependencies variables to accept a dictionary with accepted/excluded Python versions in addition to the package name. That way, we can exclude pandas / pyarrow on Python 3.8 until those packages have been released.

system_test_dependencies = [
    "pyfakefs",
    {"package": "pandas", "exclude_pythons": ["3.8"]},
]

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

More variables, maybe one per version? I think that'd promote too much duplication of package names when only one Python version is problematic at a time, usually.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Labels

type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions