Skip to content

BotBuilder, as a library, should not pin 3rd party dependencies #1467

Closed
@cognifloyd

Description

@cognifloyd

Version

4.11.0

Describe the bug

I'm trying to add BotBuilder to an app that already has ibm-watson as a dependency.
The conflict is due to botbuilder-core pinning a very old version of PyJWT.
ibm-watson needs ibm-cloud-sdk-core which needs PyJWT. ibm-cloud-sdk-core uses a range of versions, specifying PyJWT>=2.0.0a1,<3.0.0 in the last few versions, but for all older versions, it required PyJWT>=1.7.1.

BotBuilder is a library meant to be embedded in other applications, so pinning 3rd party deps is dangerous.
Looking through the dependencies in the various botbuilder libraries, it looks like several have dependencies that are pinned instead of specifying a range of valid versions. For the microsoft-provided deps, pinning makes perfect sense. For 3rd party deps, please do not pin the dep version (instead specify a range) and allow the application that is using the botbuilder framework to pin its own deps

To Reproduce

Steps to reproduce the behavior:

  1. pip install --upgrade pip (in a virtualenv) to use the new resolver that refuses to install conflicting dependencies
  2. pip install ibm-watson botbuilder-core==4.11.0
  3. pip backtracks for awhile until it gets to some very old versions of ibm-watson that it can't process and dies.
  4. even if pip could process the old versions, no version of the ibm lib ever supported version 1.5.3 of PyJWT that was released in 2018.

Expected behavior

For microsoft/azure libraries, go ahead and pin the deps. The botbuilder itself is versioned together, so pinning makes perfect sense.

If you want to pin the version 3rd party deps in requirements.txt, that also is fine so that you can say "This is the most tested/supported version". But please, in setup.py, specify a range of valid versions for 3rd party deps to ease integrating BotBuilder in existing applications.

Additional context

Here are the 3rd party dependency lines in setup.py that pin 3rd party deps in 4.11.0 (the deps are still pinned in main/4.12.0):

PyJWT, requests, cryptography

very common packages, likely to cause conflicts. Caused a conflict for me

"requests==2.23.0",
"cryptography==2.8.0",
"PyJWT==1.5.3",

aiohttp

very common package, likely to cause conflicts




Unpinning aiohttp in botbuilder-aialso requires bumping the required version of aioresponses to at least 0.7.1 to get this fix pnuckowski/aioresponses#174 (adds support for aiohttp 3.7+):

babel

common package, likely to cause conflicts

jsonpickle

less common package, so I'm not as concerned.


Metadata

Metadata

Assignees

Labels

Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.backlogThe issue is out of scope for the current iteration but it will be evaluated in a future release.bugIndicates an unexpected problem or an unintended behavior.customer-replied-toIndicates that the team has replied to the issue reported by the customer. Do not delete.customer-reportedIssue is created by anyone that is not a collaborator in the repository.needs-triageThe issue has just been created and it has not been reviewed by the team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions