GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-118469: Add documentation for sqlite3 PEP-249 constructors by dave-r12 · Pull Request #122091 · python/cpython

Conversation

@dave-r12

@dave-r12 dave-r12 commented Jul 21, 2024 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
  • Issue: No documentation for sqlite3.Binary #118469

📚 Documentation preview 📚: https://cpython-previews--122091.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dave-r12
dave-r12 requested review from berkerpeksag and erlend-aasland as code owners July 21, 2024 14:57
@ghost

ghost commented Jul 21, 2024 •
edited by ghost
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot mentioned this pull request Jul 21, 2024
No documentation for sqlite3.Binary #118469
Open
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news awaiting review labels Jul 21, 2024
@dave-r12
dave-r12 force-pushed the sqlite-3-docs branch from e43b91b to 53c9289 Compare July 21, 2024 15:03
@dave-r12

dave-r12 commented Jul 21, 2024

Copy link
Copy Markdown
Author

Hi, I was looking at #118469. The original PR hasn't been updated for awhile, so incorporated the feedback on that PR here.

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dave-r12
dave-r12 force-pushed the sqlite-3-docs branch from 53c9289 to d1337e5 Compare July 21, 2024 17:45
@erlend-aasland erlend-aasland mentioned this pull request Jul 27, 2024
gh-118469: Document sqlite3 PEP-249 constructors #118975
Closed
@erlend-aasland erlend-aasland self-assigned this Jul 27, 2024
@erlend-aasland

erlend-aasland commented Jul 27, 2024

Copy link
Copy Markdown
Contributor

Hi, I was looking at #118469. The original PR hasn't been updated for awhile, so incorporated the feedback on that PR here.

Ok, so let's add a Co-authered-by: Firat <[email protected]> trailer to the commit.

dave-r12 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dave-r12
pythongh-118469: Add documentation for sqlite3 PEP-249 constructors
d64fe19
Co-authered-by: Firat <[email protected]>
@dave-r12
dave-r12 force-pushed the sqlite-3-docs branch from d1337e5 to d64fe19 Compare July 27, 2024 14:36
picnixz
picnixz reviewed Jul 27, 2024
View reviewed changes
Comment thread Doc/library/sqlite3.rst
.. function:: DateFromTicks(ticks)

This function constructs an object holding a date value from the given ticks
value (number of seconds since the epoch; see the documentation of the

@picnixz picnixz Jul 27, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it's the UNIX epoch and not Gregorian epoch? Can it be a fractional number of seconds or not?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dave-r12 dave-r12 Jul 27, 2024

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it's the UNIX epoch and not Gregorian epoch?

Yeah the UNIX epoch.

Can it be a fractional number of seconds or not?

This was taken from PEP-249. Should we get clarification there?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@picnixz picnixz Jul 27, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was not considered at that time. In general, we don't change PEPs (unless there is a real issue with the PEP I think, but I am not aware of a precedent). Best is to ask @erlend-aasland: should we leave it imprecise, or is there some assumptions that I'm not aware of?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/sqlite3.rst

This function constructs an object holding a time value.

.. function:: Timestamp(year, month, day, hour, minute, second)

@picnixz picnixz Jul 27, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the second allowed to be fractional or not? (same question for Time())

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dave-r12 dave-r12 Jul 27, 2024

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my tests, Doing something like this fails:

sqlite3.Time(12, 30, 45.12)

But this succeeds:

sqlite3.Time(12, 30, 45, 12)

However, it is not mentioned in PEP-249. How should we handle that?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@picnixz picnixz Jul 27, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. I think should definitely be documented and the signature of Time should be something like Time(h, m, s[, ms]) (check the syntax in the time module, I don't remember now).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dave-r12 dave-r12 Jul 27, 2024

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. Re-reading the issue, I believe the intention was to document these constructors per PEP-249. I'm not sure if this is more an implementation detail. Will wait for @erlend-aasland guidance.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dave-r12

dave-r12 commented Jul 27, 2024

Copy link
Copy Markdown
Author

Thanks @erlend-aasland . I added the co-author-by trailer to the commit.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Apr 17, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@picnixz picnixz picnixz left review comments
@berkerpeksag berkerpeksag Awaiting requested review from berkerpeksag
@erlend-aasland erlend-aasland Awaiting requested review from erlend-aasland erlend-aasland is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@erlend-aasland erlend-aasland

Labels

awaiting review docs Documentation in the Doc dir skip news stale Stale PR or inactive for long period of time.

Projects

Docs PRs
Status: Todo

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@dave-r12 @erlend-aasland @picnixz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.