Skip to content

Fix failure with unbounded local variable access on Python 3.11+#18584

Merged
wangxin merged 1 commit intosonic-net:masterfrom
opcoder0:ptf-bookworm/unbounded-local-var
May 27, 2025
Merged

Fix failure with unbounded local variable access on Python 3.11+#18584
wangxin merged 1 commit intosonic-net:masterfrom
opcoder0:ptf-bookworm/unbounded-local-var

Conversation

@opcoder0
Copy link
Contributor

Description of PR

Test gnmi/test_gnmi_appldb.py::test_gnmi_appldb_01 fails with UnboundLocalError: local variable 'output' referenced before assignment on Bookworm due to stricter checks in Python 3.11

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Approach

What is the motivation for this PR?

Migration of Docker PTF to Bookworm

How did you do it?

NA

How did you verify/test it?

Manually

Any platform specific information?

NA

Supported testbed topology if it's a new test case?

NA

Documentation

NA

@opcoder0 opcoder0 requested a review from ganglyu May 23, 2025 08:12
@mssonicbld
Copy link
Collaborator

/azp run

@opcoder0 opcoder0 requested a review from wangxin May 23, 2025 08:12
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@wangxin wangxin merged commit d6ed8ee into sonic-net:master May 27, 2025
12 checks passed
bachalla pushed a commit to bachalla/sonic-mgmt that referenced this pull request Jun 2, 2025
…ic-net#18584)

Test gnmi/test_gnmi_appldb.py::test_gnmi_appldb_01 fails with UnboundLocalError: local variable 'output' referenced before assignment on Bookworm due to stricter checks in Python 3.11
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jun 17, 2025
…ic-net#18584)

Test gnmi/test_gnmi_appldb.py::test_gnmi_appldb_01 fails with UnboundLocalError: local variable 'output' referenced before assignment on Bookworm due to stricter checks in Python 3.11
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202505: #19047

yejianquan pushed a commit that referenced this pull request Jun 17, 2025
) (#19047)

Test gnmi/test_gnmi_appldb.py::test_gnmi_appldb_01 fails with UnboundLocalError: local variable 'output' referenced before assignment on Bookworm due to stricter checks in Python 3.11

Co-authored-by: Sai Kiran <[email protected]>
yejianquan pushed a commit that referenced this pull request Jun 18, 2025
…9049)

Description of PR
Consolidated PR with all changes required for docker-ptf Bookworm based image. Based on these PRs for master -

#18544
#18627
#18584
#18583

Summary:
Fixes # (issue)

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202205
 202305
 202311
 202405
 202411
 202505
Approach
What is the motivation for this PR?
This change is backward compatible and is required to support running tests in docker-ptf Bookworm image.

How did you do it?
See description

signed-off-by: [email protected]
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202412: Azure/sonic-mgmt.msft#420

opcoder0 added a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
…ic-net#18584)

Test gnmi/test_gnmi_appldb.py::test_gnmi_appldb_01 fails with UnboundLocalError: local variable 'output' referenced before assignment on Bookworm due to stricter checks in Python 3.11

Signed-off-by: opcoder0 <[email protected]>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
…ic-net#18584)

Test gnmi/test_gnmi_appldb.py::test_gnmi_appldb_01 fails with UnboundLocalError: local variable 'output' referenced before assignment on Bookworm due to stricter checks in Python 3.11

Signed-off-by: Aharon Malkin <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
…ic-net#18584)

Test gnmi/test_gnmi_appldb.py::test_gnmi_appldb_01 fails with UnboundLocalError: local variable 'output' referenced before assignment on Bookworm due to stricter checks in Python 3.11

Signed-off-by: Guy Shemesh <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
…ic-net#18584)

Test gnmi/test_gnmi_appldb.py::test_gnmi_appldb_01 fails with UnboundLocalError: local variable 'output' referenced before assignment on Bookworm due to stricter checks in Python 3.11

Signed-off-by: Guy Shemesh <[email protected]>
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.

6 participants