GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Restore context on listen in UVStreamServer. Fix #305 by versusvoid · Pull Request #306 · MagicStack/uvloop

Conversation

@versusvoid

@versusvoid versusvoid commented Dec 18, 2019

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@1st1 1st1 mentioned this pull request Mar 17, 2020
contextvars.Context not activated for connection_made() #305
Closed
fantix
fantix requested changes Mar 29, 2020
View reviewed changes

@fantix fantix left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Other than the unstable test issue, I'm okay with this PR. Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/test_context.py Outdated
Comment on lines +165 to +166
# Let all transports shutdown.
await asyncio.sleep(0.1)

@fantix fantix Mar 29, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Using sleep is generally not recommended for new tests in uvloop - this test is actually unstable, I could get a false OK if the srv.close() got called before the connection is fully established.

A proper fix is to use a Future, set in factory() and awaited in test() - we could even pass over the assertion error in this manner. With this fix, the ResourceWarning is also gone.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@versusvoid versusvoid Mar 30, 2020

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Ok, fixed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
fantix
fantix reviewed Mar 30, 2020
View reviewed changes

@fantix fantix left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Please see suggested changes below - could you please also rebase your commits to latest master so that the test suite may pass? Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/test_context.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

fantix
fantix reviewed Mar 30, 2020
View reviewed changes
Comment thread tests/test_context.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@1st1

1st1 commented Mar 31, 2020

Copy link
Copy Markdown
Member

This particular fix is OK, but we need to fix this for all other "native" callbacks in uvloop in a more systematic way.

fantix and versusvoid reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@versusvoid
Restore context on listen in UVStreamServer. Fix #305
b1a6225
fantix pushed a commit to fantix/uvloop that referenced this pull request May 25, 2020
@versusvoid @fantix
Test to cover restoring context on listen in UVStreamServer
451aa9c
Closes MagicStack#306
fantix pushed a commit to fantix/uvloop that referenced this pull request Jan 21, 2021
@versusvoid @fantix
Test to cover restoring context on listen in UVStreamServer
68e6c59
Closes MagicStack#306
fantix pushed a commit to fantix/uvloop that referenced this pull request Jan 22, 2021
@versusvoid @fantix
Test to cover restoring context on listen in UVStreamServer
4652a5a
Closes MagicStack#306
@fantix

fantix commented Feb 5, 2021

Copy link
Copy Markdown
Member

Merged in #348. Thanks for the PR!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@fantix fantix closed this Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@fantix fantix fantix requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@versusvoid @1st1 @fantix
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.