Skip to content

Jython compatibility #321

@frenzymadness

Description

@frenzymadness

Hello.

I've tried to use attrs module with Jython but it seems to be unsupported. I have an empty docker container based on Fedora 27 and Jython 2.7.1 (latest stable) installed from Fedora repository and attrs installed from PyPI.

Steps to reproduce:

$ jython -m ensurepip
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-9.0.1 setuptools-28.8.0
$ jython -m pip install attrs
Collecting attrs
  Downloading attrs-17.4.0-py2.py3-none-any.whl
Installing collected packages: attrs
Successfully installed attrs-17.4.0
$ jython 
Jython 2.7.1 (, Sep 29 2017, 12:00:52) 
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_151
Type "help", "copyright", "credits" or "license" for more information.
>>> import attr
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/share/jython/Lib/site-packages/attr/__init__.py", line 5, in <module>
    from . import converters, exceptions, filters, validators
  File "/usr/share/jython/Lib/site-packages/attr/filters.py", line 7, in <module>
    from ._compat import isclass
  File "/usr/share/jython/Lib/site-packages/attr/_compat.py", line 139, in <module>
    set_closure_cell = make_set_closure_cell()
  File "/usr/share/jython/Lib/site-packages/attr/_compat.py", line 131, in make_set_closure_cell
    set_closure_cell = ctypes.pythonapi.PyCell_Set
AttributeError: 'module' object has no attribute 'pythonapi'

Is there any chance, that attrs would support Jython? I am asking because pytest is considered supported on Jython but depends on attrs so pytest also doesn't work.

Thank you and have a nice day!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions