[
https://issues.apache.org/jira/browse/BEAM-6702?focusedWorklogId=207395&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-207395
]
ASF GitHub Bot logged work on BEAM-6702:
----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Mar/19 19:44
Start Date: 04/Mar/19 19:44
Worklog Time Spent: 10m
Work Description: aaltay commented on pull request #7851: [BEAM-6702]
Loosen up dependency specifications
URL: https://github.com/apache/beam/pull/7851#discussion_r262214064
##########
File path: sdks/python/setup.py
##########
@@ -142,11 +142,11 @@ def get_version():
'proto-google-cloud-datastore-v1>=0.90.0,<=0.90.4',
# [BEAM-4543] Datastore IO is not supported in Python 3.
'googledatastore>=7.0.1,<7.1; python_version < "3.0"',
- 'google-cloud-pubsub==0.39.0',
+ 'google-cloud-pubsub>=0.39.0',
# GCP packages required by tests
'google-cloud-bigquery>=1.6.0,<1.7.0',
- 'google-cloud-core==0.28.1',
- 'google-cloud-bigtable==0.31.1',
+ 'google-cloud-core>=0.28.1',
Review comment:
google-cloud-bigquery might be the only test dependency. (cc: @markflyhigh)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 207395)
Time Spent: 1h (was: 50m)
> GCP dependencies for the Python SDK are too restrictive
> -------------------------------------------------------
>
> Key: BEAM-6702
> URL: https://issues.apache.org/jira/browse/BEAM-6702
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Affects Versions: 2.12.0
> Reporter: Jamie Kirkpatrick
> Priority: Minor
> Time Spent: 1h
> Remaining Estimate: 0h
>
> The fix for [BEAM-3324|https://github.com/apache/beam/pull/7367] introduced a
> bunch of dependencies in the `[gcp]` `extras_require` specification and
> locked them to specific versions. Unfortunately this has the side-effect of
> making it probable that you get version conflicts downstream in projects that
> include `apache_beam` in their `requirements.txt`.
> As it stands I'm running into issues when I ask
> [`pip-compile`](https://github.com/jazzband/pip-tools) to resolve
> dependencies with `apache_beam` in the chain (specified like this `-e
> git+https://github.com/apache/beam.git@1d13199#egg=apache_beam[gcp]&subdirectory=sdks/python`)
> - example output:
> ```
> Could not find a version that matches google-cloud-core<0.29dev,
> <0.30dev,==0.28.1,>=0.28.0,>=0.29.0
> Tried: 0.20.0, 0.20.0, 0.20.0, 0.20.0, 0.21.0, 0.21.0, 0.21.0, 0.21.0,
> 0.22.0, 0.22.0, 0.22.0, 0.22.0, 0.22.1, 0.22.1, 0.22.1, 0.22.1, 0.23.0,
> 0.23.0, 0.23.0, 0.23.0, 0.23.1, 0.23.1, 0.23.1, 0.23.1, 0.24.0, 0.24.0,
> 0.24.0, 0.24.0, 0.24.1, 0.24.1, 0.24.1, 0.24.1, 0.25.0, 0.25.0, 0.25.0,
> 0.25.0, 0.26.0, 0.26.0, 0.26.0, 0.26.0, 0.27.0, 0.27.0, 0.27.0, 0.27.0,
> 0.27.1, 0.27.1, 0.27.1, 0.27.1, 0.28.0, 0.28.0, 0.28.0, 0.28.0, 0.28.1,
> 0.28.1, 0.28.1, 0.28.1, 0.29.0, 0.29.0, 0.29.0, 0.29.0, 0.29.1, 0.29.1,
> 0.29.1, 0.29.1
> There are incompatible versions in the resolved dependencies.
> ```
> Best practice is to lock your versions explicitly when you actually use a
> library (via a projects `requirements.txt`) but leave the requirements
> specifications as liberal as possible in `setup.py` - this allows some flex
> in the dependency resolution system so that you have a higher chance of
> different libraries playing nice.
> An example would be to change a requirement like
> `'google-cloud-bigtable==0.31.1'` to be `'google-cloud-bigtable>=0.31.1'`
> (unless you know of an explicit reason why there is an incompatibility with a
> newer version of the library) in the `setup.py` file.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)