Bug 1959305
| Summary: | python-sqlalchemy fails to build with Python 3.10: DeprecationWarning: There is no current event loop | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> |
| Component: | python-sqlalchemy | Assignee: | Nils Philippsen <nphilipp> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | infra-sig, lewk, mbacovsk, mbayer, mhroncok, nphilipp, thrnciar |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-sqlalchemy-1.4.15-2.fc35 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-06-13 20:30:40 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1959317 | ||
| Bug Blocks: | 1890881 | ||
this might serve to repair from the sqlalchemy side
diff --git a/lib/sqlalchemy/testing/warnings.py b/lib/sqlalchemy/testing/warnings.py
index 3236ecf893..b8eebc31e9 100644
--- a/lib/sqlalchemy/testing/warnings.py
+++ b/lib/sqlalchemy/testing/warnings.py
@@ -23,7 +23,9 @@ def setup_filters():
warnings.filterwarnings("error", category=sa_exc.SAWarning)
# some selected deprecations...
- warnings.filterwarnings("error", category=DeprecationWarning)
+ warnings.filterwarnings(
+ "error", category=DeprecationWarning, module="sqlalchemy"
+ )
warnings.filterwarnings(
"ignore", category=DeprecationWarning, message=".*StopIteration"
)
I've patched execnet. Running a test build of sqlalchemy. OK, fixed in execnet. Sorry for the noise. *** This bug has been marked as a duplicate of bug 1959317 *** With fixed execnet there are some other test failures with latest beta of Python 3.10.
=================================== FAILURES ===================================
_________________ TestAsyncAdaptedQueue.test_error_other_loop __________________
[gw1] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/base/test_concurrency_py3k.py", line 208, in test_error_other_loop
is_true(run[0])
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/assertions.py", line 247, in is_true
is_(bool(a), True, msg=msg)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/assertions.py", line 256, in is_
assert a is b, msg or "%r is not %r" % (a, b)
AssertionError: False is not True
assert False is True
______________________ TestAsyncioCompat.test_async_error ______________________
[gw1] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 783, in decorate
asyncio._run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/asyncio.py", line 33, in _run_coroutine_function
return _util_async_run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/_concurrency_py3k.py", line 155, in _util_async_run_coroutine_function
loop = asyncio.get_event_loop()
DeprecationWarning: There is no current event loop
______________ TestAsyncioCompat.test_await_fallback_no_greenlet _______________
[gw1] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/base/test_concurrency_py3k.py", line 60, in test_await_fallback_no_greenlet
await_fallback(to_await)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/_concurrency_py3k.py", line 77, in await_fallback
loop = asyncio.get_event_loop()
DeprecationWarning: There is no current event loop
________________ TestAsyncioCompat.test_await_only_no_greenlet _________________
[gw1] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 783, in decorate
asyncio._run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/asyncio.py", line 33, in _run_coroutine_function
return _util_async_run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/_concurrency_py3k.py", line 155, in _util_async_run_coroutine_function
loop = asyncio.get_event_loop()
DeprecationWarning: There is no current event loop
__________________________ TestAsyncioCompat.test_ok ___________________________
[gw1] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 783, in decorate
asyncio._run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/asyncio.py", line 33, in _run_coroutine_function
return _util_async_run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/_concurrency_py3k.py", line 155, in _util_async_run_coroutine_function
loop = asyncio.get_event_loop()
DeprecationWarning: There is no current event loop
______________________ TestAsyncioCompat.test_sync_error _______________________
[gw1] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 783, in decorate
asyncio._run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/asyncio.py", line 33, in _run_coroutine_function
return _util_async_run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/_concurrency_py3k.py", line 155, in _util_async_run_coroutine_function
loop = asyncio.get_event_loop()
DeprecationWarning: There is no current event loop
_________________ TestAsyncioCompat.test_await_fallback_error __________________
[gw0] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 783, in decorate
asyncio._run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/asyncio.py", line 33, in _run_coroutine_function
return _util_async_run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/_concurrency_py3k.py", line 155, in _util_async_run_coroutine_function
loop = asyncio.get_event_loop()
DeprecationWarning: There is no current event loop
___________________ TestAsyncioCompat.test_await_only_error ____________________
[gw0] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 783, in decorate
asyncio._run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/asyncio.py", line 33, in _run_coroutine_function
return _util_async_run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/_concurrency_py3k.py", line 155, in _util_async_run_coroutine_function
loop = asyncio.get_event_loop()
DeprecationWarning: There is no current event loop
______________________ TestAsyncioCompat.test_contextvars ______________________
[gw0] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 783, in decorate
asyncio._run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/asyncio.py", line 33, in _run_coroutine_function
return _util_async_run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/_concurrency_py3k.py", line 155, in _util_async_run_coroutine_function
loop = asyncio.get_event_loop()
DeprecationWarning: There is no current event loop
_____________________ TestAsyncioCompat.test_require_await _____________________
[gw0] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 783, in decorate
asyncio._run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/asyncio.py", line 33, in _run_coroutine_function
return _util_async_run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/_concurrency_py3k.py", line 155, in _util_async_run_coroutine_function
loop = asyncio.get_event_loop()
DeprecationWarning: There is no current event loop
_____________ TextSyncDBAPI.test_sync_driver_execution[<lambda>0] ______________
[gw1] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 783, in decorate
asyncio._run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/asyncio.py", line 33, in _run_coroutine_function
return _util_async_run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/_concurrency_py3k.py", line 155, in _util_async_run_coroutine_function
loop = asyncio.get_event_loop()
DeprecationWarning: There is no current event loop
_____________ TextSyncDBAPI.test_sync_driver_execution[<lambda>2] ______________
[gw1] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 783, in decorate
asyncio._run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/asyncio.py", line 33, in _run_coroutine_function
return _util_async_run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/_concurrency_py3k.py", line 155, in _util_async_run_coroutine_function
loop = asyncio.get_event_loop()
DeprecationWarning: There is no current event loop
_____________ TextSyncDBAPI.test_sync_driver_execution[<lambda>1] ______________
[gw0] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 783, in decorate
asyncio._run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/asyncio.py", line 33, in _run_coroutine_function
return _util_async_run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/_concurrency_py3k.py", line 155, in _util_async_run_coroutine_function
loop = asyncio.get_event_loop()
DeprecationWarning: There is no current event loop
___________________ TextSyncDBAPI.test_sync_driver_run_sync ____________________
[gw0] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 783, in decorate
asyncio._run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/asyncio.py", line 33, in _run_coroutine_function
return _util_async_run_coroutine_function(fn, *args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/_concurrency_py3k.py", line 155, in _util_async_run_coroutine_function
loop = asyncio.get_event_loop()
DeprecationWarning: There is no current event loop
________________________ CreateEngineTest.test_bad_args ________________________
[gw1] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/engine/test_parseconnect.py", line 523, in test_bad_args
assert_raises(
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/assertions.py", line 324, in assert_raises
return _assert_raises(except_cls, callable_, args, kw, check_context=True)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/testing/assertions.py", line 348, in _assert_raises
callable_(*args, **kwargs)
File "<string>", line 2, in create_engine
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/deprecations.py", line 298, in warned
return fn(*args, **kwargs)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/engine/create.py", line 522, in create_engine
entrypoint = u._get_entrypoint()
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/engine/url.py", line 653, in _get_entrypoint
cls = registry.load(name)
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/langhelpers.py", line 334, in load
for impl in compat.importlib_metadata_get(self.group):
File "/builddir/build/BUILD/SQLAlchemy-1.4.14/test/../lib/sqlalchemy/util/compat.py", line 116, in importlib_metadata_get
return importlib_metadata.entry_points().get(group, ())
File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 305, in get
flake8_bypass(self._warn)()
DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.
"DeprecationWarning: There is no current event loop" is caused by this change:
bpo-39529: Deprecated use of asyncio.get_event_loop() without running event loop. Emit deprecation warning for asyncio functions which implicitly create a Future or Task objects if there is no running event loop and no explicit loop argument is passed: ensure_future(), wrap_future(), gather(), shield(), as_completed() and constructors of Future, Task, StreamReader, StreamReaderProtocol.
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla.
The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide.
You can either build the package in the side tag, with:
$ fedpkg build --target=f35-python
Or you can the build and we will eventually build it for you.
Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away.
Thanks.
See also https://fedoraproject.org/wiki/Changes/Python3.10
If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build. Tomáš and Miro, thanks for getting this solved! Much appreciated. |
python-sqlalchemy fails to build with Python 3.10.0b1: + /usr/bin/python3 -m pytest test --numprocesses=auto ============================= test session starts ============================== platform linux -- Python 3.10.0b1, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3 cachedir: .pytest_cache rootdir: /builddir/build/BUILD/SQLAlchemy-1.4.14, configfile: setup.cfg plugins: xdist-2.2.1, forked-1.3.0 gw0 I / gw1 I [gw0] linux Python 3.10.0 cwd: /builddir/build/BUILD/SQLAlchemy-1.4.14 INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/usr/lib/python3.10/site-packages/execnet/gateway_base.py", line 592, in setcallback INTERNALERROR> olditem = items.get(block=False) INTERNALERROR> File "/usr/lib64/python3.10/queue.py", line 168, in get INTERNALERROR> raise Empty INTERNALERROR> _queue.Empty INTERNALERROR> INTERNALERROR> During handling of the above exception, another exception occurred: INTERNALERROR> INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 267, in wrap_session INTERNALERROR> config.hook.pytest_sessionstart(session=session) INTERNALERROR> File "/usr/lib/python3.10/site-packages/pluggy/hooks.py", line 286, in __call__ INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 93, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 84, in <lambda> INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( INTERNALERROR> File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/usr/lib/python3.10/site-packages/xdist/dsession.py", line 78, in pytest_sessionstart INTERNALERROR> nodes = self.nodemanager.setup_nodes(putevent=self.queue.put) INTERNALERROR> File "/usr/lib/python3.10/site-packages/xdist/workermanage.py", line 65, in setup_nodes INTERNALERROR> return [self.setup_node(spec, putevent) for spec in self.specs] INTERNALERROR> File "/usr/lib/python3.10/site-packages/xdist/workermanage.py", line 65, in <listcomp> INTERNALERROR> return [self.setup_node(spec, putevent) for spec in self.specs] INTERNALERROR> File "/usr/lib/python3.10/site-packages/xdist/workermanage.py", line 73, in setup_node INTERNALERROR> node.setup() INTERNALERROR> File "/usr/lib/python3.10/site-packages/xdist/workermanage.py", line 269, in setup INTERNALERROR> self.channel.setcallback(self.process_from_remote, endmarker=self.ENDMARK) INTERNALERROR> File "/usr/lib/python3.10/site-packages/execnet/gateway_base.py", line 594, in setcallback INTERNALERROR> if not (self._closed or self._receiveclosed.isSet()): INTERNALERROR> File "/usr/lib64/python3.10/threading.py", line 557, in isSet INTERNALERROR> warnings.warn('isSet() is deprecated, use is_set() instead', INTERNALERROR> DeprecationWarning: isSet() is deprecated, use is_set() instead Exception ignored in: <function Channel.__del__ at 0x7f430eb91630> I believe the warning comes from execnet, but sqlalchemy tests treat it as error. https://docs.python.org/3.10/whatsnew/3.10.html#deprecated """ The following threading methods are now deprecated: threading.currentThread => threading.current_thread() threading.activeCount => threading.active_count() threading.Condition.notifyAll => threading.Condition.notify_all() threading.Event.isSet => threading.Event.is_set() threading.Thread.setName => threading.Thread.name threading.thread.getName => threading.Thread.name threading.Thread.isDaemon => threading.Thread.daemon threading.Thread.setDaemon => threading.Thread.daemon """ For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/02177245-python-sqlalchemy/ For all our attempts to build python-sqlalchemy with Python 3.10, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-sqlalchemy/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/ Let us know here if you have any questions. Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.