Skip to content

Broken on Python 3.12 due to unmaintained OSlash dep #273

@voice-of-texnoforge

Description

@voice-of-texnoforge
Contributor

Hello, I'm getting problems on jsonrpcserver imports on Python 3.12:

    from jsonrpcserver import dispatch
/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages/jsonrpcserver/__init__.py:19: in <module>
    from .async_main import (
/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages/jsonrpcserver/async_main.py:5: in <module>
    from .async_dispatcher import dispatch_to_response_pure
/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages/jsonrpcserver/async_dispatcher.py:9: in <module>
    from oslash.either import Left  # type: ignore
/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages/oslash/__init__.py:11: in <module>
    from .state import State
/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages/oslash/state.py:78: in <module>
    assert issubclass(State, Functor)
/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/typing.py:1841: in __subclasscheck__
    cls.__non_callable_proto_members__
E   AttributeError: type object 'Functor' has no attribute '__non_callable_proto_members__'

Is there any hope for a fix and new release?

Activity

voice-of-texnoforge

voice-of-texnoforge commented on Feb 29, 2024

@voice-of-texnoforge
ContributorAuthor

It seems to be a problem in OSlash which had last release in 2020 so it's safe to assume it's dead.

However, jsonrpcserver seems to only use Either, Left, Right:

from oslash.either import Either, Left, Right

This should be reasonably easy to fix by switching to PyMonad or even providing custom implementation.

changed the title [-]Broken on Python 3.12[/-] [+]Broken on Python 3.12 due to unmaintained OSlash dep[/+] on Feb 29, 2024
briceparmentier

briceparmentier commented on Apr 24, 2024

@briceparmentier

Hello !

It seems to be a problem in OSlash which had last release in 2020 so it's safe to assume it's dead.

However, jsonrpcserver seems to only use Either, Left, Right:

from oslash.either import Either, Left, Right

This should be reasonably easy to fix by switching to PyMonad or even providing custom implementation.

Is it possible to get some help on the proposed solution? I'm not comfortable enough to get this done.

I create a sample project on PyCharm importing only jsonrpcserver package, no version specified (grabbing 5.0.9), ran the main proposed on the jsonrpcserver documentation, and got the same error mentioned at the beginning.

voice-of-texnoforge

voice-of-texnoforge commented on Apr 24, 2024

@voice-of-texnoforge
ContributorAuthor

So the author said he's hoping to release 6.0 version "soon" in #275 (comment)

Looking at 6.0.0 PR #255 , you can see 0f1fd29 Replace Oslash with Returns

If you don't want to wait for the release, you can try the
release/6.0.0 branch I guess.

briceparmentier

briceparmentier commented on Apr 25, 2024

@briceparmentier

Thanks !
I hope then that the next release will come soon.
Meanwhile I've managed to make it work by creating a virtual environment for this project using version 3.11.x of Python.

bcb

bcb commented on Jul 30, 2024

@bcb
Member

As @voice-of-texnoforge said, this is fixed in version 6.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bcb@briceparmentier@voice-of-texnoforge

        Issue actions

          Broken on Python 3.12 due to unmaintained OSlash dep · Issue #273 · explodinglabs/jsonrpcserver