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

bpo-23420: Verify the value of '-s' when execute the CLI of cProfile #9925

Merged
merged 4 commits into from Oct 17, 2018

Conversation

Projects
None yet
5 participants
@matrixise
Contributor

matrixise commented Oct 17, 2018

@@ -139,7 +140,8 @@ def main():
help="Save stats to <outfile>", default=None)
parser.add_option('-s', '--sort', dest="sort",
help="Sort order when printing to stdout, based on pstats.Stats class",
default=-1)
default=-1,
choices=list(pstats.Stats.sort_arg_dict_default.keys()))

This comment has been minimized.

@vstinner

vstinner Oct 17, 2018

Member

.keys() is not needed.

This comment has been minimized.

@vstinner

vstinner Oct 17, 2018

Member

By the way, maybe we should sort choices? Like sorted(...)?

Suggested change Beta
choices=list(pstats.Stats.sort_arg_dict_default.keys()))
choices=sorted(pstats.Stats.sort_arg_dict_default)
@bedevere-bot

This comment has been minimized.

bedevere-bot commented Oct 17, 2018

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

matrixise added some commits Oct 17, 2018

@vstinner vstinner merged commit fcd5e84 into python:master Oct 17, 2018

5 checks passed

Azure Pipelines PR #20181017.11 succeeded
Details
bedevere/issue-number Issue number 23420 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@miss-islington

This comment has been minimized.

miss-islington commented Oct 17, 2018

Thanks @matrixise for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒🤖

@miss-islington

This comment has been minimized.

miss-islington commented Oct 17, 2018

Sorry, @matrixise and @vstinner, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker fcd5e84a515e19409840c570730f0728e9fcfc83 3.7

@miss-islington

This comment has been minimized.

miss-islington commented Oct 17, 2018

Sorry, @matrixise and @vstinner, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker fcd5e84a515e19409840c570730f0728e9fcfc83 3.6

matrixise added a commit to matrixise/cpython that referenced this pull request Oct 17, 2018

[3.7] bpo-23420: Verify the value of '-s' when execute the CLI of cPr…
…ofile (pythonGH-9925)

Verify the value for the parameter '-s' of the cProfile CLI. Patch by Robert
Kuska.

Co-authored-by: Robert Kuska <rkuska@gmail.com>
(cherry picked from commit fcd5e84)
@bedevere-bot

This comment has been minimized.

bedevere-bot commented Oct 17, 2018

GH-9926 is a backport of this pull request to the 3.7 branch.

matrixise added a commit to matrixise/cpython that referenced this pull request Oct 17, 2018

[3.6] bpo-23420: Verify the value of '-s' when execute the CLI of cPr…
…ofile (pythonGH-9925)

Verify the value for the parameter '-s' of the cProfile CLI. Patch by Robert
Kuska.

Co-authored-by: Robert Kuska <rkuska@gmail.com>
(cherry picked from commit fcd5e84)
@bedevere-bot

This comment has been minimized.

bedevere-bot commented Oct 17, 2018

GH-9927 is a backport of this pull request to the 3.6 branch.

matrixise added a commit to matrixise/cpython that referenced this pull request Oct 17, 2018

[2.7] bpo-23420: Verify the value of '-s' when execute the CLI of cPr…
…ofile (pythonGH-9925)

Verify the value for the parameter '-s' of the cProfile CLI. Patch by Robert
Kuska.

Co-authored-by: Robert Kuska <rkuska@gmail.com>
(cherry picked from commit fcd5e84)

miss-islington added a commit that referenced this pull request Oct 17, 2018

[3.7] bpo-23420: Verify the value of '-s' when execute the CLI of cPr…
…ofile (GH-9925) (GH-9926)

[3.7] [bpo-23420](https://bugs.python.org/issue23420): Verify the value of '-s' when execute the CLI of cProfile (GH-9925)

Verify the value for the parameter '-s' of the cProfile CLI. Patch by Robert
Kuska.

Co-authored-by: Robert Kuska <rkuska@gmail.com>
(cherry picked from commit fcd5e84)





https://bugs.python.org/issue23420

vstinner added a commit that referenced this pull request Oct 17, 2018

[3.6] bpo-23420: Verify the value of '-s' when execute the CLI of cPr…
…ofile (GH-9925) (GH-9927)

Verify the value for the parameter '-s' of the cProfile CLI. Patch by Robert
Kuska.

Co-authored-by: Robert Kuska <rkuska@gmail.com>
(cherry picked from commit fcd5e84)

miss-islington added a commit that referenced this pull request Oct 17, 2018

[2.7] bpo-23420: Verify the value of '-s' when execute the CLI of cPr…
…ofile (GH-9925) (GH-9928)

Verify the value for the parameter '-s' of the cProfile CLI. Patch by Robert
Kuska.

Co-authored-by: Robert Kuska <rkuska@gmail.com>
(cherry picked from commit fcd5e84)





https://bugs.python.org/issue23420

CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request Oct 18, 2018

Merge branch 'master' into fix-issue8525
* master: (621 commits)
  Update opcode.h header comment to mention the source data file (pythonGH-9935)
  bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (pythonGH-9760)
  Updated documentation on logging.debug(). (pythonGH-9946)
  bpo-34765: Update the install-sh file (pythonGH-9592)
  bpo-35008: Fix possible leaks in Element.__setstate__(). (pythonGH-9924)
  bpo-35011: Restore use of pyexpatns.h in libexpat (pythonGH-9939)
  bpo-24658: Fix read/write greater than 2 GiB on macOS (pythonGH-1705)
  Add missing comma to wsgiref doc (pythonGH-9932)
  bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (pythonGH-9925)
  Doc: Fix is_prime (pythonGH-9909)
  In email docs, correct spelling of foregoing (python#9856)
  In email.parser in message_from_bytes, update `strict` to `policy` (python#9854)
  bpo-34997: Fix test_logging.ConfigDictTest.test_out_of_order (pythonGH-9913)
  Added CLI starter example to logging cookbook. (pythonGH-9910)
  bpo-34783: Fix test_nonexisting_script() (pythonGH-9896)
  bpo-23554: Change echo server example class name from EchoServerClientProtocol to EchoServerProtocol (pythonGH-9859)
  bpo-34989: python-gdb.py: fix current_line_num() (pythonGH-9889)
  Stop using deprecated logging API in Sphinx suspicious checker (pythonGH-9875)
  fix dangling keyfunc examples in documentation of heapq and sorted (python#1432)
  bpo-34844: logging.Formatter enhancement - Ensure style and format string matches in logging.Formatter  (pythonGH-9703)
  ...

CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request Oct 18, 2018

Merge branch 'master' into fix-issue15045
* master: (1787 commits)
  Update opcode.h header comment to mention the source data file (pythonGH-9935)
  bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (pythonGH-9760)
  Updated documentation on logging.debug(). (pythonGH-9946)
  bpo-34765: Update the install-sh file (pythonGH-9592)
  bpo-35008: Fix possible leaks in Element.__setstate__(). (pythonGH-9924)
  bpo-35011: Restore use of pyexpatns.h in libexpat (pythonGH-9939)
  bpo-24658: Fix read/write greater than 2 GiB on macOS (pythonGH-1705)
  Add missing comma to wsgiref doc (pythonGH-9932)
  bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (pythonGH-9925)
  Doc: Fix is_prime (pythonGH-9909)
  In email docs, correct spelling of foregoing (python#9856)
  In email.parser in message_from_bytes, update `strict` to `policy` (python#9854)
  bpo-34997: Fix test_logging.ConfigDictTest.test_out_of_order (pythonGH-9913)
  Added CLI starter example to logging cookbook. (pythonGH-9910)
  bpo-34783: Fix test_nonexisting_script() (pythonGH-9896)
  bpo-23554: Change echo server example class name from EchoServerClientProtocol to EchoServerProtocol (pythonGH-9859)
  bpo-34989: python-gdb.py: fix current_line_num() (pythonGH-9889)
  Stop using deprecated logging API in Sphinx suspicious checker (pythonGH-9875)
  fix dangling keyfunc examples in documentation of heapq and sorted (python#1432)
  bpo-34844: logging.Formatter enhancement - Ensure style and format string matches in logging.Formatter  (pythonGH-9703)
  ...

bradengroom added a commit to bradengroom/cpython that referenced this pull request Oct 25, 2018

[2.7] bpo-23420: Verify the value of '-s' when execute the CLI of cPr…
…ofile (pythonGH-9925) (pythonGH-9928)

Verify the value for the parameter '-s' of the cProfile CLI. Patch by Robert
Kuska.

Co-authored-by: Robert Kuska <rkuska@gmail.com>
(cherry picked from commit fcd5e84)





https://bugs.python.org/issue23420

yahya-abou-imran added a commit to yahya-abou-imran/cpython that referenced this pull request Nov 2, 2018

bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (
…pythonGH-9925)

Verify the value for the parameter '-s' of the cProfile CLI. Patch by Robert
Kuska.

Co-authored-by: Robert Kuska <rkuska@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment