This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients jaguardown, larry, terry.reedy, vstinner
Date 2020-02-24.01:23:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582507428.22.0.162144896468.issue39653@roundup.psfhosted.org>
In-reply-to
Content
My understanding that Python is compiled and installed and that the failure was during a later test.

In repository master (3.9) the line is 1549 instead of 1529.  The test function code is

    def test_no_such_executable(self):
        no_such_executable = 'no_such_executable'
        try:
            pid = self.spawn_func(no_such_executable,
                                  [no_such_executable],
                                  os.environ)
        # bpo-35794: PermissionError can be raised if there are
        # directories in the $PATH that are not accessible.
        except (FileNotFoundError, PermissionError) as exc:
            self.assertEqual(exc.filename, no_such_executable)
        else:
            pid2, status = os.waitpid(pid, 0)
            self.assertEqual(pid2, pid)
            self.assertNotEqual(status, 0)

It is part of a mixin class and once mixed in, spawn_func is either posix_spawn or posix_spawnp.  The first parameter is 'path'.

"The path parameter is the path to the executable file.The path should contain a directory.  Use posix_spawnp() to pass an executable file without directory."

FileNotFoundError and PermissionError are subclasses of OSError.  So is NotADirectoryError.  I was initially tempted to say that either the latter should be added to the tuple or that the tuple should be replaced by OSError.  However, the test failed with posix_spawnp, when the path should not be required to have a directory.  So I wonder if there is a problem with this function on this Debian.  (I do not work with Linux at all.)

Zachary, could you try adding NotADirectoryError to the exception list and see if the test
    self.assertEqual(exc.filename, no_such_executable)
passes?
History
Date User Action Args
2020-02-24 01:23:48terry.reedysetrecipients: + terry.reedy, vstinner, larry, jaguardown
2020-02-24 01:23:48terry.reedysetmessageid: <1582507428.22.0.162144896468.issue39653@roundup.psfhosted.org>
2020-02-24 01:23:48terry.reedylinkissue39653 messages
2020-02-24 01:23:47terry.reedycreate