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

Test issue #47020

Closed
gvanrossum opened this issue May 5, 2008 · 145 comments
Closed

Test issue #47020

gvanrossum opened this issue May 5, 2008 · 145 comments
Assignees
Labels
3.11 only security fixes easy tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@gvanrossum
Copy link
Member

BPO 2771
Nosy @pitrou, @nedbat, @ezio-melotti, @zware, @matrixise, @ewdurbin
PRs
  • bpo-29463: Add docstring field to some AST nodes. #46
  • Update Copyright dates in README #56
  • Use current name for macOS #55
  • fix typo #59
  • bpo-27494: Fix a 2to3 parser bug (trailing comma) #60
  • bpo-29481: DOC: mark which version typing.Deque added #61
  • Update copyright years #62
  • Add 2017 to copyright at the bottom #63
  • Add Travis CI and Codecov badges to README #70
  • bpo-29481: add versionadded 3.6.1 to typing.Deque docs #107
  • bpo-2771: Test commit #18614
  • Dependencies
  • bpo-12345: Add math.tau
  • bpo-12346: Python source code build fails with old mercurial
  • Superseder
  • bpo-2771: Test issue
  • Files
  • README.diff
  • a.diff
  • 6a1c8fcce229.diff
  • sometext.txt
  • foo
  • test.txt: test
  • unnamed
  • issue12753-3.diff
  • issue12753-3.diff
  • unnamed: This is a "test"
  • issue12753-3.diff
  • b17f9a10235f.diff
  • entities.py
  • issue18958-2.diff
  • testtestpatch: test
  • issue18958-2.diff
  • 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 = 'https://github.com/ezio-melotti'
    closed_at = None
    created_at = <Date 2008-05-05.16:40:44.378>
    labels = ['easy', 'type-bug', 'tests', '3.11']
    title = 'Test issue'
    updated_at = <Date 2022-04-08.18:14:51.526>
    user = 'https://github.com/gvanrossum'

    bugs.python.org fields:

    activity = <Date 2022-04-08.18:14:51.526>
    actor = 'ezio.melotti'
    assignee = 'ezio.melotti'
    closed = False
    closed_date = None
    closer = None
    components = ['Tests']
    creation = <Date 2008-05-05.16:40:44.378>
    creator = 'gvanrossum'
    dependencies = ['12345', '12346']
    files = ['19097', '21018', '21103', '21659', '21665', '23266', '23322', '23323', '23324', '23325', '23326', '27089', '27301', '35887', '39817', '39819']
    hgrepos = ['1', '2', '148']
    issue_num = 2771
    keywords = ['easy']
    message_count = 145.0
    messages = ['66272', '70327', '82492', '82495', '82496', '83238', '83244', '83245', '83438', '85703', '85704', '85706', '85707', '85709', '85711', '85712', '117840', '123996', '123997', '130141', '130313', '130314', '130315', '130316', '130317', '130318', '130320', '130323', '130325', '130328', '130352', '130353', '130354', '130355', '130356', '130357', '130358', '130359', '130360', '130363', '130364', '130365', '130371', '130708', '130711', '130746', '131876', '131877', '131887', '132862', '143322', '144642', '144643', '144644', '144988', '144989', '144990', '144991', '147556', '147558', '148435', '154050', '158528', '161311', '164482', '164498', '164499', '166660', '169819', '171493', '171496', '171545', '171565', '171566', '171569', '175115', '175117', '175601', '175602', '175604', '175609', '175610', '175611', '175612', '175613', '175614', '175801', '177455', '184606', '185210', '185211', '186162', '186457', '190899', '200373', '210887', '210888', '210899', '216745', '216749', '222481', '226864', '226865', '240911', '244636', '244637', '281623', '282111', '282209', '284785', '284786', '284856', '285373', '286827', '296933', '301677', '303086', '326188', '326189', '326190', '326354', '326503', '326930', '327448', '330748', '330753', '332292', '332369', '335253', '335254', '335258', '335263', '335266', '335267', '335270', '338799', '338800', '344722', '344723', '352015', '394297', '394298', '394456', '405354', '416999']
    nosy_count = 7.0
    nosy_names = ['pitrou', 'nedbat', 'ezio.melotti', 'python-dev', 'zach.ware', 'matrixise', 'EWDurbin']
    pr_nums = ['46', '56', '55', '59', '60', '61', '62', '63', '70', '107', '18614']
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'open'
    superseder = '2771'
    type = 'behavior'
    url = 'https://bugs.python.org/issue2771'
    versions = ['Python 3.11']

    @gvanrossum
    Copy link
    Member Author

    This is a very long line. I am wondering how it will be wrapped. What
    will happen to this exceedingly long line? Will it be wrapped? Will it?
    Really? What will happen?

    Here's an example:

      def fact(n):
        if n > 1:
          return n * fact(n-1)
        else:
          assert n in (0, 1)
          return 1

    What do you think of that?

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jul 27, 2008

    Testing authorage

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Feb 19, 2009

    Does this still work?

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Feb 19, 2009

    More testing.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Feb 19, 2009

    Testing 1..2..3

    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Mar 6, 2009

    Reviewers: ,

    Description:
    "This is a very long line. I am wondering how it will be wrapped. What
    will happen to this exceedingly long line? Will it be wrapped? Will it?
    Really? What will happen?

    Here's an example:

       def fact(n):
         if n > 1:
           return n * fact(n-1)
         else:
           assert n in (0, 1)
           return 1

    What do you think of that?"

    Please review this at http://codereview.appspot.com/24075

    Affected files:
    M static/upload.py

    Index: static/upload.py
    ===================================================================
    --- static/upload.py (revision 402)
    +++ static/upload.py (working copy)
    @@ -61,7 +61,30 @@
    # Max size of patch or base file.
    MAX_UPLOAD_SIZE = 900 * 1024

    +#python static/upload.py -R 2771 -F msg66272 --send_mail
    +fields = {'issue':'title', 'msg':'content', 'file':'description', }
    +def fetch_item(nodeid, kind='issue', tracker='http://bugs.python.org'):
    + query_tpl = [('@action', 'export_csv'), ('@filter', 'id'),
    + ('id', nodeid), ('@columns', fields[kind])]
    + item_url = '/%s?%s' % (kind, urllib.urlencode(query_tpl))
    + content = urllib.urlopen(tracker + item_url).read().split('\r\n')
    + if content[0] == 'title':
    + return '[issue%s] %s' % (nodeid, content[1].strip())
    + elif content[0] == 'content' or content[0] == 'description':
    + return content[1].strip()

    +def fetch(nodeid, debug=True):
    + kind = 'issue'
    + if nodeid.startswith('msg'):
    + kind = 'msg'
    + elif nodeid.startswith('file'):
    + kind = 'file'
    + nodeid = nodeid.replace(kind, '')
    + result = fetch_item(int(nodeid), kind)
    + if debug:
    + logging.info('Fetched "%s: %s"' % (kind, result))
    + return result
    +
    def GetEmail(prompt):
    """Prompts the user for their email address and returns it.

    @@ -453,6 +476,14 @@
      group.add_option("--send_mail", action="store_true",
                       dest="send_mail", default=False,
                       help="Send notification email to reviewers.")
    +# Link options
    +group = parser.add_option_group("Link options")
    +group.add_option("-R", "--roundup", action="store", dest="roundup",
    +                 metavar="ROUNDUP", default=None,
    +                 help="Python tracker issue number to link with.")
    +group.add_option("-F", "--fetch_descr", action="store", dest="fetch_descr",
    +                 metavar="FETCHDESCR", default=None,
    +                 help="Tracker file or message to fetch description from.")
    
      def GetRpcServer(options):
    @@ -1291,7 +1322,10 @@
          prompt = "Message describing this patch set: "
        else:
          prompt = "New issue subject: "
    -  message = options.message or raw_input(prompt).strip()
    +  if options.roundup:
    +    message = fetch(options.roundup)
    +  else:
    +    message = options.message or raw_input(prompt).strip()
        if not message:
          ErrorExit("A non-empty message is required")
        rpc_server = GetRpcServer(options)
    @@ -1307,11 +1341,16 @@
            if "@" in reviewer and not reviewer.split("@")[1].count(".") == 1:
              ErrorExit("Invalid email address: %s" % reviewer)
          form_fields.append(("reviewers", options.reviewers))
    +  tracker_email = 'report@bugs.python.org,'
        if options.cc:
          for cc in options.cc.split(','):
            if "@" in cc and not cc.split("@")[1].count(".") == 1:
              ErrorExit("Invalid email address: %s" % cc)
    -    form_fields.append(("cc", options.cc))
    +    if options.roundup:
    +      cc = tracker_email + options.cc
    +    form_fields.append(("cc", cc))
    +  elif options.roundup:
    +    form_fields.append(("cc", tracker_email[:-1]))
        description = options.description
        if options.description_file:
          if options.description:
    @@ -1319,6 +1358,9 @@
          file = open(options.description_file, 'r')
          description = file.read()
          file.close()
    +  elif options.fetch_descr:
    +    # XXX Add error handling as above
    +    description = fetch(options.fetch_descr)
        if description:
          form_fields.append(("description", description))
        # Send a hash of all the base file so the server can determine if a copy

    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Mar 6, 2009

    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Mar 6, 2009

    Reviewers: ,

    Description:
    From http://bugs.python.org/issue2771

    "This is a very long line. I am wondering how it will be wrapped. What
    will happen to this exceedingly long line? Will it be wrapped? Will it?
    Really? What will happen?

    Here's an example:

       def fact(n):
         if n > 1:
           return n * fact(n-1)
         else:
           assert n in (0, 1)
           return 1

    What do you think of that?"

    Description fetched from: http://bugs.python.org/msg66272

    Please review this at http://codereview.appspot.com/25076

    Affected files:
    M static/upload.py

    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Mar 10, 2009

    Reviewers: ,

    Description:
    From http://bugs.python.org/issue2771

    Testing 1..2..3

    Description fetched from: http://bugs.python.org/msg82496

    Please review this at http://codereview.appspot.com/22062

    Affected files:
    M static/upload.py

    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Apr 7, 2009

    Testing how email handles quotes.

    [mailgw]

    # Keep email citations when accepting messages.
    # Setting this to "no" strips out "quoted" text from the message.
    # Signatures are also stripped.
    # Allowed values: yes, no
    # Default: yes
    keep_quoted_text = yes
    
    # Preserve the email body as is - that is,
    # keep the citations _and_ signatures.
    # Allowed values: yes, no
    # Default: no
    leave_body_unchanged = no

    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Apr 7, 2009

    Dumb whole message quote.

    On Tue, Apr 7, 2009 at 11:51 AM, Daniel Diniz <report@bugs.python.org> wrote:

    Daniel Diniz <ajaksu@gmail.com> added the comment:

    Testing how email handles quotes.

    [mailgw]

    Keep email citations when accepting messages.

    Setting this to "no" strips out "quoted" text from the message.

    Signatures are also stripped.

    Allowed values: yes, no

    Default: yes

    keep_quoted_text = yes

    Preserve the email body as is - that is,

    keep the citations _and_ signatures.

    Allowed values: yes, no

    Default: no

    leave_body_unchanged = no

    ----------


    Python tracker <report@bugs.python.org>
    <http://bugs.python.org/issue2771\>


    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Apr 7, 2009

    Nested quotes.

    On Tue, Apr 7, 2009 at 11:53 AM, Daniel Diniz <report@bugs.python.org> wrote:

    Daniel Diniz <ajaksu@gmail.com> added the comment:

    Dumb whole message quote.

    On Tue, Apr 7, 2009 at 11:51 AM, Daniel Diniz <report@bugs.python.org> wrote:
    >
    > Daniel Diniz <ajaksu@gmail.com> added the comment:
    >
    > Testing how email handles quotes.
    >
    > [mailgw]
    >
    > # Keep email citations when accepting messages.
    > # Setting this to "no" strips out "quoted" text from the message.
    > # Signatures are also stripped.
    > # Allowed values: yes, no
    > # Default: yes
    > keep_quoted_text = yes
    >
    > # Preserve the email body as is - that is,
    > # keep the citations _and_ signatures.
    > # Allowed values: yes, no
    > # Default: no
    > leave_body_unchanged = no
    >
    > ----------
    >
    > _______________________________________
    > Python tracker <report@bugs.python.org>
    > <http://bugs.python.org/issue2771\>
    > _______________________________________
    >

    ----------


    Python tracker <report@bugs.python.org>
    <http://bugs.python.org/issue2771\>


    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Apr 7, 2009

    >> Testing how email handles quotes.
    >>
    >> [mailgw]
    >>
    >> # Keep email citations when accepting messages.
    >> # Setting this to "no" strips out "quoted" text from the message.
    >> # Signatures are also stripped.
    >> # Allowed values: yes, no
    >> # Default: yes
    >> keep_quoted_text = yes
    >>
    >> # Preserve the email body as is - that is,
    >> # keep the citations _and_ signatures.
    >> # Allowed values: yes, no
    >> # Default: no
    >> leave_body_unchanged = no
    >>

    Bottom posting, less hints about quotes.

    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Apr 7, 2009

    The reason I noticed this is that since they compare and hash equal, if
    you put two such methods into a set, you end up with a set with one
    method. Currently, this is preventing me from running two test methods
    because the method itself is defined on a base class and two subclasses
    which customize several other methods inherit it. I can only run one
    test at a time.

    But you acknowledge they are really the same method attached to
    different classes, right? The notion of "unbound method" is mostly an
    implementation detail. The term occurs only 4 times in the whole Python
    documentation (according to Google). And in py3k they are gone. (*)

    Moreover, you say you want them to compare unequal because you
    *explicitly* want the same method called separately for each class it is
    defined on. Is there anything preventing you to have a set of (class,
    method) tuples instead? Because it sounds like the logical thing to do
    in your case.

    Having them compare unequal means you can't actually trust unbound
    method comparison, nor using unbound methods as keys in a dictionary.

    "Trust" is a strong word. You can trust the comparison operator if you
    agree with its semantics, you cannot trust it if you want different
    semantics. But that doesn't mean it is generally trustworthy or
    untrustworthy.

    Really, this is the same as with numbers:

    'b'

    There are probably use cases where the above is annoying. But,
    conversely, there are probably use cases where a stricter behaviour
    would be annoying too.

    This means some other mapping structure is required if you want to keep
    around a bunch of methods and arguments to pass to them.

    I disagree. The general use case of keeping a bunch of callables with
    their respective arguments implies storing bound, not unbound, methods.
    (how often do you feed an unbound method to an addCallback() ?)

    It also means
    that any time you want to check two methods against each other with the
    goal of eventually calling one or both of them, you need to use
    something other than `==´.

    I don't think there are lots of use cases for comparing *unbound*
    methods. One such use case is checking for redefinition of inherited
    methods, and the current __eq__ semantics look fine for that.

    (*)
    Python 3.0b2+ (py3k, Jul 29 2008, 20:37:34)
    [GCC 4.3.1 20080626 (prerelease)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> class A:
    ...  def f(): pass
    ...
    >>> type(A.f)
    <class 'function'>
    >>> a = A()
    >>> type(a.f)
    <class 'method'>
    >>> def g(): pass
    ...
    >>> class B:
    ...  g = g
    ...
    >>> B.g is g
    True

    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Apr 7, 2009

    Having them compare unequal means you can't actually trust unbound
    method comparison, nor using unbound methods as keys in a dictionary.

    "Trust" is a strong word. You can trust the comparison operator if you
    agree with its semantics, you cannot trust it if you want different
    semantics. But that doesn't mean it is generally trustworthy or
    untrustworthy.

    Really, this is the same as with numbers:

    'b'

    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Apr 7, 2009

    Quote

    Unquote

    code snippet:

    'b'

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Oct 1, 2010

    Attach some file

    @ezio-melotti
    Copy link
    Member

    testing autonosy for release managers with release blockers

    @ezio-melotti
    Copy link
    Member

    Works fine. Now release managers will be added automatically to the nosy list when the priority of an issue is set to 'release blocker'.
    See http://psf.upfronthosting.co.za/roundup/meta/issue363

    @zwtestuser zwtestuser mannequin added type-bug An unexpected behavior, bug, or error and removed docs Documentation in the Doc dir 3.8 (EOL) end of life type-feature A feature request or enhancement labels Sep 11, 2019
    @ezio-melotti
    Copy link
    Member

    test comment

    @vstinner
    Copy link
    Member

    test IRC bot

    @vstinner vstinner reopened this May 25, 2021
    @vstinner
    Copy link
    Member

    Close (test IRC bot). Test is successful!

    "09:18 < irker301> vstinner bpo-2771/Test issue: [open] test IRC bot https://bugs.python.org/issue2771" logged on #python-dev-infras

    python/psf-salt#208 (comment)

    @ewdurbin ewdurbin added 3.10 only security fixes and removed 3.9 only security fixes labels May 26, 2021
    @ewdurbin ewdurbin reopened this May 26, 2021
    @ewdurbin ewdurbin added 3.9 only security fixes and removed 3.10 only security fixes labels May 26, 2021
    @ewdurbin
    Copy link
    Member

    Test IRC

    @ewdurbin ewdurbin reopened this May 26, 2021
    @ezio-melotti ezio-melotti added 3.11 only security fixes and removed 3.9 only security fixes labels Oct 25, 2021
    @ezio-melotti
    Copy link
    Member

    Testing GitHub mentions, please ignore: @serhiy-storchaka

    @ezio-melotti
    Copy link
    Member

    So long, and thanks for all the bugs.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @python python locked as resolved and limited conversation to collaborators Apr 11, 2022
    @terryjreedy terryjreedy closed this as not planned Won't fix, can't repro, duplicate, stale Apr 21, 2023
    Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
    Labels
    3.11 only security fixes easy tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests