Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to slove #179 (aioredis 1.3.1 dropped explicit loop requirement in API) #180

Closed
wants to merge 11 commits into from

Conversation

edelvalle
Copy link

@edelvalle edelvalle commented Feb 9, 2020

Refs #179

@bjd183
Copy link

bjd183 commented Feb 29, 2020

It looks like you need to fix the linter error by moving import sys into alphabetical order (after import string).

@edelvalle
Copy link
Author

Nice! thanks!

Copy link
Member

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

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

OK, it's Sunday so... but... 🙂

I'm scratching my head just looking at this: we're checking the Python version before changing the call to aioredis. At first glance that doesn't seem right.

I'm sure if I read the linked issue through entirely it would make sense, but care to explain?
Thanks!

@bjd183
Copy link

bjd183 commented Mar 1, 2020

aioredis implements similar logic here. I don't know if this is the right approach or not. The underlying loop parameter is deprecated in Python 3.8 where it now automatically determines the appropriate loop (I think). Simply dropping the loop parameter is likely to break Python 3.6-3.7.

@bjd183
Copy link

bjd183 commented Mar 1, 2020 via email

@edelvalle
Copy link
Author

edelvalle commented Mar 6, 2020

I think you are right, is a combination of the version of python and aioredis. I have to check both.

right?

@bjd183
Copy link

bjd183 commented Mar 8, 2020

@edelvalle Perhaps if sys.version_info >= (3, 8, 0) and tuple(map(int, aioredis.__version__.split('.'))) >= (1, 3, 1): will be acceptable.

@edelvalle
Copy link
Author

@bjd183 thanks for the advice, I was busy but finally managed to do as instructed by you.
btw, also made black tell what's the problem when it gets angry with our code 😄

@bjd183
Copy link

bjd183 commented Apr 2, 2020

@carltongibson how does this look?

@carltongibson
Copy link
Member

Hi both, thanks for the work here. Looks good.

Currently in a tight spot. 🦠 disrupting pretty much everything, so I've had ≈0 time to look at anything. I have a commitment to DRF on my list and then I'll have the capacity for Channels &co.

If you have a bit of time to look over the other issues/PRs (maybe with @tarikki, who's been active) then I'm happy to take group consensus on issues and we can put out a release as first job back. (Equally, no stress if you don't have such capacity.)

Copy link
Member

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

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

OK, this looks sensible.

Can you split it into 2 commits? One for the CI change, and one for the fix.

Good work! 👍

@bjd183
Copy link

bjd183 commented May 3, 2020

What is the best way to reduce to two commits? Squash usually results in a single commit, right? Can this be done with rebase? Or does it require cherry-pick? And are any of these possible now that the changes have already been committed and pushed?

@bjd183
Copy link

bjd183 commented May 3, 2020

Also, (I've not done this before) is it possible for me to contribute to a pull request that I do not own? How would I do so? It is not obvious to me via this interface.

@bjd183
Copy link

bjd183 commented May 3, 2020

@edelvalle you could also revert the CI change to black and limit this PR to the fix so it can be easily squashed.

@wmorrell
Copy link
Contributor

@bjd183 How I would split one commit into two:

  1. Checkout branch containing the commit to split: git checkout edelvalle/master
  2. Make new branch from the original: git checkout -b gh-179
  3. Rewind the commit, so HEAD is at the parent and the changes in the commit are in working copy: git reset HEAD~
  4. Add in changes for first commit with: git add and/or git add -p
  5. Do the first commit: git commit
  6. Add in changes for second commit: git add
  7. Do the second commit: git commit
  8. Push
  9. Beverage

@carltongibson
Copy link
Member

Thanks @wmorrell. (Been knocked sideways by the current situation so had little time...)

@bjd183
Copy link

bjd183 commented May 26, 2020

Alright, I gave that a try. I had to fork edelvalle/master since I cannot commit directly to it. I was able to rewind and reset to squash commits to just two. But I wasn't able to push without an additional merge commit since I was then behind the remote tracking branch. I created a PR on edelvalle/master which, once merged, I assume propagates to this PR. I'm curious to see how this works since the original set of multiple commits still exists in the history.

Trying to slove django#179 (aioredis 1.3.1 dropped explicit loop requirement in API)
@edelvalle
Copy link
Author

This is worse, now I have even more commits, let me try to undo all this

@wmorrell
Copy link
Contributor

Oops, I should have mentioned that it's usually cleaner to re-submit a pull request than to alter (someone else's) existing request. I tried to go for that by adding instruction to make a new branch, but failed to take the suggestion all the way to new PR. I also should have suggested squashing before the git reset HEAD~, as it doesn't work very well to reset last commit when the upstream has a small handful of commits instead of one :)

@edelvalle, I will do a fork a bit later to get just the two commits requested. If you would like to give it a shot, I suggest use of a few rounds of git rebase -i origin/master along with the git reset HEAD~ and git add -p tools. I'll keep a log of the commands I use, so hopefully it helps someone in the future.

@bjd183
Copy link

bjd183 commented May 27, 2020

@wmorrell Thanks for the clarification.

@carltongibson
Copy link
Member

Closing in favour of #193. Thanks all!

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.

4 participants