FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-1635741 port _lsprof to multi-phase init (PEP 489) by koubaa · Pull Request #22220 · python/cpython · GitHub

/ cpython Public

bpo-1635741 port _lsprof to multi-phase init (PEP 489) - #22220

Merged
vstinner merged 3 commits into
python:masterfrom
koubaa:bpo-1635741-lsprof
Sep 23, 2020
Merged

bpo-1635741 port _lsprof to multi-phase init (PEP 489)#22220
vstinner merged 3 commits into
python:masterfrom
koubaa:bpo-1635741-lsprof

Conversation

koubaa commented Sep 12, 2020
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

koubaa commented Sep 13, 2020

Copy link
Copy Markdown
Contributor Author

@vstinner @corona10 @shihai1991 please review

shihai1991 commented Sep 13, 2020
edited
Loading

Copy link
Copy Markdown
Member

compile warning: ‘getstats_doc’ defined but not used [-Wunused-const-variable=
those code should be removed?

koubaa commented Sep 13, 2020

Copy link
Copy Markdown
Contributor Author

compile warning: ‘getstats_doc’ defined but not used [-Wunused-const-variable=
those code should be removed?

Oops, I meant to remove that!

Comment thread Modules/_lsprof.c Outdated

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, but I have some coding style requests.

Comment thread Modules/_lsprof.c Outdated
static PyStructSequence_Desc profiler_entry_desc = {
"_lsprof.profiler_entry", /* name */
NULL, /* doc */
"", /* doc */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

IMO PyType_FromSpec() should accept tp_doc=NULL, I created: https://bugs.python.org/issue41832

I don't ask you to change your PR, "" vs NULL can be changed again later.

Comment thread Modules/_lsprof.c Outdated
Comment thread Modules/_lsprof.c Outdated
Comment thread Modules/_lsprof.c Outdated

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. Thanks, the new code is easier to read!

Comment thread Modules/_lsprof.c
.name = "_lsprof.profiler_entry",
.doc = "",
.fields = profiler_entry_fields,
.n_in_sequence = 6

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

For me, it's way easier to read than the old format, thanks!

Comment thread Modules/_lsprof.c
if (PyModule_AddType(module, state->stats_subentry_type) < 0) {
return -1;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks, the new code is more regular (create type, add type, create type, add type, ...) and so easier to read!

vstinner merged commit 83de110 into python:master Sep 23, 2020
shihai1991 added a commit to shihai1991/cpython that referenced this pull request Sep 24, 2020
* origin/master: (27 commits)
  bpo-41428: Fix compiler warnings in unionobject.c (pythonGH-22388)
  bpo-41654: Fix compiler warning in MemoryError_dealloc() (pythonGH-22387)
  bpo-41833: threading.Thread now uses the target name (pythonGH-22357)
  bpo-30155: Add macros to get tzinfo from datetime instances (pythonGH-21633)
  bpo-33822: Update IDLE section of What's New 3.8 (pythonGH-22383)
  bpo-41844: Add IDLE section to What's New 3.9 (GN-22382)
  bpo-41841: Prepare IDLE News for 3.10 (pythonGH-22379)
  bpo-37779 : Add information about the overriding behavior of ConfigParser.read (pythonGH-15177)
  bpo-40170: Use inline _PyType_HasFeature() function (pythonGH-22375)
  bpo-40941: Fix stackdepth compiler warnings (pythonGH-22377)
  bpo-40941: Fix fold_tuple_on_constants() compiler warnings (pythonGH-22378)
  bpo-40521: Fix PyUnicode_InternInPlace() (pythonGH-22376)
  bpo-41834: Remove _Py_CheckRecursionLimit variable (pythonGH-22359)
  bpo-1635741, unicodedata: add ucd_type parameter to UCD_Check() macro (pythonGH-22328)
  bpo-1635741: Port _lsprof extension to multi-phase init (PEP 489) (pythonGH-22220)
  bpo-41513: Improve order of adding fractional values. Improve variable names. (pythonGH-22368)
  bpo-41816: `StrEnum.__str__` is `str.__str__` (pythonGH-22362)
  bpo-35764: Rewrite the IDLE Calltips doc section  (pythonGH-22363)
  bpo-41810: Reintroduce `types.EllipsisType`, `.NoneType` & `.NotImplementedType` (pythonGH-22336)
  bpo-41602: raise SIGINT exit code on KeyboardInterrupt from pymain_run_module (python#21956)
  ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL