Skip to content
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

pdb: fix for #1472251('run/runeval' commands bug) #43240

Closed
jakamkon mannequin opened this issue Apr 18, 2006 · 6 comments
Closed

pdb: fix for #1472251('run/runeval' commands bug) #43240

jakamkon mannequin opened this issue Apr 18, 2006 · 6 comments
Labels
stdlib Python modules in the Lib dir

Comments

@jakamkon
Copy link
Mannequin

jakamkon mannequin commented Apr 18, 2006

BPO 1472257
Files
  • pdb-run.patch: FIx for python/issues-test-cpython#1472251
  • pdb-run-v2.patch: FIx for python/issues-test-cpython#1472251
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2006-07-11.13:29:36.000>
    created_at = <Date 2006-04-18.12:22:26.000>
    labels = ['library']
    title = "pdb: fix for python/issues-test-cpython#1472251('run/runeval' commands bug)"
    updated_at = <Date 2006-07-11.13:29:36.000>
    user = 'https://bugs.python.org/jakamkon'

    bugs.python.org fields:

    activity = <Date 2006-07-11.13:29:36.000>
    actor = 'jakamkon'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2006-04-18.12:22:26.000>
    creator = 'jakamkon'
    dependencies = []
    files = ['7178', '7179']
    hgrepos = []
    issue_num = 1472257
    keywords = ['patch']
    message_count = 6.0
    messages = ['50058', '50059', '50060', '50061', '50062', '50063']
    nosy_count = 2.0
    nosy_names = ['isandler', 'jakamkon']
    pr_nums = []
    priority = 'low'
    resolution = 'rejected'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1472257'
    versions = ['Python 2.5']

    @jakamkon
    Copy link
    Mannequin Author

    jakamkon mannequin commented Apr 18, 2006

    This simple patch ensure that the first argument to the
    'run/runeval' functions is string.See Bug bpo-1472251 for
    more details.

    @jakamkon jakamkon mannequin closed this as completed Apr 18, 2006
    @jakamkon jakamkon mannequin added the stdlib Python modules in the Lib dir label Apr 18, 2006
    @isandler
    Copy link
    Mannequin

    isandler mannequin commented Jun 18, 2006

    Logged In: YES
    user_id=971153

    I am not sure whether the original bug is indeed a bug.
    (see discussion of that bug)...

    And even if bpo-1472251 is deemed a bug, the patch has a couple
    of unrelated problems:

    1. bdb.py should not print anything on stdout

    2. current bdb.py's run() accepts code objects, the patch
      breaks it.

    Should the patch be rejected?

    @jakamkon
    Copy link
    Mannequin Author

    jakamkon mannequin commented Jun 19, 2006

    Logged In: YES
    user_id=1491175

    1.Why?bdb.py prints informations about breakpoints to stdout
    in bpprint function.

    2.This is correct.Comment right before run function should
    be updated to point that bdb.py's run could be used also
    with code objects.

    According to the pdb's documentation, run command should be
    invoked only with statement given as a string.Run's argument
    checking and error message could be placed in pdb's run
    function.I included new patch.What's your opinion?

    @isandler
    Copy link
    Mannequin

    isandler mannequin commented Jun 25, 2006

    Logged In: YES
    user_id=971153

    ...1.Why?bdb.py prints informations about breakpoints to
    stdout in bpprint function....

    I am not sure printing to stdout in bpprint was a good
    decision! Really, if bdb is intended to be a low-level
    debugging module, it should not print anything to stdout...

    ..I included new patch.What's your opinion?...

    A couple of comments:

    1. the latest pdb's output goes through redirection. The
      patch does not..
    2. Is it really necessary to restrict pdb's run() to
      strings? Being able to pass a code object seems like a
      useful thing (I know that pdb docs explicitly say that the
      1st arg must be a string)
    3. finally, I guess I am not sure about the general
      approach to argument type checking in stdlib.
      (is it really pdb's business to check run() arguments? E.g
      if bdb's run() supports other types (say, UserString or
      file), pdb's type checking would have to change)...

    I guess, I am -0 on this patch..

    @jakamkon
    Copy link
    Mannequin Author

    jakamkon mannequin commented Jul 11, 2006

    Logged In: YES
    user_id=1491175

    There's no uploaded file! You have to check the
    checkbox labeled "Check to Upload & Attach File"
    when you upload a file. In addition, even if you
    *did* check this checkbox, a bug in SourceForge
    prevents attaching a file when *creating* an issue.

    Please try again.

    (This is a SourceForge annoyance that we can do
    nothing about. :-( )

    @jakamkon
    Copy link
    Mannequin Author

    jakamkon mannequin commented Jul 11, 2006

    Logged In: YES
    user_id=1491175

    Arguments 2) and 3) convinced me that my patch is not
    proper solution.It simply introduces unnecessary
    restrictions to bdb.I'll set this to Closed/Rejected.Thanks
    for all your comments.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants