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
Support python 3.11(TestCase) #1308
Comments
@hyeongguen-song I was able to get a containerized tortoise orm (0.19.0) application running/tested on python 3.11 using
Also I can provide more detail on the dockerfile / docker-compose and setup. Figured I'd chime in becase I spent last week trying to get our service upgraded to 3.11 as well. Cheers |
@alexf-bond Thank you for favor. |
I have not @hyeongguen-song :/, we're still using the db init fixture logic to spin up / down the database per test: @pytest_asyncio.fixture(scope="function", autouse=True)
def initialize_tests(request):
db_url = settings.POSTGRES_URI
models = TORTOISE_ORM_CONFIG["apps"]["models"]["models"]
initializer(models, db_url=db_url, app_label="models")
_restore_default()
connections.set("default", connections.get("models"))
loop = asyncio.get_event_loop()
loop.run_until_complete(init_sql())
request.addfinalizer(finalizer) We're using db transactions in the code we're testing so I wasn't sure how that'd interact with |
…TION) (#1410) * ci: add python3.11 * fix: testcase error with python3.11 (#1308) * Compare safe schema sql with github action result * chore: add comment * Allow ForeignKeyField(on_delete=NO_ACTION) (#1393) * fix Codacy complaint * Update pydantic example to use OnDelete Enum --------- Co-authored-by: long2ice <long2ice@gmail.com>
…TION) (tortoise#1410) * ci: add python3.11 * fix: testcase error with python3.11 (tortoise#1308) * Compare safe schema sql with github action result * chore: add comment * Allow ForeignKeyField(on_delete=NO_ACTION) (tortoise#1393) * fix Codacy complaint * Update pydantic example to use OnDelete Enum --------- Co-authored-by: long2ice <long2ice@gmail.com>
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
If already support python 3.11, then I'm really sorry.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Support python 3.11
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context about the feature request here.
connection is ok.
but at test case TestCase fail with python 3.11.1, tortoise-orm@0.19.2
Details
The text was updated successfully, but these errors were encountered: