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

Update aiocontextvars to 0.2.0 #333

Merged
merged 2 commits into from
Sep 10, 2018

Conversation

pyup-bot
Copy link
Contributor

@pyup-bot pyup-bot commented Sep 9, 2018

This PR updates aiocontextvars from 0.1.2 to 0.2.0.

Changelog

0.2.0

------------------

**This is a breaking change.** Most implementation is replaced with
``contextvars``. In Python 3.5 and 3.6, ``aiocontextvars`` depends on
``contextvars`` the PEP-567 backport in PyPI, and patches it to partially
support asyncio; in Python 3.7 ``aiocontextvars`` is only a delegate to the
built-in ``contextvars`` library.

* Modified ``ContextVar.set()`` to return a token.
* Added ``ContextVar.reset(token)``.
* Removed ``ContextVar.delete()``.
* Removed ``enable_inherit()`` and ``disable_inherit()``, inherit is always enabled.
* Added ``copy_context()`` and ``Context.run()``.
* Removed ``Context.current()`` and ``Context.inherited``.
* Fixed issue that ``set_event_loop(None)`` fails (contributed by J.J. Jackson in 10 11)
Links

@coveralls
Copy link

coveralls commented Sep 9, 2018

Pull Request Test Coverage Report for Build 1182

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 98.251%

Totals Coverage Status
Change from base Build 1174: -0.01%
Covered Lines: 3932
Relevant Lines: 4002

💛 - Coveralls

@wwwjfy
Copy link
Member

wwwjfy commented Sep 9, 2018

@fantix Is it safe to merge? From the changelog, I assume some code to distinguish between contextvars and aiocontextvars can be removed.
But I don't see MagicStack/contextvars#2 closed, though you have a PR MagicStack/contextvars#11. I'm a bit confused. What's the status now?

@fantix
Copy link
Member

fantix commented Sep 9, 2018

It’s a bit weird how the tests passed when enable_inherit had been removed. I suppose it is not safe to merge yet.

MagicStack/contextvars#11 is very much the same as aiocontextvars 0.2, but that PR really requires some more discussion before it becomes final. I’d like to see how the proposal works as aiocontextvars 0.2 in GINO and how people thinks about the approach in action.

So after fixing the integration with 0.2, I’d like it merged before MagicStack/contextvars#11 have conclusion. And switching to contextvars shall be considered eventually after MagicStack/contextvars#2 is fixed.

@wwwjfy
Copy link
Member

wwwjfy commented Sep 9, 2018

enable_inherit has do-nothing fallback when ImportError happens, if this is what you mean. I haven't checked the new implementation, but I assume it works the same way except enable_inherit. If this is the case, tests should not be affected.

@fantix
Copy link
Member

fantix commented Sep 10, 2018

Ah yes, then it is safe to merge. I'll remove the enable_inherit s.

@fantix fantix merged commit e0a17ab into master Sep 10, 2018
@fantix fantix deleted the pyup-update-aiocontextvars-0.1.2-to-0.2.0 branch September 10, 2018 02:03
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