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

Update pybench for python 3.0 #48954

Closed
mdickinson opened this issue Dec 20, 2008 · 14 comments
Closed

Update pybench for python 3.0 #48954

mdickinson opened this issue Dec 20, 2008 · 14 comments
Labels
release-blocker type-bug An unexpected behavior, bug, or error

Comments

@mdickinson
Copy link
Member

BPO 4704
Nosy @malemburg, @mdickinson, @pitrou
Files
  • pybench3.0.patch
  • pybench3.0-2.patch
  • pybench3.0-3.patch
  • 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 2009-02-07.17:29:54.228>
    created_at = <Date 2008-12-20.10:53:56.261>
    labels = ['type-bug', 'release-blocker']
    title = 'Update pybench for python 3.0'
    updated_at = <Date 2009-02-07.17:29:54.227>
    user = 'https://github.com/mdickinson'

    bugs.python.org fields:

    activity = <Date 2009-02-07.17:29:54.227>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-02-07.17:29:54.228>
    closer = 'pitrou'
    components = ['Demos and Tools']
    creation = <Date 2008-12-20.10:53:56.261>
    creator = 'mark.dickinson'
    dependencies = []
    files = ['12405', '12909', '12956']
    hgrepos = []
    issue_num = 4704
    keywords = ['patch']
    message_count = 14.0
    messages = ['78090', '78094', '78183', '78184', '80844', '80891', '80962', '81284', '81286', '81287', '81311', '81314', '81339', '81340']
    nosy_count = 3.0
    nosy_names = ['lemburg', 'mark.dickinson', 'pitrou']
    pr_nums = []
    priority = 'release blocker'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue4704'
    versions = ['Python 3.0', 'Python 3.1', 'Python 2.7']

    @mdickinson
    Copy link
    Member Author

    pybench needs to be updated for Python 3.0, in particular to remove use of
    cmp. Here's a patch, against the py3k branch.

    Questions (mainly for Marc-André Lemburg):

    1. Should the version number be bumped for *all* tests, or just for those
      that have changed? Assuming all tests.

    2. Presumably these changes should appear in 3.0.1, and should be
      backported to 2.x. Backport this to 2.6.2? Or just 2.7?

    3. Should I update the sample output in the README file? I was going to
      just change the PYBENCH 2.0 line to PYBENCH 3.0, but that seems a little
      bit bogus without updating the rest.

    @mdickinson mdickinson added the type-bug An unexpected behavior, bug, or error label Dec 20, 2008
    @malemburg
    Copy link
    Member

    On 2008-12-20 11:54, Mark Dickinson wrote:

    New submission from Mark Dickinson <dickinsm@gmail.com>:

    pybench needs to be updated for Python 3.0, in particular to remove use of
    cmp. Here's a patch, against the py3k branch.

    Questions (mainly for Marc-André Lemburg):

    1. Should the version number be bumped for *all* tests, or just for those
      that have changed? Assuming all tests.

    Just the tests that have been updated.

    Since there have been a number of small changes, I think it's
    time to also change the pybench version itself to 2.1 (not 3.0;
    that's reserved for more major changes).

    1. Presumably these changes should appear in 3.0.1, and should be
      backported to 2.x. Backport this to 2.6.2? Or just 2.7?

    I don't think they should go into 3.0.1 - they are a new feature
    and not a bug fix.

    I'll leave that decision to the release manager.

    Please backport to 2.7 only.

    1. Should I update the sample output in the README file? I was going to
      just change the PYBENCH 2.0 line to PYBENCH 3.0, but that seems a little
      bit bogus without updating the rest.

    Please run the suite and add the complete new output.

    Thanks,

    Marc-Andre Lemburg
    eGenix.com


    2008-12-02: Released mxODBC.Connect 1.0.0 http://python.egenix.com/

    ::: Try our new mxODBC.Connect Python Database Interface for free ! ::::

    eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
    Registered at Amtsgericht Duesseldorf: HRB 46611
    http://www.egenix.com/company/contact/

    @mdickinson
    Copy link
    Member Author

    Thanks for the responses!

    I don't think should go into 3.0.1 - they are a new feature
    and not a bug fix.

    But if these changes don't go into 3.0.1, and the removal of cmp does,
    that means that pybench won't run on 3.0.1. It seems to me that we could
    make a strong case for this being a bugfix...

    @malemburg
    Copy link
    Member

    On 2008-12-22 15:07, Mark Dickinson wrote:

    Mark Dickinson <dickinsm@gmail.com> added the comment:

    Thanks for the responses!

    > I don't think should go into 3.0.1 - they are a new feature
    > and not a bug fix.

    But if these changes don't go into 3.0.1, and the removal of cmp does,
    that means that pybench won't run on 3.0.1. It seems to me that we could
    make a strong case for this being a bugfix...

    ... or a good case for not removing cmp() from 3.0.1 :-)

    I have a feeling that people are mixing up the reasons for removal
    of the __cmp__ slot and the utility of the cmp() builtin. Those
    two should be treated as separate issues, IMHO.

    Anyway, like I said: the release manager should decide.

    @pitrou
    Copy link
    Member

    pitrou commented Jan 31, 2009

    Since cmp is slated for removal, this should also be done for 3.0.1.

    @pitrou
    Copy link
    Member

    pitrou commented Jan 31, 2009

    The patch changes results a lot compared to the previous version
    (BuiltinFunctionCalls is 3x slower). I propose the following patch,
    which gives roughly the same runtimes as before (I use divmod() and
    max() rather than complex() and pow()).

    @malemburg
    Copy link
    Member

    On 2009-02-01 00:39, Antoine Pitrou wrote:

    Antoine Pitrou <pitrou@free.fr> added the comment:

    The patch changes results a lot compared to the previous version
    (BuiltinFunctionCalls is 3x slower). I propose the following patch,
    which gives roughly the same runtimes as before (I use divmod() and
    max() rather than complex() and pow()).

    Even better.

    However, please see my comments on the ticket:

    • the version numbers of unaffected tests do not need to be
      changed

    • the major pybench version number also doesn't need to be
      bumped to 3.0, a minor revision (2.1) is good enough

    Thanks,

    Marc-Andre Lemburg
    eGenix.com


    ::: Try our new mxODBC.Connect Python Database Interface for free ! ::::

    eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
    Registered at Amtsgericht Duesseldorf: HRB 46611
    http://www.egenix.com/company/contact/

    @pitrou
    Copy link
    Member

    pitrou commented Feb 6, 2009

    Updated patch.

    @malemburg
    Copy link
    Member

    Perfect ! Thanks, Antoine. Please check it in.

    On 2009-02-06 18:19, Antoine Pitrou wrote:

    Antoine Pitrou <pitrou@free.fr> added the comment:

    Updated patch.

    Added file: http://bugs.python.org/file12956/pybench3.0-3.patch


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



    Python-bugs-list mailing list
    Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/mal%40egenix.com

    @malemburg
    Copy link
    Member

    On 2009-02-06 18:35, Marc-Andre Lemburg wrote:

    Marc-Andre Lemburg <mal@egenix.com> added the comment:

    Perfect ! Thanks, Antoine. Please check it in.

    Well, except for this part that sneaked in:

    @@ -4,8 +4,6 @@

    """

    -# Note: Please keep this module compatible to Python 1.5.2.
    -#
    # Tests may include features in later Python versions, but these
    # should then be embedded in try-except clauses in the configuration
    # module Setup.py.

    It's ok to bump this to Python 2.3, though :-)

    @pitrou
    Copy link
    Member

    pitrou commented Feb 6, 2009

    It's ok to bump this to Python 2.3, though :-)

    The current version only works with 3.x, due to the use of the print
    function with the "end" keyword argument.
    Should it be fixed?

    Regards

    Antoine.

    @malemburg
    Copy link
    Member

    On 2009-02-06 23:25, Antoine Pitrou wrote:

    Antoine Pitrou <pitrou@free.fr> added the comment:

    > It's ok to bump this to Python 2.3, though :-)

    The current version only works with 3.x, due to the use of the print
    function with the "end" keyword argument.
    Should it be fixed?

    If possible, pybench should work unchanged in both Python 2.x and 3.x.

    If the only change needed for this is a new print function, then
    it's better to replace all print function calls with a new
    helper function:

    def print3(*args, end='\r'):
        sys.stdout.write(' '.join(*args))
        sys.stdout.write(end)
        sys.stdout.flush()

    (untested, but the idea should be clear)

    @pitrou
    Copy link
    Member

    pitrou commented Feb 7, 2009

    If possible, pybench should work unchanged in both Python 2.x and 3.x.

    Ok, the best I can do is to make it 2.6-compatible. For versions before
    2.6, stuff like "except Exception as e" does not make compatibility
    reasonably achievable.

    @pitrou
    Copy link
    Member

    pitrou commented Feb 7, 2009

    Committed in r69411, r69412.

    @pitrou pitrou closed this as completed Feb 7, 2009
    @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
    release-blocker type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants