Package Details: python2 2.7.18-12

Git Clone URL: https://aur.archlinux.org/python2.git (read-only, click to copy)
Package Base: python2
Description: A high-level scripting language
Upstream URL: https://www.python.org/
Licenses: PSF-2.0
Conflicts: python
Submitter: jelly
Maintainer: micwoj92
Last Packager: micwoj92
Votes: 75
Popularity: 2.52
First Submitted: 2022-09-23 10:01 (UTC)
Last Updated: 2025-04-30 23:56 (UTC)

Required by (884)

Sources (4)

Pinned Comments

Latest Comments

1 2 3 4 5 6 .. 21 Next › Last »

nroth commented on 2025-07-16 01:22 (UTC)

Looks like something to do with network access is at least partially broken in Python 2.7 on some systems, which breaks the build. Feel free to correct me if I'm wrong or if anyone has a fix.

For now, installing/updating with yay -S python2 --mflags "--nocheck" works, but network access and URL processing apparently do not work as expected. This will also not alert when additional things break.

The end of Python 2 on Arch seems imminent, unless someone wants to step in to fix this.

nroth commented on 2025-07-16 00:57 (UTC)

First failure:

test_ftp_basic (test.test_urllib2net.TimeoutTest) ... ERROR
test_ftp_default_timeout (test.test_urllib2net.TimeoutTest) ... ERROR
test_ftp_no_timeout (test.test_urllib2net.TimeoutTest) ... ERROR
test_ftp_timeout (test.test_urllib2net.TimeoutTest) ... ERROR
test_http_basic (test.test_urllib2net.TimeoutTest) ... ok
test_http_default_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_http_no_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_http_timeout (test.test_urllib2net.TimeoutTest) ... ok

