-
Notifications
You must be signed in to change notification settings - Fork 306
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
Try testing against python 3.12 #1282
Conversation
Error during setup ( ERROR: Exception:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.12.0-beta.1/x64/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 169, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.0-beta.1/x64/lib/python3.12/site-packages/pip/_internal/commands/debug.py", line 195, in run
show_vendor_versions()
File "/opt/hostedtoolcache/Python/3.12.0-beta.1/x64/lib/python3.12/site-packages/pip/_internal/commands/debug.py", line 101, in show_vendor_versions
show_actual_vendor_versions(vendor_txt_versions)
File "/opt/hostedtoolcache/Python/3.12.0-beta.1/x64/lib/python3.12/site-packages/pip/_internal/commands/debug.py", line 81, in show_actual_vendor_versions
actual_version = get_vendor_version_from_module(module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.0-beta.1/x64/lib/python3.12/site-packages/pip/_internal/commands/debug.py", line 61, in get_vendor_version_from_module
module = get_module_from_module_name(module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.0-beta.1/x64/lib/python3.12/site-packages/pip/_internal/commands/debug.py", line 56, in get_module_from_module_name
__import__(f"pip._vendor.{module_name}", globals(), locals(), level=0)
File "/opt/hostedtoolcache/Python/3.12.0-beta.1/x64/lib/python3.12/site-packages/pip/_vendor/typing_extensions.py", line 1174, in <module>
class TypeVar(typing.TypeVar, _DefaultMixin, _root=True):
TypeError: type 'typing.TypeVar' is not an acceptable base type |
I opened pypa/pip#12053 |
Okay, now we're blocked on cython support, so we can build |
I believe pyzmq 25.1 should build on 3.12b1 now, if you want to try again |
Works, thanks! Next step, we need to ignore a warning from ImportError while loading conftest '/home/runner/work/jupyter_server/jupyter_server/tests/conftest.py'.
tests/conftest.py:4: in <module>
from nbformat import writes
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/nbformat/__init__.py:11: in <module>
from . import v1, v2, v3, v4
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/nbformat/v4/__init__.py:23: in <module>
from .convert import downgrade, upgrade
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/nbformat/v4/convert.py:11: in <module>
from nbformat import v3, validator
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/nbformat/validator.py:16: in <module>
from .json_compat import ValidationError, _validator_for_name, get_current_validator
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/nbformat/json_compat.py:11: in <module>
import jsonschema
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/jsonschema/__init__.py:13: in <module>
from jsonschema._format import FormatChecker
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/jsonschema/_format.py:494: in <module>
import isoduration
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/isoduration/__init__.py:3: in <module>
from isoduration.parser import parse_duration
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/isoduration/parser/__init__.py:2: in <module>
from isoduration.parser.parsing import parse_date_duration
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/isoduration/parser/parsing.py:4: in <module>
import arrow # type: ignore
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/arrow/__init__.py:2: in <module>
from .api import get, now, utcnow
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/arrow/api.py:12: in <module>
from arrow.arrow import TZ_EXPR, Arrow
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/arrow/arrow.py:32: in <module>
from dateutil import tz as dateutil_tz
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/dateutil/tz/__init__.py:2: in <module>
from .tz import *
../../../.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/dateutil/tz/tz.py:37: in <module>
EPOCH = datetime.datetime.utcfromtimestamp(0)
E DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.fromtimestamp(timestamp, datetime.UTC). |
Next error is from pytest: pytest-dev/pytest#10977 |
Okay, something that needs to change in ServerApp:filemanager.py:942 Error while saving file: foo/.hidden_dir/nb.ipynb The default datetime adapter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes
Traceback (most recent call last):
File "/home/runner/work/jupyter_server/jupyter_server/jupyter_server/services/contents/filemanager.py", line 927, in save
self.check_and_sign(nb, path)
File "/home/runner/work/jupyter_server/jupyter_server/jupyter_server/services/contents/manager.py", line 713, in check_and_sign
self.notary.sign(nb)
File "/home/runner/.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/nbformat/sign.py", line 464, in sign
self.store.store_signature(signature, self.algorithm)
File "/home/runner/.local/share/hatch/env/virtual/jupyter-server/horQbOoS/test/lib/python3.12/site-packages/nbformat/sign.py", line 202, in store_signature
self.db.execute(
File "/opt/hostedtoolcache/Python/3.12.0-beta.1/x64/lib/python3.12/sqlite3/dbapi2.py", line 68, in adapt_datetime
warn(msg.format(what="datetime adapter"), DeprecationWarning, stacklevel=2)
DeprecationWarning: The default datetime adapter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes |
.github/workflows/python-tests.yml
Outdated
@@ -26,6 +26,8 @@ jobs: | |||
python-version: "pypy-3.8" | |||
- os: macos-latest | |||
python-version: "3.10" | |||
- os: ubuntu-latest | |||
python-version: "3.12.0-beta.1" |
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.
I learned from here that you can use python-version: "3.12"
if you add allow-prereleases: true
to setup-python. Then we don't have to change this field as 3.12 move towards release.
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.
Thanks! jupyterlab/maintainer-tools#199
PyPI let me upload prerelease wheels for 3.12, so if you use --pre, you ought to get wheels, I think. |
Thanks, I'm trying to separate concerns first and test against stable deps. |
Weird, 69 tests failed on the first attempt but all succeeded on the second attempt.
|
I kicked the job to see what it does on the second run. |
Same result on a re-run. |
All tests are now passing on the first try, I'm guessing due to the 3.12b2 release. |
No description provided.