Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 674
    • Issues 674
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPy
  • pypypypy
  • Merge requests
  • !465

Make all tests pass for the time module.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Bitbucket Importer requested to merge bitbucket/merged-pr-465 into branch/py3k Jul 23, 2016
  • Overview 1
  • Commits 1
  • Changes 1

Created originally on Bitbucket by marky1991 (Mark Young)

Was already merged in Bitbucket before import, marked as merged by the import user

lib-python/test_time.py still fails test_mktime_error when run untranslated, but this test is skipped when run translated anyway. (Should it be skipped when run untranslated or is the skipping when translated the wrong behavior?) (or should the failure when untranslated be ignored?)

The main issue was that getmmarg was unconditionally subtracting 1900 from its year value. (it does this to make the result of _asctime's year field be an offset from 1900. (as if you pass no tuple at all, it uses localtime, whose year is an offset from 1900.) In cpython, this scheme works because if the year is within 1900 of the minimum negative number, the year rolls over to a huge positive number, which the asctime function then adds 1900 to the year, making it again an absolute date. In pypy, this fails because our integers do not roll over, leaving us with just a really large year.

My solution is to instead make getmmarg return an absolute year, adding 1900 to the result of localtime if no tuple is passed.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: bitbucket/merged-pr-465