Skip to content

gh-87868: Sort and remove duplicates in getenvironment()#102731

Merged
zooba merged 63 commits into
python:mainfrom
aisk:getenvironment
Jan 9, 2024
Merged

gh-87868: Sort and remove duplicates in getenvironment()#102731
zooba merged 63 commits into
python:mainfrom
aisk:getenvironment

Conversation

@aisk

@aisk aisk commented Mar 15, 2023

Copy link
Copy Markdown
Member

Comment thread Misc/NEWS.d/next/Windows/2023-03-15-23-53-45.gh-issue-87868.4C36oQ.rst Outdated
Comment thread Modules/_winapi.c Outdated
AlexWaygood added a commit to AlexWaygood/cpython that referenced this pull request Mar 15, 2023
The "check if generated files are up to date" CI check appears to be currently failing on all PRs (but not on pushes to main) 

See, for example:
- python#94468
- python#94468
- python#102731

This appears to be because the C-analyzer tool doesn't like the `#line` directives introduced in python@70185de. I'm advised by the message printed to the terminal in https://github.com/python/cpython/actions/runs/4428706945/jobs/7768216988#step:14:84 that this is the appropriate short-term fix!

Cc. @ericsnowcurrently
AlexWaygood added a commit that referenced this pull request Mar 15, 2023
The "check if generated files are up to date" CI check appears to be currently failing on all PRs (but not on pushes to main) 

See, for example:
- #94468
- #94468
- #102731

This appears to be because the C-analyzer tool doesn't like the `#line` directives introduced in 70185de. I'm advised by the message printed to the terminal in https://github.com/python/cpython/actions/runs/4428706945/jobs/7768216988#step:14:84 that this is the appropriate short-term fix!
Fidget-Spinner pushed a commit to Fidget-Spinner/cpython that referenced this pull request Mar 27, 2023
The "check if generated files are up to date" CI check appears to be currently failing on all PRs (but not on pushes to main) 

See, for example:
- python#94468
- python#94468
- python#102731

This appears to be because the C-analyzer tool doesn't like the `#line` directives introduced in python@70185de. I'm advised by the message printed to the terminal in https://github.com/python/cpython/actions/runs/4428706945/jobs/7768216988#step:14:84 that this is the appropriate short-term fix!
@aisk aisk requested a review from eendebakpt April 3, 2023 12:10
warsaw pushed a commit to warsaw/cpython that referenced this pull request Apr 11, 2023
The "check if generated files are up to date" CI check appears to be currently failing on all PRs (but not on pushes to main) 

See, for example:
- python#94468
- python#94468
- python#102731

This appears to be because the C-analyzer tool doesn't like the `#line` directives introduced in python@70185de. I'm advised by the message printed to the terminal in https://github.com/python/cpython/actions/runs/4428706945/jobs/7768216988#step:14:84 that this is the appropriate short-term fix!
Comment thread Modules/_winapi.c Outdated
Comment thread Modules/_winapi.c Outdated
Comment thread Lib/test/test_subprocess.py
aisk and others added 6 commits August 20, 2023 16:17
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
@aisk aisk requested a review from eendebakpt August 20, 2023 12:41
Comment thread Modules/_winapi.c Outdated
Comment thread Modules/_winapi.c Outdated
Comment thread Modules/_winapi.c Outdated
Comment thread Lib/test/test_subprocess.py
Comment thread Modules/_winapi.c Outdated
Comment thread Modules/_winapi.c Outdated
@aisk aisk requested a review from eendebakpt September 3, 2023 11:32
Comment thread Modules/_winapi.c Outdated
@zooba

zooba commented Jan 9, 2024

Copy link
Copy Markdown
Member

CI looks good (and Azure Pipelines can be ignored here), so congrats! It's in!

@zooba zooba added OS-windows needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jan 9, 2024
@miss-islington-app

This comment has been minimized.

@miss-islington-app

This comment has been minimized.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 9, 2024
…nGH-102731)

(cherry picked from commit c31be58)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
@bedevere-app

bedevere-app Bot commented Jan 9, 2024

Copy link
Copy Markdown

GH-113865 is a backport of this pull request to the 3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 9, 2024
…nGH-102731)

(cherry picked from commit c31be58)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Jan 9, 2024
@bedevere-app

bedevere-app Bot commented Jan 9, 2024

Copy link
Copy Markdown

GH-113866 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Jan 9, 2024
@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 RHEL7 3.x has failed when building commit c31be58.

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/all/#builders/15/builds/6594) and take a look at the build logs.
  4. Check if the failure is related to this commit (c31be58) 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/all/#builders/15/builds/6594

Failed tests:

  • test_subprocess

Failed subtests:

  • test_one_environment_variable - test.test_subprocess.ProcessTestCase.test_one_environment_variable
  • test_one_environment_variable - test.test_subprocess.ProcessTestCaseNoPoll.test_one_environment_variable

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64/build/Lib/test/test_subprocess.py", line 847, in test_one_environment_variable
    self.assertTrue(stdout.startswith(b"fruit=orange"))
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true

@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 RHEL8 3.x has failed when building commit c31be58.

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/all/#builders/185/builds/5849) and take a look at the build logs.
  4. Check if the failure is related to this commit (c31be58) 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/all/#builders/185/builds/5849

Failed tests:

  • test_subprocess

Failed subtests:

  • test_one_environment_variable - test.test_subprocess.ProcessTestCase.test_one_environment_variable
  • test_one_environment_variable - test.test_subprocess.ProcessTestCaseNoPoll.test_one_environment_variable

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64/build/Lib/test/test_subprocess.py", line 847, in test_one_environment_variable
    self.assertTrue(stdout.startswith(b"fruit=orange"))
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true

@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot aarch64 RHEL8 3.x has failed when building commit c31be58.

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/all/#builders/529/builds/5692) and take a look at the build logs.
  4. Check if the failure is related to this commit (c31be58) 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/all/#builders/529/builds/5692

Failed tests:

  • test_subprocess

Failed subtests:

  • test_one_environment_variable - test.test_subprocess.ProcessTestCase.test_one_environment_variable
  • test_one_environment_variable - test.test_subprocess.ProcessTestCaseNoPoll.test_one_environment_variable

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64/build/Lib/test/test_subprocess.py", line 847, in test_one_environment_variable
    self.assertTrue(stdout.startswith(b"fruit=orange"))
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true

@zooba

zooba commented Jan 9, 2024

Copy link
Copy Markdown
Member

Okay, these buildbot failures look related to the new test. Will be a couple hours before I can dig into it myself, so if someone else gets started first, I'd add the actual stdout to the message parameter of the assertTrue call to see what's happening there.

It's possible that the process is failing to start with a mostly empty environment?

@aisk

aisk commented Jan 9, 2024

Copy link
Copy Markdown
Member Author

I'm attempting to address it, I think maybe it's caused by create a new process need some basic environment to start with.

@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot aarch64 Fedora Stable 3.x has failed when building commit c31be58.

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/all/#builders/125/builds/5079) and take a look at the build logs.
  4. Check if the failure is related to this commit (c31be58) 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/all/#builders/125/builds/5079

Failed tests:

  • test_subprocess

Failed subtests:

  • test_one_environment_variable - test.test_subprocess.ProcessTestCase.test_one_environment_variable
  • test_one_environment_variable - test.test_subprocess.ProcessTestCaseNoPoll.test_one_environment_variable

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64/build/Lib/test/test_subprocess.py", line 847, in test_one_environment_variable
    self.assertTrue(stdout.startswith(b"fruit=orange"))
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true

@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 RHEL8 FIPS Only Blake2 Builtin Hash 3.x has failed when building commit c31be58.

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/all/#builders/469/builds/6966) and take a look at the build logs.
  4. Check if the failure is related to this commit (c31be58) 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/all/#builders/469/builds/6966

Failed tests:

  • test_subprocess

Failed subtests:

  • test_one_environment_variable - test.test_subprocess.ProcessTestCase.test_one_environment_variable
  • test_one_environment_variable - test.test_subprocess.ProcessTestCaseNoPoll.test_one_environment_variable

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_subprocess.py", line 847, in test_one_environment_variable
    self.assertTrue(stdout.startswith(b"fruit=orange"))
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true

@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 Ubuntu Shared 3.x has failed when building commit c31be58.

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/all/#builders/506/builds/6791) and take a look at the build logs.
  4. Check if the failure is related to this commit (c31be58) 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/all/#builders/506/builds/6791

Failed tests:

  • test_subprocess

Failed subtests:

  • test_one_environment_variable - test.test_subprocess.ProcessTestCase.test_one_environment_variable
  • test_one_environment_variable - test.test_subprocess.ProcessTestCaseNoPoll.test_one_environment_variable

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_subprocess.py", line 847, in test_one_environment_variable
    self.assertTrue(stdout.startswith(b"fruit=orange"))
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true

@aisk aisk deleted the getenvironment branch January 9, 2024 16:35
@aisk

aisk commented Jan 9, 2024

Copy link
Copy Markdown
Member Author

Change the assertTrue to assertEqual will help to address it. Should I open a new PR to do this, or is there some other way to do it?

@aisk

aisk commented Jan 9, 2024

Copy link
Copy Markdown
Member Author

The change will be like #113867

@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 Fedora Stable 3.x has failed when building commit c31be58.

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/all/#builders/543/builds/5159) and take a look at the build logs.
  4. Check if the failure is related to this commit (c31be58) 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/all/#builders/543/builds/5159

Failed tests:

  • test_subprocess

Failed subtests:

  • test_one_environment_variable - test.test_subprocess.ProcessTestCase.test_one_environment_variable
  • test_one_environment_variable - test.test_subprocess.ProcessTestCaseNoPoll.test_one_environment_variable

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_subprocess.py", line 847, in test_one_environment_variable
    self.assertTrue(stdout.startswith(b"fruit=orange"))
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true

zooba pushed a commit that referenced this pull request Jan 10, 2024
(cherry picked from commit c31be58)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
zooba pushed a commit that referenced this pull request Jan 11, 2024
(cherry picked from commit c31be58)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
kulikjak pushed a commit to kulikjak/cpython that referenced this pull request Jan 22, 2024
…nGH-102731)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
aisk added a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…nGH-102731)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…nGH-102731)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
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.

[_winapi] correctly sort and remove duplicates in getenvironment()

6 participants