Skip to content

gh-132983: Make _zstd C code PEP 7 compliant #134605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 24, 2025

Conversation

emmatyping
Copy link
Member

@emmatyping emmatyping commented May 24, 2025

Mostly just making sure things are under 80 characters and fixing a few incorrectly placed left braces. I also removed const from instances of _zstd_state* const mod_state since a) it was making some lines go over 80 characters b) it is unnecessary and c) it better matches the CPython style.

This is the final todo left in #132983 🎉

@gpshead gpshead merged commit 973b8f6 into python:main May 24, 2025
42 checks passed
@miss-islington-app
Copy link

Thanks @emmatyping for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 24, 2025
Make _zstd C code PEP 7 compliant
(cherry picked from commit 973b8f6)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
@bedevere-app
Copy link

bedevere-app bot commented May 24, 2025

GH-134609 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 24, 2025
@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Windows Server 2022 NoGIL 3.x (tier-1) has failed when building commit 973b8f6.

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/1241/builds/5870) and take a look at the build logs.
  4. Check if the failure is related to this commit (973b8f6) 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/1241/builds/5870

Failed tests:

  • test_weakref
  • test_venv

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

==

Click to see traceback logs
Traceback (most recent call last):


Traceback (most recent call last):
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_venv.py", line 616, in test_multiprocessing
    out, err = check_output([self.envpy(real_env_dir=True), '-c',
               ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        'from multiprocessing import Pool; '
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        'pool = Pool(1); '
        ^^^^^^^^^^^^^^^^^^
        'print(pool.apply_async("Python".lower).get(3)); '
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        'pool.terminate()'])
        ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_venv.py", line 58, in check_output
    raise subprocess.CalledProcessError(
        p.returncode, cmd, out, err)
subprocess.CalledProcessError: Command '['C:\\Users\\Administrator\\AppData\\Local\\Temp\\test_python_oln4cn7v\\tmp5x1oqj4y\\Scripts\\python3.15t_d.exe', '-c', 'from multiprocessing import Pool; pool = Pool(1); print(pool.apply_async("Python".lower).get(3)); pool.terminate()']' returned non-zero exit status 1.

gpshead pushed a commit that referenced this pull request May 24, 2025
)

gh-132983: Make _zstd C code PEP 7 compliant (GH-134605)

Make _zstd C code PEP 7 compliant
(cherry picked from commit 973b8f6)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
@emmatyping
Copy link
Member Author

Hm, that buildbot failure looks unrelated I think.

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.

3 participants