Skip to content

Cookie.py __slots__ error in python3.6 #71

Description

@craig-sh

Hi, I'm trying to use mod_python with python 3.6.6 and I get the below error in my application as well as when running mod_python's tests.

Thanks for developing and maintaining mod_python!

======================================================================
FAIL: test_psphandler (__main__.PerRequestTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 2082, in test_psphandler
    self.fail(repr(rsp))

AssertionError:
<pre>
Mod_python error: "PythonHandler mod_python.psp"
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/mod_python/apache.py", line 353, in HandlerDispatch
    log=debug)
  File "/usr/local/lib/python3.6/site-packages/mod_python/apache.py", line 637, in import_module
    module = imp.load_module(mname, f, p, d)
  File "/usr/local/lib/python3.6/imp.py", line 235, in load_module
    return load_source(name, filename, file)
  File "/usr/local/lib/python3.6/imp.py", line 172, in load_source
    module = _load(spec)
  File "&lt;frozen importlib._bootstrap&gt;", line 684, in _load
  File "&lt;frozen importlib._bootstrap&gt;", line 665, in _load_unlocked
  File "&lt;frozen importlib._bootstrap_external&gt;", line 678, in exec_module
  File "&lt;frozen importlib._bootstrap&gt;", line 219, in _call_with_frames_removed
  File "/usr/local/lib/python3.6/site-packages/mod_python/psp.py", line 21, in &lt;module&gt;
    from . import apache, Session, util, _psp
  File "/usr/local/lib/python3.6/site-packages/mod_python/Session.py", line 32, in &lt;module&gt;
    from . import apache, Cookie
  File "/usr/local/lib/python3.6/site-packages/mod_python/Cookie.py", line 105, in &lt;module&gt;
    _metaCookie = metaCookie(\'Cookie\', (object, ), {})
  File "/usr/local/lib/python3.6/site-packages/mod_python/Cookie.py", line 101, in __new__
    return type.__new__(cls, clsname, bases, clsdict)
ValueError: \'expires\' in __slots__ conflicts with class variable
</pre>

Version information:

mod_python version

mod_python:  3.5.0-e9fc930
             '/usr/lib64/httpd/modules/mod_python.so'

python:      3.6.6 (default, Jul  9 2018, 17:07:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
             '/usr/local/bin/python3.6'

httpd:       2.4.6
             '/usr/sbin/httpd'

apr:         1.4.8
platform:    Linux-3.10.0-693.17.1.el7.x86_64-x86_64-with-centos-7.4.1708-Core

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions