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

Allow CapacityLimiter(math.inf) #728

Merged
merged 6 commits into from
Oct 29, 2018
Merged

Conversation

merrellb
Copy link

@merrellb merrellb commented Oct 9, 2018

Looking to make my first (small) contribution to trio with a "good first issue" (#618)

@njsmith
Copy link
Member

njsmith commented Oct 10, 2018

Awesome!

The change looks good. You have a test failure with Travis, and it looks like it's just due to bad formatting: https://travis-ci.org/python-trio/trio/jobs/438987364
There are some hints in that build log, but basically to fix it you just need to run pip install yapf==0.24.0; yapf -rpi setup.py trio.

Also, could you add a release note for this change? https://trio.readthedocs.io/en/latest/contributing.html#pull-request-release-notes
This just means adding a new file at newsfragments/618.feature.rst, with a one-sentence description of the change. (Sphinx/ReST markup is supported, since this eventually ends up in the manual.)

@njsmith
Copy link
Member

njsmith commented Oct 19, 2018

@merrellb ping! still interested in working on this?

@merrellb
Copy link
Author

merrellb commented Oct 19, 2018 via email

@codecov
Copy link

codecov bot commented Oct 24, 2018

Codecov Report

Merging #728 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #728      +/-   ##
==========================================
+ Coverage   99.34%   99.34%   +<.01%     
==========================================
  Files          96       96              
  Lines       11577    11588      +11     
  Branches      827      827              
==========================================
+ Hits        11501    11512      +11     
  Misses         56       56              
  Partials       20       20
Impacted Files Coverage Δ
trio/_sync.py 100% <100%> (ø) ⬆️
trio/tests/test_sync.py 100% <100%> (ø) ⬆️
trio/_wait_for_object.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c021677...b989e87. Read the comment docs.

@merrellb
Copy link
Author

I've fixed the yapf formatting but the newsfragment seems to be causing an error in Jenkins. When I click on Details I get a 404. Any suggestions on what I am doing wrong?

@pquentin
Copy link
Member

Closing and reopening to see if that fixes the issue.

@pquentin pquentin closed this Oct 24, 2018
@pquentin pquentin reopened this Oct 24, 2018
@pquentin
Copy link
Member

That did not help, sorry.

@merrellb
Copy link
Author

Thanks anyway :-) Are there other steps worth trying or should I just close and resubmit the pull request?

@njsmith
Copy link
Member

njsmith commented Oct 24, 2018

Looks like the Jenkins server is having some trouble... I pinged the admins.

@njsmith
Copy link
Member

njsmith commented Oct 24, 2018

The issue with viewing the Jenkins logs is: #749

The build failure was some random nonsense, like a network timeout or something. Re-running the build fixed it.

@njsmith
Copy link
Member

njsmith commented Oct 24, 2018

(But unfortunately, due to the issues described in #749, I'm the only one who can re-run a build right now so... yeah. Jenkins is frustrating.)

@@ -115,6 +115,21 @@
c.release_on_behalf_of("value 1")


async def test_CapacityLimiter_inf():
Copy link
Contributor

@jxub jxub Oct 26, 2018

Choose a reason for hiding this comment

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

The mixed CamelCase here probably breaks PEP-8: https://pep8.org/#function-names

Edit: There's a similar case in the function below already so I guess this is fine.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, PEP 8 is a set of guidelines to encourage consistency and readability, not strict rules that Guido wants you to follow mindlessly :-). (He actually got frustrated at the pep8 tool and asked its devs to rename it to "pycodestyle", because he didn't think PEP 8 can be enforced by an automatic tool.) Here, no one is going to get confused by the name into thinking it's anything besides a function, and the name is descriptive, so... works for me.

@njsmith
Copy link
Member

njsmith commented Oct 28, 2018

I added sphinx markup to the newsfragment (and tweaked the wording a little bit).

@njsmith njsmith merged commit 9fbb096 into python-trio:master Oct 29, 2018
@njsmith
Copy link
Member

njsmith commented Oct 29, 2018

Okay merged! 🎉 🎂 And, no pressure, but if you'd like to keep contributing then we'd love to have you, so I'm sending you a github invite now. You can read more about this in our contributing documentation.

@merrellb
Copy link
Author

merrellb commented Oct 29, 2018 via email

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