Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Asyncheck#223

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
dpineiden wants to merge12 commits intorethinkdb:master
base:master
Choose a base branch
Loading
fromdpineiden:asyncheck
Open

Asyncheck#223

dpineiden wants to merge12 commits intorethinkdb:masterfromdpineiden:asyncheck

Conversation

@dpineiden
Copy link
Contributor

Reason for the change
The new versions of Python3 require use 'drain' after write. Some syntaxis corrections. Some better algorithms.

Description
Dropped the 'loop' parameter where is deprecated. After write, use 'drain'. A reader in an async loop. Use async/await pair. The modern statements
Some better asyncio exception (have some more to consider)

Code examples
On documentation:
https://docs.python.org/3/library/asyncio-stream.html#asyncio.StreamWriter

Uses on the tests scripts:
https://gitlab.com/pineiden/datadbs-rethinkdb/-/tree/master/tests

Save data:

  • load data on table: load_data.py
    Read data:
    read_data.py
    simple_loop_.py scripts
    simple_test_
    ,py script

Interact with rdb:
crea_perfiles.py

Checklist

References

https://docs.python.org/3/library/asyncio-stream.html#asyncio.StreamWriter

Using TaskLoop:
https://tasktools.readthedocs.io/en/latest/
Example:
https://gitlab.com/pineiden/tasktools/-/tree/master/test

Anything else related to the change e.g. documentations, RFCs, etc.

pineiden added3 commitsAugust 19, 2020 19:07
More safe on read-write actionsRead from stream use async loop
@dpineiden
Copy link
ContributorAuthor

I uploaded the corrections....I have to do a new PR?

@gabor-boros
Copy link
Member

Hm, it is weird that unit test are not reported... I'll need to take a look on it.

BTW, the tests are failing for the change:https://travis-ci.org/github/rethinkdb/rethinkdb-python/builds/721071084

@dpineiden
Copy link
ContributorAuthor

Now.

This:
this_task = asyncio.current_task()

In py3.8 exists the method 'current_task' for asyncio.

And """ error is for a docstring.

I think is all for now...

@dpineiden
Copy link
ContributorAuthor

I think this last 5 lines must be discussed with more people.

Onnet.py says 'many arguments', how we replace that? I use **kwargs and inside get the values that I need, but is a tricky way to be more flexible. (lines 612, 753)

Onnet_asyncio.py, current_task() is a method that exists since python3.8 so...

And the """ is for a docstrings :S

I can change 'db' to 'db_name', is not a problem.

@gabor-borosCodacy Production
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Issues======+ Solved 30- Added 5           Complexity increasing per file==============================- rethinkdb/asyncio_net/net_asyncio.py  1         Clones removed==============+ rethinkdb/net.py  -1

See the complete overview onCodacy

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@dpineiden@gabor-boros

[8]ページ先頭

©2009-2025 Movatter.jp