======================================================================
ERROR: test_ftp_basic (test.test_urllib2net.TimeoutTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nroth/.cache/yay/python2/src/Python-2.7.18/Lib/test/test_urllib2net.py", line 300, in test_ftp_basic
    u = _urlopen_with_retry(self.FTP_HOST)
  File "/home/nroth/.cache/yay/python2/src/Python-2.7.18/Lib/test/test_urllib2net.py", line 25, in wrapped
    return _retry_thrice(func, exc, *args, **kwargs)
  File "/home/nroth/.cache/yay/python2/src/Python-2.7.18/Lib/test/test_urllib2net.py", line 21, in _retry_thrice
    raise last_exc
URLError: <urlopen error ftp error: [Errno 101] Network is unreachable>

======================================================================
ERROR: test_ftp_default_timeout (test.test_urllib2net.TimeoutTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nroth/.cache/yay/python2/src/Python-2.7.18/Lib/test/test_urllib2net.py", line 309, in test_ftp_default_timeout
    u = _urlopen_with_retry(self.FTP_HOST)
  File "/home/nroth/.cache/yay/python2/src/Python-2.7.18/Lib/test/test_urllib2net.py", line 25, in wrapped
    return _retry_thrice(func, exc, *args, **kwargs)
  File "/home/nroth/.cache/yay/python2/src/Python-2.7.18/Lib/test/test_urllib2net.py", line 21, in _retry_thrice
    raise last_exc
URLError: <urlopen error ftp error: [Errno 101] Network is unreachable>

======================================================================
ERROR: test_ftp_no_timeout (test.test_urllib2net.TimeoutTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nroth/.cache/yay/python2/src/Python-2.7.18/Lib/test/test_urllib2net.py", line 320, in test_ftp_no_timeout
    u = _urlopen_with_retry(self.FTP_HOST, timeout=None)
  File "/home/nroth/.cache/yay/python2/src/Python-2.7.18/Lib/test/test_urllib2net.py", line 25, in wrapped
    return _retry_thrice(func, exc, *args, **kwargs)
  File "/home/nroth/.cache/yay/python2/src/Python-2.7.18/Lib/test/test_urllib2net.py", line 21, in _retry_thrice
    raise last_exc
URLError: <urlopen error ftp error: [Errno 101] Network is unreachable>

======================================================================
ERROR: test_ftp_timeout (test.test_urllib2net.TimeoutTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nroth/.cache/yay/python2/src/Python-2.7.18/Lib/test/test_urllib2net.py", line 328, in test_ftp_timeout
    u = _urlopen_with_retry(self.FTP_HOST, timeout=60)
  File "/home/nroth/.cache/yay/python2/src/Python-2.7.18/Lib/test/test_urllib2net.py", line 25, in wrapped
    return _retry_thrice(func, exc, *args, **kwargs)
  File "/home/nroth/.cache/yay/python2/src/Python-2.7.18/Lib/test/test_urllib2net.py", line 21, in _retry_thrice
    raise last_exc
URLError: <urlopen error ftp error: [Errno 101] Network is unreachable>

----------------------------------------------------------------------
Ran 15 tests in 0.887s

FAILED (errors=4, skipped=1)
0:04:27 load avg: 1.71 [365/394/1] test_urllibnet -- test_urllib2net failed

nroth commented on 2025-07-16 00:56 (UTC) (edited on 2025-07-16 00:56 (UTC) by nroth)

Second failure:

======================================================================
FAIL: test_multiple_ftp_urlopen_same_host (test.test_urllibnet.urlopen_FTPTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nroth/.cache/yay/python2/src/Python-2.7.18/Lib/test/test_urllibnet.py", line 245, in test_multiple_ftp_urlopen_same_host
    "Error message was: %s" % e)
AssertionError: Failed FTP binary file open. Error message was: [Errno ftp error] [Errno 101] Network is unreachable

----------------------------------------------------------------------
Ran 15 tests in 0.330s

FAILED (failures=2)
0:04:27 load avg: 1.71 [366/394/2] test_urlparse -- test_urllibnet failed

nroth commented on 2025-07-16 00:13 (UTC)

I'm getting the same issue as patriot-8891

2 tests failed:
    test_urllib2 test_urllibnet

And then the package install cancels.

Does anyone have a workaround?

micwoj92 commented on 2025-05-28 22:21 (UTC) (edited on 2025-05-28 22:21 (UTC) by micwoj92)

@CarstenG linux-api-headers is already a dependency of glibc so I don't know how this can be a build issue.
@patriot-8891I regurarly rebuild this package both on my laptop env and in clean chroot. No issues here.

patriot-8891 commented on 2025-05-28 19:56 (UTC) (edited on 2025-05-28 19:56 (UTC) by patriot-8891)

What's wrong?

== Tests result: FAILURE ==

364 tests OK.

2 tests failed:
    test_urllib2 test_urllibnet

28 tests skipped:
    test_aepack test_al test_applesingle test_bsddb test_bsddb185
    test_bsddb3 test_cd test_cl test_dl test_gl test_imageop
    test_imgfile test_kqueue test_linuxaudiodev test_macos
    test_macostools test_msilib test_nis test_py3kwarn
    test_scriptpackages test_startfile test_sunaudiodev test_tcl
    test_ttk_textonly test_turtle test_winreg test_winsound
    test_zipfile64
5 skips unexpected on linux2:
    test_bsddb test_bsddb3 test_tcl test_ttk_textonly test_turtle

CarstenG commented on 2025-05-28 10:29 (UTC)

You may install linux-api-headers to provide the missing audio/sound definitions.

Maybe this package can be added to the build dependencies also.

Nyyr commented on 2025-05-19 17:20 (UTC)

Tried to update today:

/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:62:17: error: ‘AFMT_MU_LAW’ undeclared here (not in a function)
   62 |     {  8,       AFMT_MU_LAW, "logarithmic mu-law 8-bit audio" },
      |                 ^~~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:63:17: error: ‘AFMT_A_LAW’ undeclared here (not in a function)
   63 |     {  8,       AFMT_A_LAW,  "logarithmic A-law 8-bit audio" },
      |                 ^~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:64:17: error: ‘AFMT_U8’ undeclared here (not in a function)
   64 |     {  8,       AFMT_U8,     "linear unsigned 8-bit audio" },
      |                 ^~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:65:17: error: ‘AFMT_S8’ undeclared here (not in a function)
   65 |     {  8,       AFMT_S8,     "linear signed 8-bit audio" },
      |                 ^~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:66:17: error: ‘AFMT_U16_BE’ undeclared here (not in a function)
   66 |     { 16,       AFMT_U16_BE, "linear unsigned 16-bit big-endian audio" },
      |                 ^~~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:67:17: error: ‘AFMT_U16_LE’ undeclared here (not in a function)
   67 |     { 16,       AFMT_U16_LE, "linear unsigned 16-bit little-endian audio" },
      |                 ^~~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:68:17: error: ‘AFMT_S16_BE’ undeclared here (not in a function)
   68 |     { 16,       AFMT_S16_BE, "linear signed 16-bit big-endian audio" },
      |                 ^~~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:69:17: error: ‘AFMT_S16_LE’ undeclared here (not in a function)
   69 |     { 16,       AFMT_S16_LE, "linear signed 16-bit little-endian audio" },
      |                 ^~~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:70:17: error: ‘AFMT_S16_NE’ undeclared here (not in a function)
   70 |     { 16,       AFMT_S16_NE, "linear signed 16-bit native-endian audio" },
      |                 ^~~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c: In function ‘newladobject’:
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:127:40: error: ‘SNDCTL_DSP_NONBLOCK’ undeclared (first use in this function)
  127 |     if (imode == O_WRONLY && ioctl(fd, SNDCTL_DSP_NONBLOCK, NULL) == -1) {
      |                                        ^~~~~~~~~~~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:127:40: note: each undeclared identifier is reported only once for each function it appears in
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:132:19: error: ‘SNDCTL_DSP_GETFMTS’ undeclared (first use in this function)
  132 |     if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) == -1) {
      |                   ^~~~~~~~~~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c: In function ‘lad_setparameters’:
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:288:27: error: ‘SNDCTL_DSP_SETFMT’ undeclared (first use in this function)
  288 |     if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT,
      |                           ^~~~~~~~~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:293:27: error: ‘SNDCTL_DSP_CHANNELS’ undeclared (first use in this function)
  293 |     if (ioctl(self->x_fd, SNDCTL_DSP_CHANNELS, &nchannels) == -1) {
      |                           ^~~~~~~~~~~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:297:27: error: ‘SNDCTL_DSP_SPEED’ undeclared (first use in this function)
  297 |     if (ioctl(self->x_fd, SNDCTL_DSP_SPEED, &rate) == -1) {
      |                           ^~~~~~~~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c: In function ‘_ssize’:
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:312:27: error: ‘SNDCTL_DSP_SETFMT’ undeclared (first use in this function)
  312 |     if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT, &fmt) < 0)
      |                           ^~~~~~~~~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:328:10: error: ‘AFMT_MPEG’ undeclared (first use in this function)
  328 |     case AFMT_MPEG:
      |          ^~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:329:10: error: ‘AFMT_IMA_ADPCM’ undeclared (first use in this function)
  329 |     case AFMT_IMA_ADPCM:
      |          ^~~~~~~~~~~~~~
/home/user/.cache/yay/python2/src/Python-2.7.18/Modules/linuxaudiodev.c:333:27: error: ‘SNDCTL_DSP_CHANNELS’ undeclared (first use in this function)

and so on...

ferrvittorio commented on 2025-05-14 06:17 (UTC)

@tuxayo with yay, I was able with passing these parameters:

yay python2 --mflags "--nocheck"

Thanks

tuxayo commented on 2025-05-13 10:37 (UTC)

@ferrvittorio this fully depend on your AUR helper. So it's --help, man, wikipage, repository are the place to know. And some when build fails offer in the message how to skip check().