-
Notifications
You must be signed in to change notification settings - Fork 193
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
Experimental async support #629
Conversation
fd7e654
to
11de5b8
Compare
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.
minor things
.editorconfig
Outdated
[*.{py,js,rst,txt,sh,bat}] | ||
trim_trailing_whitespace = true | ||
|
||
[{Makefile,Drockerfile}] |
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.
[{Makefile,Drockerfile}] | |
[{Makefile,Dockerfile}] |
.editorconfig
Outdated
trim_trailing_whitespace = true | ||
|
||
[*.bat] | ||
end_of_line =crlf |
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.
end_of_line =crlf | |
end_of_line = crlf |
.pre-commit-config.yaml
Outdated
- batch | ||
- id: trailing-whitespace | ||
args: [ --markdown-linebreak-ext=md ] | ||
# - repo: https://github.com/pycqa/flake8 |
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.
do you need to keep this one around?
CHANGELOG.md
Outdated
@@ -4,7 +4,10 @@ | |||
|
|||
- Python 3.10 support added | |||
- Python 3.6 support has been dropped. | |||
|
|||
- `Result`, `Session`, and `Transaction`, can no longer be imported from |
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.
- `Result`, `Session`, and `Transaction`, can no longer be imported from | |
- `Result`, `Session`, and `Transaction` can no longer be imported from |
CONTRIBUTING.md
Outdated
# or | ||
$ pre-commit run --file path/to/a/file | ||
``` | ||
For more details see [flake8](https://flake8.pycqa.org/). |
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.
flake8 is currently disabled in the hook, are these instructions still relevant?
********************************* | ||
AsyncSessions & AsyncTransactions | ||
********************************* | ||
All database activity is co-ordinated through two mechanisms: the :class:`neo4j.AsyncSession` and the :class:`neo4j.AsyncTransaction`. |
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.
All database activity is co-ordinated through two mechanisms: the :class:`neo4j.AsyncSession` and the :class:`neo4j.AsyncTransaction`. | |
All database activity is coordinated through two mechanisms: the :class:`neo4j.AsyncSession` and the :class:`neo4j.AsyncTransaction`. |
docs/source/async_api.rst
Outdated
|
||
A :class:`neo4j.AsyncSession` is a logical container for any number of causally-related transactional units of work. | ||
Sessions automatically provide guarantees of causal consistency within a clustered environment but multiple sessions can also be causally chained if required. | ||
Sessions provide the top-level of containment for database activity. |
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.
missing word after "top-level" or extra hyphen?
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 |
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.
# http://www.apache.org/licenses/LICENSE-2.0 | |
# https://www.apache.org/licenses/LICENSE-2.0 |
it would be nice to apply this change everywhere
# Carry out Bolt subclass imports locally to avoid circular dependency issues. | ||
from ._bolt3 import AsyncBolt3 | ||
from ._bolt4 import ( | ||
AsyncBolt4x0, |
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.
is there really a need for an async variant of these?
sent to the network, and a response is fetched. | ||
|
||
:param database: database for which to fetch a routing table | ||
:param imp_user: the user to impersonate |
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.
maybe add that it is only supported for Neo4j 4.4+
bed5142
to
9aff556
Compare
Co-authored-by: Florent Biville <florent.biville@neo4j.com>
@robsdedude How experimental is async in neo4j now? |
@Joshuaalbert 🤔 I'd say it's very likely to stay (still no guarantee). There are a hand full of smaller bugs in the preview release (5.0.0a1) which won't receive a released fix until the actual 5.0 alpha (with 5.0 features and API changes) goes out (probably in a few months from now). |
#180
Working on experimental* support for asyncio.
*experimental: it might be removed or change it's API at any time (including patch releases).