Skip to content

Conversation

@sigmavirus24
Copy link
Contributor

@sigmavirus24 sigmavirus24 commented Nov 22, 2021

Add some code that allows for arrow > 1.0 so that we can stop
restricting this for users relying on distribution packages. This code
handles the divergent behaviour of arrow on the 1.x and 0.x branches.

Related-to Backblaze/b2-sdk-python#201
Unblocks Backblaze/b2-sdk-python#204
Closes #687

@mlech-reef
Copy link
Contributor

mlech-reef commented Nov 22, 2021

You have introduced a conflict between the required arrow versions from SDK and CLI:
https://github.com/Backblaze/b2-sdk-python/blob/5aed7b6bf8f25f8eacdc41c9df4c003cef2e2c5d/requirements.txt#L1

So you can not say it closes Backblaze/b2-sdk-python#201. I think we must first remove the upper bound from the SDK, before we can merge this.

@sigmavirus24
Copy link
Contributor Author

Sorry, I grabbed the wrong link. I meant to say it unblocks Backblaze/b2-sdk-python#204 I believe from being merged. To be fair though, the sdk doesn't require the ability to .format() anything from arrow and could have been relaxed sooner assuming the CLI has its own restriction arrow that it places before the SDK.

I can mirror the requirements update to the SDK but I don't know what order they'd need to be merged in for the two to be happy

@sigmavirus24
Copy link
Contributor Author

Backblaze/b2-sdk-python#293 is the companion update to the requirements there

Copy link
Contributor

@mlech-reef mlech-reef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the changelog

@sigmavirus24
Copy link
Contributor Author

Please update the changelog

Done

@sigmavirus24
Copy link
Contributor Author

And rebased on top of master as well

@sigmavirus24
Copy link
Contributor Author

Do I need to do anything else?

@ppolewicz
Copy link
Collaborator

I'm sorry, this ticket was lost in handover between me and Maciej. The linter has an issue with your vertical spacing, please see the log - you have to add a newline in one place and then we should be good to go.

@ppolewicz
Copy link
Collaborator

@sigmavirus24 please tag me when you adjust this spacing and then we'll go ahead and merge it. It makes sense to release it before 3.6 EOL :)

@sigmavirus24
Copy link
Contributor Author

@ppolewicz reformatted!

Copy link
Collaborator

@ppolewicz ppolewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It now says A version heading needs an empty line after on line 7.

It would be faster if you ran those tests locally before pushing, I think nox allows you to run linters by nox -s lint

@sigmavirus24
Copy link
Contributor Author

It would be faster if you ran those tests locally before pushing, I think nox allows you to run linters by nox -s lint

I can't build the linter locally:

~/sandbox/B2_Command_Line_Tool on arrow-compat ❯ nox -s lint                                                                    at 06:23:25
nox > Running session lint
nox > Creating virtual environment (virtualenv) using python3.10 in .nox/lint
nox > python -m pip install -e .
nox > Command python -m pip install -e . failed with exit code 1:
Obtaining file:///home/sigmavirus24/sandbox/B2_Command_Line_Tool
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting b2sdk<2.0.0,>=1.13.0
  Downloading b2sdk-1.13.0.tar.gz (273 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting docutils==0.16
  Using cached docutils-0.16-py2.py3-none-any.whl (548 kB)
Collecting phx-class-registry==3.0.5
  Downloading phx_class_registry-3.0.5-py3-none-any.whl (11 kB)
Collecting rst2ansi==0.1.5
  Downloading rst2ansi-0.1.5-py3-none-any.whl (18 kB)
Collecting arrow<2.0.0,>=1.0.2
  Using cached arrow-1.2.1-py3-none-any.whl (63 kB)
Collecting python-dateutil>=2.7.0
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
INFO: pip is looking at multiple versions of arrow to determine which version is compatible with other requirements. This could take a while.
Collecting arrow<2.0.0,>=1.0.2
  Using cached arrow-1.2.0-py3-none-any.whl (62 kB)
  Downloading arrow-1.1.1-py3-none-any.whl (60 kB)
  Downloading arrow-1.1.0-py3-none-any.whl (58 kB)
  Using cached arrow-1.0.3-py3-none-any.whl (54 kB)
  Downloading arrow-1.0.2-py3-none-any.whl (54 kB)
INFO: pip is looking at multiple versions of rst2ansi to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of phx-class-registry to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of docutils to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of b2 to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install b2 and b2==3.1.1.dev12+g99dfd2b because these package versions have conflicting dependencies.

The conflict is caused by:
    b2 3.1.1.dev12+g99dfd2b depends on arrow<2.0.0 and >=1.0.2
    b2sdk 1.13.0 depends on arrow<1.0.0 and >=0.8.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
nox > Session lint failed.

Add some code that allows for arrow > 1.0 so that we can stop
restricting this for users relying on distribution packages. This code
handles the divergent behaviour of arrow on the 1.x and 0.x branches.

References Backblaze/b2-sdk-python#201
Closes Backblaze#687
@sigmavirus24
Copy link
Contributor Author

I finally got tests running locally and got them passing. 🤞🏽 this is the last revision necessary

@ppolewicz ppolewicz merged commit 955a96f into Backblaze:master Dec 16, 2021
@ppolewicz
Copy link
Collaborator

@sigmavirus24 congratulations on the successful contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test and upgrade to arrow 1.0.2+

3 participants