GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-105013: Fix inspect.getsource with parenthesized multiline lambdas by pablogsal · Pull Request #105021 · python/cpython

Conversation

@pablogsal

@pablogsal pablogsal commented May 27, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: Possible regression in Python3.12 tokenizer #105013

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@pablogsal
pythongh-105013: Fix inspect.getsource with parenthesized multiline l…
ff9abff
…ambdas
@bedevere-bot bedevere-bot added the awaiting core review label May 27, 2023
@bedevere-bot bedevere-bot mentioned this pull request May 27, 2023
Possible regression in Python3.12 tokenizer #105013
Closed
@pablogsal
pablogsal requested a review from lysnikolaou May 27, 2023 15:58
@pablogsal pablogsal added the needs backport to 3.12 only security fixes label May 27, 2023
@pablogsal
fixup! pythongh-105013: Fix inspect.getsource with parenthesized mult…
9b9d810
…iline lambdas

Signed-off-by: Pablo Galindo <[email protected]>
@pablogsal
pablogsal force-pushed the gh-105013 branch from 649397d to 9b9d810 Compare May 27, 2023 16:34
arhadthedev
arhadthedev reviewed May 27, 2023
View reviewed changes
Comment thread Lib/test/inspect_fodder2.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

sunmy2019
sunmy2019 reviewed May 27, 2023
View reviewed changes
Comment thread Lib/inspect.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/inspect_fodder2.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

pablogsal added 2 commits May 27, 2023 23:54
@pablogsal
fixup! fixup! pythongh-105013: Fix inspect.getsource with parenthesiz…
82f0023
…ed multiline lambdas
@pablogsal
fixup! fixup! fixup! pythongh-105013: Fix inspect.getsource with pare…
6d41c1a
…nthesized multiline lambdas
@pablogsal
pablogsal merged commit 3a5be87 into python:main May 27, 2023
@pablogsal
pablogsal deleted the gh-105013 branch May 27, 2023 23:20
@miss-islington

miss-islington commented May 27, 2023

Copy link
Copy Markdown
Contributor

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting core review label May 27, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 27, 2023
@pablogsal @miss-islington
pythongh-105013: Fix inspect.getsource with parenthesized multiline l…
da6274b
…ambdas (pythonGH-105021)

(cherry picked from commit 3a5be87)

Co-authored-by: Pablo Galindo Salgado <[email protected]>
@bedevere-bot

bedevere-bot commented May 27, 2023

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label May 27, 2023
@bedevere-bot

bedevere-bot commented May 28, 2023

Copy link
Copy Markdown

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

Hi! The buildbot s390x Fedora LTO 3.x has failed when building commit 3a5be87.

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/55/builds/3442) and take a look at the build logs.
  4. Check if the failure is related to this commit (3a5be87) 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/55/builds/3442

Failed tests:

  • test_tools

Failed subtests:

  • test_freeze_simple_script - test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script
  • test_subprocess_consistent_callbacks - test.test_asyncio.test_subprocess.SubprocessThreadedWatcherTests.test_subprocess_consistent_callbacks

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

== Tests result: FAILURE then FAILURE ==

430 tests OK.

10 slowest tests:

  • test_tools: 5 min 28 sec
  • test_gdb: 2 min 21 sec
  • test_concurrent_futures: 2 min 13 sec
  • test_multiprocessing_spawn: 1 min 29 sec
  • test_signal: 1 min 16 sec
  • test_multiprocessing_forkserver: 1 min 11 sec
  • test_multiprocessing_fork: 1 min 7 sec
  • test_socket: 43.3 sec
  • test_io: 33.8 sec
  • test_imaplib: 31.8 sec

1 test failed:
test_tools

16 tests skipped:
test.test_asyncio.test_windows_events
test.test_asyncio.test_windows_utils test_devpoll test_ioctl
test_kqueue test_launcher test_perf_profiler test_readline
test_startfile test_tkinter test_ttk test_winconsoleio test_winreg
test_winsound test_wmi test_zipfile64

2 re-run tests:
test.test_asyncio.test_subprocess test_tools

Total duration: 13 min 5 sec

