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

Fix #408: Response.age is semantically a timedelta, not a datetime #414

Closed
wants to merge 1 commit into from
Closed

Conversation

cvrebert
Copy link
Contributor

First time I've tried to contribute to Werkzeug; criticism is welcome.
Fixes #408.

# but disregarding fractional seconds
age = age.seconds + (age.days * 24 * 3600)

age = int(age)

This comment was marked as off-topic.

@cvrebert
Copy link
Contributor Author

Ping. Is there anything besides potentially the naming that's holding this back?

@k-nut
Copy link

k-nut commented Jan 25, 2014

Have a look at issue #480. @mitsuhiko seems to be quite busy so there is not much merging going on right now. I find it sad though since this prevents good features and even relatively important bug fixes to find their way into the project...

@untitaker untitaker force-pushed the master branch 2 times, most recently from 8377106 to 1842d71 Compare August 31, 2014 00:23
@untitaker
Copy link
Contributor

Not sure of the implications of this. I think it'd be enormouse API breakage to just include this into 0.10.

@cvrebert
Copy link
Contributor Author

The current behavior is already very broken; the Age header in the HTTP response has a completely invalid value!

@untitaker
Copy link
Contributor

FWIW, I've decided to delay this to 1.0, because we can cleanly break the API in that release. The patch itself seems to be fine and can be applied as-is.

@untitaker untitaker added this to the 1.0 milestone Jan 28, 2015
@untitaker untitaker added the bug label Jan 28, 2015
@davidism
Copy link
Member

@untitaker can we re-schedule this to 0.13 since it's been 2 years since 1.0 was added? I think this is ok for a feature release.

@untitaker
Copy link
Contributor

untitaker commented Apr 12, 2017 via email

@davidism
Copy link
Member

davidism commented Apr 12, 2017

Ah, I didn't know we were following semver, I just figured we were ok making bigger changes in second-number releases.

@davidism davidism modified the milestones: 0.13, 1.0 Apr 12, 2017
@untitaker
Copy link
Contributor

untitaker commented Apr 12, 2017 via email

@davidism
Copy link
Member

davidism commented Apr 12, 2017

#1104 rebases this against master so that it can be cleanly merged.

@davidism davidism closed this Apr 12, 2017
davidism added a commit that referenced this pull request Apr 13, 2017
Continue #414: Fix #408: Response.age is semantically a timedelta, not a datetime
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
@cvrebert cvrebert deleted the age-fix branch September 27, 2023 05:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Response.age mishandled as datetime instead of int (or timedelta)
4 participants