setup-python icon indicating copy to clipboard operation
setup-python copied to clipboard

Action emits `[DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.`

Open Molkree opened this issue 6 months ago • 6 comments

Description: When using this action it emits these lines on the usage step and post step

[DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

Action version:

Download action repository 'actions/setup-python@v6' (SHA:e797f83bcb11b83ae66e0230d6156d7c80228e7c)

Platform:

  • [x] Ubuntu
  • [ ] macOS
  • [ ] Windows

Runner type:

  • [x] Hosted
  • [ ] Self-hosted

Tools version:

3.11-13, probably any version

Repro steps:

name: Setup Python

on:
  workflow_dispatch:

jobs:
  setup:
    name: Setup Python
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-python@v6

https://github.com/Molkree/github_actions/actions/runs/17857148298/job/50778661475#step:2:9

Expected behavior: No deprecation warnings

Actual behavior: Deprecation warning

Molkree avatar Sep 19 '25 11:09 Molkree

Hi @Molkree, Thank you for creating this issue. We will investigate it and provide feedback as soon as we have some updates.

mahabaleshwars avatar Sep 22 '25 02:09 mahabaleshwars

Related: https://github.com/actions/setup-java/issues/904.

asarkar avatar Sep 27 '25 08:09 asarkar

@aparnajyothi-y Could you please provide an update on the status of this issue? It seems to affect multiple setup actions, and I noticed there's an open PR - just wondering what's holding up the fix.

asarkar avatar Oct 06 '25 00:10 asarkar

Hello Everyone, Thanks everyone for the detailed investigation and inputs!

We’ve identified that the deprecation warning originates from the transitive dependency chain within @azure/ms-rest-js, specifically through its usage of [email protected][email protected] → punycode.

We’re currently working internally to fix the issue to remove the deprecated punycode reference. The fix is in progress, and we’ll update this issue once the change is integrated and released in a future version of setup-node.

Thank you for your patience and for bringing this up!

aparnajyothi-y avatar Oct 16 '25 12:10 aparnajyothi-y

Hello Everyone, Thank you once again for reporting this issue. We are currently working with the actions-cache team internally to investigate and resolve the deprecation warnings related to Node 24. Once we have an update or a resolution, we will share it here.

If you have any additional insights or encounter related issues, please feel free to add them to this thread. We appreciate your patience and collaboration.

aparnajyothi-y avatar Nov 18 '25 11:11 aparnajyothi-y

actions/setup-node had the same issue, which has now been fixed in its main branch: https://github.com/actions/setup-node/commit/2951748f4c016b747952f8ca7e75fc64f2f62b53

It seems like a very similar solution could be applied here?

bashonly avatar Jan 13 '26 23:01 bashonly

Hello Everyone, Thank you for reporting this. The issue has been resolved in PR #1259 and has been released as part of [email protected]. We’ve confirmed that the deprecation warning no longer appears. Since the issue is now addressed, we are closing this. Please don’t hesitate to reach out if you notice any further issues.

aparnajyothi-y avatar Jan 23 '26 06:01 aparnajyothi-y