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.

classification
Title: ERROR: test_no_optimize_flag on Mageia Linux Cauldron x86-64 with certain configure flags
Type: behavior Stage:
Components: Tests Versions: Python 3.4, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: giampaolo.rodola, pitrou, r.david.murray, shlomif
Priority: normal Keywords:

Created on 2013-06-11 10:32 by shlomif, last changed 2022-04-11 14:57 by admin.

Files
File name Uploaded Description Edit
python-3.4.1-make-test.txt shlomif, 2014-08-22 05:38
Messages (9)
msg190959 - (view) Author: Shlomi Fish (shlomif) * Date: 2013-06-11 10:32
After I build Python-3.3.2 from the .tar.xz using the following script (on Mageia Linux Cauldron x86-64):

<<<
#!/bin/bash
./configure --prefix="$HOME/apps/python3" --with-threads \
                --enable-ipv6 --with-dbmliborder=gdbm \
                --with-system-expat \
                --with-system-ffi \
                --enable-shared \
                --with-valgrind
shlomif@telaviv1:~/Download/unpack/prog/python/Python-3.3.2$ 
>>>

then I get this test failure in the «test_no_optimize_flag»:

[ QUOTE ]

======================================================================
ERROR: test_no_optimize_flag (distutils.tests.test_bdist_rpm.BuildRpmTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shlomif/Download/unpack/prog/python/Python-3.Lib/distutils/tests/test_bdist_rpm.py", line 125, in test_no_optimize_flag
    cmd.run()
  File "/home/shlomif/Download/unpack/prog/python/Python-3.Lib/distutils/command/bdist_rpm.py", line 366, in run
    self.spawn(rpm_cmd)
  File "/home/shlomif/Download/unpack/prog/python/Python-3.Lib/distutils/cmd.py", line 366, in spawn
    spawn(cmd, search_path, dry_run=self.dry_run)
  File "/home/shlomif/Download/unpack/prog/python/Python-3.Lib/distutils/spawn.py", line 32, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/shlomif/Download/unpack/prog/python/Python-3.Lib/distutils/spawn.py", line 163, in _spawn_posix
    % (cmd[0], exit_status))
distutils.errors.DistutilsExecError: command 'rpmbuild' failed with exit status 1
https://bugs.mageia.org/show_bug.cgi?id=9395

[ / QUOTE]

More info can be found at http://bugs.python.org/issue18142 .

Please look into fixing it.

Regards,

-- Shlomi Fish
msg190961 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-06-11 11:46
This looks related to issue 14443, which was supposed to be fixed in 3.3.0.  Can you do some of the same debugging that was done in that issue and see if it reveals any more about the problem?

Also, I notice from that issue that Antoine was (is?) running Mageia, so I'm adding him to nosy in case he wants to try to reproduce it.
msg190963 - (view) Author: Shlomi Fish (shlomif) * Date: 2013-06-11 13:07
Hi,

I don't understand the issue in questioned - it's too wordy and unclear. I don't know how to do the debugging in question - please guide me. I should note that after I do «unset PYTHONDONTWRITEBYTECODE» then all tests pass except for test_ftp.py, which gives me this. However, I don't see the bdist_rpm anywhere in the output. Was it skipped? If so, how, where and why?

[QUOTE]

======================================================================
error: test_ftp (test.test_urllib2net.othernetworktests)
----------------------------------------------------------------------
traceback (most recent call last):
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/urllib/request.py", line 2307, in retrfile
    self.ftp.cwd(file)
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/ftplib.py", line 591, in cwd
    return self.voidcmd(cmd)
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/ftplib.py", line 264, in voidcmd
    return self.voidresp()
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/ftplib.py", line 238, in voidresp
    resp = self.getresp()
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/ftplib.py", line 233, in getresp
    raise error_perm(resp)
ftplib.error_perm: 550 failed to change directory.

during handling of the above exception, another exception occurred:

traceback (most recent call last):
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/test/test_urllib2net.py", line 112, in test_ftp
    self._test_urls(urls, self._extra_handlers())
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/test/test_urllib2net.py", line 218, in _test_urls
    f = urlopen(url, req, timeout)
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/test/test_urllib2net.py", line 33, in wrapped
    return _retry_thrice(func, exc, *args, **kwargs)
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/test/test_urllib2net.py", line 23, in _retry_thrice
    return func(*args, **kwargs)
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/urllib/request.py", line 469, in open
    response = self._open(req, data)
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/urllib/request.py", line 487, in _open
    '_open', req)
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/urllib/request.py", line 447, in _call_chain
    result = func(*args)
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/urllib/request.py", line 1464, in ftp_open
    fp, retrlen = fw.retrfile(file, type)
  file "/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/urllib/request.py", line 2309, in retrfile
    raise urlerror('ftp error: %d' % reason) from reason
typeerror: %d format: a number is required, not error_perm

----------------------------------------------------------------------
ran 15 tests in 14.820s

[/QUOTE]

Also see:

https://bugs.mageia.org/show_bug.cgi?id=9395

Regards,

-- Shlomi Fish
msg190967 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-06-11 14:40
I don't really use Mageia anymore, that said:

> I should note that after I do «unset PYTHONDONTWRITEBYTECODE» [snip]

Yep, this is a long-lasting Mageia issue. See:
https://qa.mandriva.com/show_bug.cgi?id=50484
https://bugs.mageia.org/show_bug.cgi?id=3348

You could try arguing with the maintainer (Michael Scherer) but he seems both stubborn and slightly clueless about anything Python-related, unfortunately.

> all tests pass except for test_ftp.py, which gives me this

You are not the only one getting the test_ftp failure. I guess Giampaolo didn't fix it well enough.

> However, I don't see the bdist_rpm anywhere in the output

Individual test cases are only listed on failure, or when verbose mode is specified. So, if it doesn't appear in the output, it passed.
msg190969 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-06-11 15:00
Benjamin fixed the ftp error message, one commit after the 3.3.2 tag.  Not sure if that is enough to make the test pass, though.

So, it sounds like 18142 should be closed as "works for me"?  That is, the remaining test failures are do to the poor system configuration in Mageia?
msg190970 - (view) Author: Shlomi Fish (shlomif) * Date: 2013-06-11 15:29
I see regarding test_ftp.py and the verbosity of the tests and the absence of bdist_rpm in the output - however, shouldn't the test suite handle the presence of the PYTHONDONTWRITEBYTECODE=1 flag better? (E.g: refuse to run the tests to begin with (with an error), or not run the failing tests, or unset the flag before running the test suite, or whatever?)
msg190975 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-06-11 16:37
Given that we introduced the flag to support read-only file systems, I think one can argue that the test suite should support running on one.  However, the right thing to do would be to set up a buildbot where that was true so that it doesn't get re-broken in the future.  That might be a tad tricky to set up, I'm not sure.
msg224442 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-31 19:43
Is this still a problem with later versions of Python on this platform?
msg225646 - (view) Author: Shlomi Fish (shlomif) * Date: 2014-08-22 05:38
Here is the new output of the "make test" with Python-3.4.1 :

shlomif@telaviv1:~$ uname -a
Linux telaviv1.shlomifish.org 3.15.6-desktop-1.mga5 #1 SMP Wed Jul 23 22:28:50 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

You may wish to install a Mageia Linux x86-64 Cauldron Virtual Machine instead of depending of waiting for me to do all that. See:

http://www.joelonsoftware.com/articles/fog0000000043.html

Namely: " 9. Do you use the best tools money can buy?".
History
Date User Action Args
2022-04-11 14:57:46adminsetgithub: 62388
2019-04-26 20:29:35BreamoreBoysetnosy: - BreamoreBoy
2014-08-22 05:38:39shlomifsetfiles: + python-3.4.1-make-test.txt

messages: + msg225646
2014-07-31 19:43:11BreamoreBoysetnosy: + BreamoreBoy

messages: + msg224442
versions: + Python 3.4, Python 3.5, - Python 3.3
2013-06-11 16:37:12r.david.murraysetmessages: + msg190975
2013-06-11 15:29:27shlomifsetmessages: + msg190970
2013-06-11 15:00:30r.david.murraysetmessages: + msg190969
2013-06-11 14:40:58pitrousetnosy: + giampaolo.rodola
messages: + msg190967
2013-06-11 13:07:35shlomifsetmessages: + msg190963
2013-06-11 11:46:04r.david.murraysetnosy: + r.david.murray, pitrou
type: behavior
messages: + msg190961
2013-06-11 10:32:08shlomifcreate