Skip to content

gh-160873: Remove obsolete pthread_getattr_np workaround - #160902

Merged
freakboy3742 merged 1 commit into
python:mainfrom
lpyu001:cpython-lpy/emscripten-m64-pthread
Nov 2, 2026
Merged

freakboy3742 merged 1 commit into
python:mainfrom
lpyu001:cpython-lpy/emscripten-m64-pthread

Conversation

@lpyu001

@lpyu001 lpyu001 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Emscripten 6.0.1 deprecated -sUSE_PTHREADS and -sMEMORY64 in favor of the standard -pthread and -m64 flags (emscripten-core/emscripten#27025). With the currently pinned Emscripten 6.0.10, both emit a -Wdeprecated warning at link time:

emcc: warning: USE_PTHREADS is deprecated (prefer the standard -pthread flag). [-Wdeprecated]
emcc: warning: MEMORY64 is deprecated (prefer the standard -m64 or --target=wasm64 flags). [-Wdeprecated]

This PR switches configure.ac to the standard flags:

  • --enable-wasm-pthreads: -sUSE_PTHREADS → -pthread in LDFLAGS_NODIST. The existing -pthread in CFLAGS_NODIST is not passed to the link step, so the linker flag is still needed.
  • wasm64-*-emscripten: -sMEMORY64=1 → -m64 in CFLAGS and LDFLAGS.
  • Platforms/emscripten/README.md is updated to match.

I've also removed the Emscripten-specific NDOTDOTS = 48 workaround from test_glob_dotdot in Lib/test/test_pathlib/test_pathlib.py. Its comment says it can be removed once emscripten-core/emscripten#24591 is merged. That PR (don't return ELOOP on a path with many .. components) was merged in June 2025 and should be in 4.0.11 and later, well below the pinned 6.0.10. The test now uses NDOTDOTS = 50 on all platforms.

@lpyu001

lpyu001 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

cc @hoodmane

@hoodmane

Copy link
Copy Markdown
Contributor

Looks good to me.

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Makes sense - thanks for the cleanup!

@freakboy3742
freakboy3742 merged commit 67683da into python:main Nov 2, 2026
73 checks passed
@lpyu001
lpyu001 deleted the cpython-lpy/emscripten-m64-pthread branch November 2, 2026 05:54
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86 Debian Non-Debug with X 3.x (tierless) has failed when building commit 67683da.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1245/builds/10003) and take a look at the build logs.
  4. Check if the failure is related to this commit (67683da) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1245/builds/10003

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py"�[0m, line �[35m286�[0m, in �[35m_test_urls�[0m
    f = urlopen(url, req, support.INTERNET_TIMEOUT)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m489�[0m, in �[35mopen�[0m
    response = self._open(req, data)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m506�[0m, in �[35m_open�[0m
    result = self._call_chain(self.handle_open, protocol, protocol +
                              '_open', req)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m466�[0m, in �[35m_call_chain�[0m
    result = func(*args)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m1646�[0m, in �[35mftp_open�[0m
    raise URLError(f"ftp error: {exp}") from exp
�[1;35murllib.error.URLError�[0m: �[35m<urlopen error ftp error: 425 Security: Bad IP connecting.>�[0m


Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py"�[0m, line �[35m286�[0m, in �[35m_test_urls�[0m
    f = urlopen(url, req, support.INTERNET_TIMEOUT)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py"�[0m, line �[35m32�[0m, in �[35mwrapped�[0m
    return _retry_thrice(func, exc, *args, **kwargs)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py"�[0m, line �[35m28�[0m, in �[35m_retry_thrice�[0m
    raise last_exc
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py"�[0m, line �[35m24�[0m, in �[35m_retry_thrice�[0m
    return func(*args, **kwargs)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m489�[0m, in �[35mopen�[0m
    response = self._open(req, data)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m506�[0m, in �[35m_open�[0m
    result = self._call_chain(self.handle_open, protocol, protocol +
                              '_open', req)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m466�[0m, in �[35m_call_chain�[0m
    result = func(*args)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m1646�[0m, in �[35mftp_open�[0m
    raise URLError(f"ftp error: {exp}") from exp
�[1;35murllib.error.URLError�[0m: �[35m<urlopen error ftp error: 425 Security: Bad IP connecting.>�[0m


Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m1633�[0m, in �[35mftp_open�[0m
    fp, retrlen = �[31mfw.retrfile�[0m�[1;31m(file, type)�[0m
                  �[31m~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m1903�[0m, in �[35mretrfile�[0m
    conn, retrlen = �[31mself.ftp.ntransfercmd�[0m�[1;31m(cmd)�[0m
                    �[31m~~~~~~~~~~~~~~~~~~~~~�[0m�[1;31m^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/ftplib.py"�[0m, line �[35m359�[0m, in �[35mntransfercmd�[0m
    resp = self.sendcmd(cmd)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/ftplib.py"�[0m, line �[35m281�[0m, in �[35msendcmd�[0m
    return �[31mself.getresp�[0m�[1;31m()�[0m
           �[31m~~~~~~~~~~~~�[0m�[1;31m^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/ftplib.py"�[0m, line �[35m252�[0m, in �[35mgetresp�[0m
    raise error_temp(resp)
�[1;35mftplib.error_temp�[0m: �[35m425 Security: Bad IP connecting.�[0m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants