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

Implement new_session functionality #282

Merged
merged 7 commits into from
May 12, 2018
Merged

Implement new_session functionality #282

merged 7 commits into from
May 12, 2018

Conversation

panagiks
Copy link
Contributor

Closes #281 .

Implements new_session functionality,

Update documentation to include new function.

Update demo code to use new_session for login view.

@codecov
Copy link

codecov bot commented May 10, 2018

Codecov Report

Merging #282 into master will increase coverage by 0.16%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #282      +/-   ##
==========================================
+ Coverage   96.92%   97.08%   +0.16%     
==========================================
  Files           4        4              
  Lines         195      206      +11     
  Branches       23       25       +2     
==========================================
+ Hits          189      200      +11     
  Misses          4        4              
  Partials        2        2
Impacted Files Coverage Δ
aiohttp_session/__init__.py 98.05% <100%> (+0.14%) ⬆️

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 0f921a1...4b86f8b. Read the comment docs.

@panagiks
Copy link
Contributor Author

I decided to make new_session a regular function (not a coroutine) since there is no reading/writing to the Storage at that point just the creation of an object and placement in the request dictionary.

If there's on objection with that implementation (i.e. you'd prefer to have it as a coroutine for uniformity with get_session) let me know :)

@asvetlov
Copy link
Member

I prefer a coroutine.

  1. If we'll need a coroutine in a future it's hard to convert a public API
  2. Making both get_session() and new_session() coroutines less confuses users.

@panagiks
Copy link
Contributor Author

Ok, I'll make the change (code and docs) in the evening :)

@panagiks
Copy link
Contributor Author

panagiks commented May 11, 2018

Should be good now. Let me know if any further changes are required :)

@asvetlov asvetlov merged commit 61c59b5 into aio-libs:master May 12, 2018
@asvetlov
Copy link
Member

Thanks.
2.5.0 released

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.

2 participants