pexpect 4.9-1 autopkgtest failing on test_interact_exit_unicode

Bug #2053226 reported by Paul Mars
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pexpect (Ubuntu)
Fix Released
Undecided
Graham Inggs

Bug Description

Against python3-defaults/3.12.1-0ubuntu1, autopkgtests are failing for arm64, ppc64el and s390x.

See:

- https://autopkgtest.ubuntu.com/results/autopkgtest-noble/noble/arm64/p/pexpect/20240207_210042_b7d5a@/log.gz
- https://autopkgtest.ubuntu.com/results/autopkgtest-noble/noble/ppc64el/p/pexpect/20240207_150327_dfc4e@/log.gz
- https://autopkgtest.ubuntu.com/results/autopkgtest-noble/noble/s390x/p/pexpect/20240207_145854_0172c@/log.gz

820s =================================== FAILURES ===================================
820s _________________ InteractTestCase.test_interact_exit_unicode __________________
820s
820s self = <tests.test_interact.InteractTestCase testMethod=test_interact_exit_unicode>
820s
820s def test_interact_exit_unicode(self):
820s " Ensure subprocess receives utf8. "
820s p = pexpect.spawnu('{self.interact_py} --utf8'.format(self=self),
820s timeout=5, env=self.env)
820s p.expect('READY')
820s p.send('ɑ') # >>> map(ord, u'ɑ'.encode('utf8'))
820s p.expect('201<STOP>') # [201, 145]
820s p.expect('145<STOP>')
820s p.send('Β') # >>> map(ord, u'Β'.encode('utf8'))
820s p.expect('206<STOP>') # [206, 146]
820s p.expect('146<STOP>')
820s p.send('\x00')
820s if not os.environ.get('CI', None):
820s # on CI platforms, we sometimes miss trailing stdout from the
820s # chain of child processes, not entirely sure why. So this
820s # is skipped on such systems.
820s > p.expect('0<STOP>')
820s
820s tests/test_interact.py:91:
820s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
820s /usr/lib/python3/dist-packages/pexpect/spawnbase.py:354: in expect
820s return self.expect_list(compiled_pattern_list,
820s /usr/lib/python3/dist-packages/pexpect/spawnbase.py:383: in expect_list
820s return exp.expect_loop(timeout)
820s /usr/lib/python3/dist-packages/pexpect/expect.py:179: in expect_loop
820s return self.eof(e)
820s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
820s
820s self = <pexpect.expect.Expecter object at 0x744501d0f3b0>
820s err = EOF('End Of File (EOF). Exception style platform.')
820s
820s def eof(self, err=None):
820s spawn = self.spawn
820s
820s spawn.before = spawn._before.getvalue()
820s spawn._buffer = spawn.buffer_type()
820s spawn._before = spawn.buffer_type()
820s spawn.after = EOF
820s index = self.searcher.eof_index
820s if index >= 0:
820s spawn.match = EOF
820s spawn.match_index = index
820s return index
820s else:
820s spawn.match = None
820s spawn.match_index = None
820s msg = str(spawn)
820s msg += '\nsearcher: %s' % self.searcher
820s if err is not None:
820s msg = str(err) + '\n' + msg
820s
820s exc = EOF(msg)
820s exc.__cause__ = None # in Python 3.x we can use "raise exc from None"
820s > raise exc
820s E pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
820s E <pexpect.pty_spawn.spawn object at 0x744501d0f9b0>
820s E command: /usr/bin/python3.12
820s E args: [b'/usr/bin/python3.12', b'interact.py', b'--utf8']
820s E buffer (last 100 chars): ''
820s E before (last 100 chars): '\r\nEscaped interact\r\n'
820s E after: <class 'pexpect.exceptions.EOF'>
820s E match: None
820s E match_index: None
820s E exitstatus: None
820s E flag_eof: True
820s E pid: 1784
820s E child_fd: 17
820s E closed: False
820s E timeout: 5
820s E delimiter: <class 'pexpect.exceptions.EOF'>
820s E logfile: None
820s E logfile_read: None
820s E logfile_send: None
820s E maxread: 2000
820s E ignorecase: False
820s E searchwindowsize: None
820s E delaybeforesend: 0.05
820s E delayafterclose: 0.1
820s E delayafterterminate: 0.1
820s E searcher: searcher_re:
820s E 0: re.compile('0<STOP>')
820s
820s /usr/lib/python3/dist-packages/pexpect/expect.py:122: EOF

These tests are ignored when run in CI with the env var "CI". Before pexpect 4.9-1 the env variable used was "TRAVIS". So now these are not ignored ignored anymore.

Tags: patch
Revision history for this message
Paul Mars (upils) wrote (last edit ):
Revision history for this message
Paul Mars (upils) wrote :
Graham Inggs (ginggs)
Changed in pexpect (Ubuntu):
assignee: nobody → Graham Inggs (ginggs)
status: New → In Progress
Revision history for this message
Graham Inggs (ginggs) wrote :

Uploaded, with minor a change closing this bug in debian/changelog.

Changed in pexpect (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "pexpect_4.9-1ubuntu1.diff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pexpect - 4.9-1ubuntu1

---------------
pexpect (4.9-1ubuntu1) noble; urgency=medium

  * Replace TRAVIS env var with CI following update in upstream.
    (LP: #2053226)

 -- Paul Mars <email address hidden> Mon, 12 Feb 2024 10:38:44 +0100

Changed in pexpect (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.