Click to see traceback logs
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/tmpp5ax66v2/cpython/Lib/sysconfig.py", line 740, in get_config_var
    return get_config_vars().get(name)
           ^^^^^^^^^^^^^^^^^
  File "/tmp/tmpp5ax66v2/cpython/Lib/sysconfig.py", line 723, in get_config_vars
    _init_config_vars()
  File "/tmp/tmpp5ax66v2/cpython/Lib/sysconfig.py", line 670, in _init_config_vars
    _init_posix(_CONFIG_VARS)
  File "/tmp/tmpp5ax66v2/cpython/Lib/sysconfig.py", line 536, in _init_posix
    _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_sysconfigdata__linux_s390x-linux-gnu'


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto/build/Lib/test/test_asyncio/test_subprocess.py", line 788, in test_subprocess_consistent_callbacks
    self.loop.run_until_complete(main())
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto/build/Lib/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto/build/Lib/test/test_asyncio/test_subprocess.py", line 780, in main
    self.assertEqual(events, [
AssertionError: Lists differ: [('pi[69 chars]), 'process_exited', 'pipe_connection_lost', '[17 chars]ost'] != [('pi[69 chars]), 'pipe_connection_lost', 'pipe_connection_lo[17 chars]ted']


Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/test_python_m88f8cj4/tmpuk19wcv2/cpython/Lib/sysconfig.py", line 740, in get_config_var
    return get_config_vars().get(name)
           ^^^^^^^^^^^^^^^^^
  File "/tmp/test_python_m88f8cj4/tmpuk19wcv2/cpython/Lib/sysconfig.py", line 723, in get_config_vars
    _init_config_vars()
  File "/tmp/test_python_m88f8cj4/tmpuk19wcv2/cpython/Lib/sysconfig.py", line 670, in _init_config_vars
    _init_posix(_CONFIG_VARS)
  File "/tmp/test_python_m88f8cj4/tmpuk19wcv2/cpython/Lib/sysconfig.py", line 536, in _init_posix
    _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_sysconfigdata__linux_s390x-linux-gnu'


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto/build/Lib/test/test_tools/test_freeze.py", line 27, in test_freeze_simple_script
    outdir, scriptfile, python = helper.prepare(script, outdir)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto/build/Tools/freeze/test/freeze.py", line 180, in prepare
    _run_quiet([MAKE, '-C', builddir, parallel])
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto/build/Tools/freeze/test/freeze.py", line 25, in _run_quiet
    return subprocess.run(
           ^^^^^^^^^^^^^^^
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto/build/Lib/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/make', '-C', '/tmp/tmpp5ax66v2/python-build', '-j2']' returned non-zero exit status 2.


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto/build/Lib/test/test_tools/test_freeze.py", line 27, in test_freeze_simple_script
    outdir, scriptfile, python = helper.prepare(script, outdir)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto/build/Tools/freeze/test/freeze.py", line 180, in prepare
    _run_quiet([MAKE, '-C', builddir, parallel])
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto/build/Tools/freeze/test/freeze.py", line 25, in _run_quiet
    return subprocess.run(
           ^^^^^^^^^^^^^^^
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto/build/Lib/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/make', '-C', '/tmp/test_python_m88f8cj4/tmpuk19wcv2/python-build', '-j2']' returned non-zero exit status 2.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pablogsal added a commit that referenced this pull request May 28, 2023
@miss-islington @pablogsal
[3.12] gh-105013: Fix inspect.getsource with parenthesized multiline …
41b622b
…lambdas (GH-105021) (#105032)

gh-105013: Fix inspect.getsource with parenthesized multiline lambdas (GH-105021)
(cherry picked from commit 3a5be87)

Co-authored-by: Pablo Galindo Salgado <[email protected]>
@pablogsal pablogsal mentioned this pull request May 28, 2023
SyntaxError: unmatched ')' with whitespace in lambda? #105042
Closed
@erlend-aasland erlend-aasland mentioned this pull request Jun 6, 2023
3.12 backport gh 105236 #105358
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@arhadthedev arhadthedev arhadthedev left review comments
@sunmy2019 sunmy2019 sunmy2019 left review comments
@lysnikolaou lysnikolaou Awaiting requested review from lysnikolaou

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@pablogsal @miss-islington @bedevere-bot @arhadthedev @sunmy2019
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.