A number of test cases included in the pexpect distribution failed on
FreeBSD. The patches included in the commit fix most of these tests.
One of the tests used /bin/bash and long options for the nl command.
Other tests assumed pipe buffers larger than provided by FreeBSD.
3 tests are still failing:
tests/test_replwrap.py::REPLWrapTestCase::test_existing_spawn FAILED
The text received contains bracketed paste escape characters when
a bash version 5.1 or newer is installed. There may be another problem
with this test, though, since it seems to depend on some bash rc file
of the account executing this test.
tests/test_socket.py::ExpectTestCase::test_interrupt FAILED
tests/test_socket.py::ExpectTestCase::test_multiple_interrupts FAILED
These two test seem to fail due to an early exit of the sending
process. It appears to be in Zombie state and cannot be signaled.
The "non-blocking read" seems to be blocking in this situation.
The real cause is unclear, it seems to be a mismatch between process
lifetime semantics in Linux and FreeBSD. I have removed an infinite
wait loop with these patches, which causes a test failure to be
detected (instead of preventing the execution of any further test
cases).
I have created a pull request on Github to get these patches into the
upstream, but it seems that the owner of the pexpect repository is not
very active.
Approved by: sunpoet (maintainer)
async is the registered keyword since python 3.7, so current version of pexpect
fails to work with py37:
File "/usr/local/lib/python3.7/site-packages/pexpect/spawnbase.py", line 224
def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
^
SyntaxError: invalid syntax
*** Error code 1
Update to latest version solves the issue.
Also pass maintainership to python@ at maintainer's request
PR: 230188
Approved by: wg (maintainer)
Ports using USE_PYTHON=distutils are now flavored. They will
automatically get flavors (py27, py34, py35, py36) depending on what
versions they support.
There is also a USE_PYTHON=flavors for ports that do not use distutils
but need FLAVORS to be set. A USE_PYTHON=noflavors can be set if
using distutils but flavors are not wanted.
A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been
added to cope with Python ports that did not have the Python
PKGNAMEPREFIX but are flavored.
USES=python now also exports a PY_FLAVOR variable that contains the
current python flavor. It can be used in dependency lines when the
port itself is not python flavored. For example, deskutils/calibre.
By default, all the flavors are generated. To only generate flavors
for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT, define
BUILD_DEFAULT_PYTHON_FLAVORS in your make.conf.
In all the ports with Python dependencies, the *_DEPENDS entries MUST
end with the flavor so that the framework knows which to build/use.
This is done by appending '@${PY_FLAVOR}' after the origin (or
@${FLAVOR} if in a Python module with Python flavors, as the content
will be the same). For example:
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}
PR: 223071
Reviewed by: portmgr, python
Sponsored by: Absolight
Differential Revision: https://reviews.freebsd.org/D12464
The latest www/py-requests update [1] unbundled its dependencies, now
requiring chardet, idna, urllib3 and certifi from ports.
www/py3-requests port was not tested during QA, which would have highlighted
the need for many new py3-* ports (and their dependencies).
This change creates one of those ports.
[1] https://svnweb.freebsd.org/changeset/ports/442565
PR: 219833