chtd / psycopg2cffi

Port to cffi with some speed improvements
Other
177 stars 43 forks source link

PyPy3 Build Failing #113

Open johnthagen opened 4 years ago

johnthagen commented 4 years ago

PyPy3 build is failing on master: https://travis-ci.org/github/chtd/psycopg2cffi/builds/601941468

Given how critical this package is for those running Django/PostgreSQL using PyPy3, @mattip do you have any ideas on what is going on?

======================================================================
ERROR: test_notify_payload (psycopg2cffi.tests.psycopg2_tests.test_notify.NotifiesTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/chtd/psycopg2cffi/psycopg2cffi/tests/psycopg2_tests/test_notify.py", line 150, in test_notify_payload
    pid = int(self.notify('foo', payload="Hello, world!").communicate()[0])
  File "/home/travis/build/chtd/psycopg2cffi/psycopg2cffi/tests/psycopg2_tests/test_notify.py", line 74, in notify
    return Popen([sys.executable, '-c', script_to_py3(script)], stdout=PIPE)
  File "/opt/python/pypy3.6-7.1.1/lib-python/3/subprocess.py", line 722, in __init__
    restore_signals, start_new_session)
  File "/opt/python/pypy3.6-7.1.1/lib-python/3/subprocess.py", line 1288, in _execute_child
    restore_signals, start_new_session, preexec_fn)
OSError: [Errno 12] Cannot allocate memory

It looks like some work was attempted in https://github.com/chtd/psycopg2cffi/tree/fix-pypy3-build

mattip commented 4 years ago

I saw this kind of error due to the process allocating large amounts of memory (more than 50%) in some previous test, then trying to fork in subprocess.Popen. Is the failure new?

johnthagen commented 4 years ago

@mattip Looks like it has been failing since at least Oct 2019: https://travis-ci.org/github/chtd/psycopg2cffi/builds/601686036

johnthagen commented 4 years ago

These are the tests that are failing: https://github.com/chtd/psycopg2cffi/blob/master/psycopg2cffi/tests/test_notify.py

DzigaV commented 3 years ago

Are there any plans to fix psycopg2cffi on PyPy?

Omegapol commented 3 years ago

A while back when we needed psycopg2cffi on PyPy I did few fixes on my own. This project looked like it was dead so I forked it and applied changes there. https://github.com/Omegapol/psycopg2cffi If @lopuhin wants, I can prep pull request with those changes.

lopuhin commented 3 years ago

The project is more dead than alive - I can merge simple PR and make releases, but not really anything more complicated. I'd be happy to redirect to supported fork or transfer ownership.