Alexander Belopolsky added the comment:
Can someone try to replicate this while disabling the C acceleration:
import sys
sys.modules[‘_datetime’] = None
(Before any other imports.)
If anything, this is likely to be a problem with the C implementation
Alexander Belopolsky added the comment:
I'll reopen this issue to resume the discussion. The motivating case - PEP
3121 refactoring of the ctypes module - is still open. See bpo-15884.
--
resolution: rejected ->
stage: resolved -> patch review
status: closed -> open
Alexander Belopolsky added the comment:
> The work is now tracked at bpo-1635741.
Which work? bpo-1635741 does not appear to be a meta-issue and in msg381432 it
loops back here.
--
versions: +Python 3.11 -Python 3.4
___
Python tracker
<
Alexander Belopolsky added the comment:
> In telemetry,
a nanosecond often translates to about a foot and 5 hours gets you to Pluto.
Telemetry is exactly an application where absolute timestamps rarely make any
sense.
--
___
Python trac
Alexander Belopolsky added the comment:
Is there high enough demand for nanoseconds in datetime and time instances?
How often nanosecond timestamps contain anything other than 0s or garbage in
the last three digits?
In my experience, all people want to do with such timestamps is to convert
Alexander Belopolsky added the comment:
@pganssle - let's keep the substantive discussions in the tracker so that they
are not lost on github. You wrote:
"""
what is still blocking / needs to be done on this? Beta freeze for Python 3.10
is coming up at the beginning of May
Change by Alexander Belopolsky :
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Alexander Belopolsky added the comment:
I agree that having some of datetime.now([tz]) functionality replicated in
datetime.today() makes little sense. However, the presence of this method in
datetime class is a consequence of datetime being a subclass of the date class.
The latter
Change by Alexander Belopolsky :
--
resolution: wont fix -> duplicate
___
Python tracker
<https://bugs.python.org/issue39970>
___
___
Python-bugs-list mai
Alexander Belopolsky added the comment:
This is a duplicate of issue 33293.
--
superseder: -> Using datetime.datetime.utcnow().timestamp() in Python3.6.0
can't get correct UTC timestamp.
___
Python tracker
<https://bugs.python.org/issu
Alexander Belopolsky added the comment:
I am sure this has been reported before – I will try to find the relevant
issue. This behavior is correct and documented. The only improvement that we
can consider is to make it more explicit that utcnow is deprecated and the
correct way to obtain
Alexander Belopolsky added the comment:
> On Mar 2, 2020, at 6:33 PM, Gregory P. Smith wrote:
>
> Change that default to any old year with a leap year (1904?)
In the 21st century, the year 2000 default makes much more sense than 1900.
Luckily 2000 is also a
New submission from Alexander Belopolsky :
Let g be a an invalid time in New York spring-forward gap:
>>> g = datetime(2020, 3, 8, 2, 30)
According to PEP 495, conversion of such instance to UTC should return a value
that corresponds to a valid local time greater than g, but
Change by Alexander Belopolsky :
--
dependencies: +Add timezone support to datetime C API
___
Python tracker
<https://bugs.python.org/issue30155>
___
___
Pytho
Alexander Belopolsky added the comment:
How about replacing "formerly known as Greenwich Mean Time, or GMT" with "which
superseded Greenwich Mean Time or GMT as the basis of international
timekeeping"?
I don't think Python reference manual is the right place to exp
Alexander Belopolsky added the comment:
New changeset 89427cd0feae25bbc8693abdccfa6a8c81a2689c by Alexander Belopolsky
(Paul Ganssle) in branch 'master':
bpo-32417: Make timedelta arithmetic respect subclasses (#10902)
https://github.com/python/cpython/commit
Alexander Belopolsky added the comment:
New changeset 89427cd0feae25bbc8693abdccfa6a8c81a2689c by Alexander Belopolsky
(Paul Ganssle) in branch 'master':
bpo-32417: Make timedelta arithmetic respect subclasses (#10902)
https://github.com/python/cpython/commit
Alexander Belopolsky added the comment:
Here is an implementation that I've used for years. It is somewhat shorter than
the one in PR 11583:
class CycleError(LogicalError, ValueError):
"""dependencies cycle detected
"""
def tsort(pairs):
"&qu
Change by Alexander Belopolsky :
--
resolution: -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder: -> datetime.py implementation of .replace inconsistent with C
implementation
___
Python tra
Alexander Belopolsky added the comment:
> On Dec 4, 2018, at 10:27 AM, Şahin wrote:
>
> Is there anything similar to this for "public API functions"?
Yes - read the reference manual. If the function is not there it is not public.
--
___
Alexander Belopolsky added the comment:
I submitted Gaurav's patch as PR 10870. Please review.
--
___
Python tracker
<https://bugs.python.org/issue9
Change by Alexander Belopolsky :
--
pull_requests: +10105
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issue9004>
___
___
Py
Change by Alexander Belopolsky :
--
superseder: -> %Z in strptime doesn't match EST and others
___
Python tracker
<https://bugs.python.org/issue33940>
___
_
Change by Alexander Belopolsky :
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Alexander Belopolsky added the comment:
Since the Python datetime only supports dates within 0001-01-01 through
-12-31 range, it is not clear how we can meaningfully support the AD/BC era
designation.
Looking at man strftime page on my Mac, I see that they use every upper an
lower case
Alexander Belopolsky added the comment:
I think strptime should only accept %Z when it comes together with %z and not
do any validation.
This is close to the current behavior. %Z by itself is useless because even
when it is accepted, the value is discarded:
>>> print(datetime
Alexander Belopolsky added the comment:
It looks like this issue has been fixed by GH-9288. Can this be closed?
Should we backport?
--
___
Python tracker
<https://bugs.python.org/issue34
Alexander Belopolsky added the comment:
New changeset 92878829c31ab2fc71c60555ce87a5f6cbc876f0 by Alexander Belopolsky
(Christophe Nanteuil) in branch 'master':
bpo-34158: Documentation UTC offset update (GH-8377)
https://github.com/python/cpython/commit
Change by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<https://bugs.python.org/issue30140>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
New changeset 6ea8a3a0ebf840ca57b6dba9cad26fbb0ddaa5d4 by Alexander Belopolsky
(Ammar Askar) in branch '3.6':
[3.6] bpo-29097: Forego fold detection on windows for low timestamp values
(GH-2385) (GH-8498)
https://github.com/python/cpython/commit
Alexander Belopolsky added the comment:
New changeset 973649342cee3869409f341ff0f0e3d2b1547c2a by Alexander Belopolsky
(Miss Islington (bot)) in branch '3.7':
bpo-29097: Forego fold detection on windows for low timestamp values (GH-2385)
(GH-8466)
https://github.com/python/cpython/commit
Alexander Belopolsky added the comment:
New changeset 96d1e69a12ed8ab80203277e1abdaf573457a964 by Alexander Belopolsky
(Ammar Askar) in branch 'master':
bpo-29097: Forego fold detection on windows for low timestamp values (GH-2385)
https://github.com/python/cpython/commit
Change by Alexander Belopolsky :
--
assignee: -> belopolsky
___
Python tracker
<https://bugs.python.org/issue32780>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
Unfortunately, the PEP authors did very little in terms of implementing the PEP
and neither CPython nor numpy has a fully compliant implementation.
--
nosy: +aerojockey, teoliphant
___
Python tracker
<ht
Change by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<https://bugs.python.org/issue34008>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alexander Belopolsky :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Alexander Belopolsky added the comment:
New changeset a8bb18bbb9c286cfac5a0b8c8679c440e5c49305 by Alexander Belopolsky
(Miss Islington (bot)) in branch '3.7':
bpo-30516: Fix documentation issue with -timedelta in datetime (GH-7348)
(GH-8093)
https://github.com/python/cpython/commit
Alexander Belopolsky added the comment:
New changeset 55f39bdabc91b387c18451c78ee077e6d05d6cfe by Alexander Belopolsky
(Miss Islington (bot)) in branch '3.6':
bpo-30516: Fix documentation issue with -timedelta in datetime (GH-7348)
(GH-8092)
https://github.com/python/cpython/commit
Alexander Belopolsky added the comment:
New changeset 5b6e49a1393b3e2313471696e3568e26296137b4 by Alexander Belopolsky
(Farhaan Bukhsh) in branch 'master':
bpo-30516: Fix documentation issue with -timedelta in datetime (GH-7348)
https://github.com/python/cpython/commit
Change by Alexander Belopolsky :
--
resolution: -> duplicate
superseder: -> Tracing disabled when a recursion error is triggered (even if
properly handled)
___
Python tracker
<https://bugs.python.org/i
Change by Alexander Belopolsky :
--
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue33849>
___
___
Alexander Belopolsky added the comment:
It looks like this has been known for quite some time. See issue10933.
--
___
Python tracker
<https://bugs.python.org/issue33
New submission from Alexander Belopolsky :
Consider the following code:
import sys
def trace(frame, event, arg):
pass
def f():
f()
sys.settrace(trace)
print(sys.gettrace())
try:
f()
except RuntimeError:
pass
print(sys.gettrace())
When I run it, I get
None
Apparently
Change by Alexander Belopolsky :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Alexander Belopolsky added the comment:
New changeset 1d4089b5d208ae6f0bd256304fd77f04c0b4fd41 by Alexander Belopolsky
(Miss Islington (bot)) in branch '3.6':
bpo-33812: Corrected astimezone for naive datetimes. (GH-7578) (GH-7601)
https://github.com/python/cpython/commit
Alexander Belopolsky added the comment:
New changeset 037e9125527d4a55af566f161c96a61b3c3fd998 by Alexander Belopolsky
(Miss Islington (bot)) in branch '3.7':
bpo-33812: Corrected astimezone for naive datetimes. (GH-7578) (GH-7600)
https://github.com/python/cpython/commit
Alexander Belopolsky added the comment:
New changeset 877b23202b7e7d4f57b58504fd0eb886e8c0b377 by Alexander Belopolsky
in branch 'master':
bpo-33812: Corrected astimezone for naive datetimes. (GH-7578)
https://github.com/python/cpython/commit/877b23202b7e7d4f57b58504fd0eb886e8c0b377
Change by Alexander Belopolsky :
--
stage: patch review -> commit review
versions: +Python 3.6
___
Python tracker
<https://bugs.python.org/issue33812>
___
_
Alexander Belopolsky added the comment:
Tim, given that I've updated the documentation, should we treat this as a bug
fix or a feature? Note that the type check is definitely a bug-fix (if not a
security issue), but I clearly had a wrong definition of "naive" in mind when I
was
Change by Alexander Belopolsky :
--
keywords: +patch
pull_requests: +7202
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Alexander Belopolsky :
--
assignee: -> belopolsky
components: +Extension Modules, Library (Lib)
stage: -> needs patch
type: -> behavior
versions: +Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.or
Alexander Belopolsky added the comment:
So you are suggesting that my datetime(2000,1,1,tzinfo=TZ()) should behave as a
naive instance, right? Well, this would be a third behavior different from
both current C and Python implementations:
>>> print(datetime(2000,1,1).astimezone(tim
New submission from Alexander Belopolsky :
Consider the following code:
$ cat bug.py
import sys
if len(sys.argv) > 1:
sys.modules['_datetime'] = None
from datetime import tzinfo, datetime, timezone
class TZ(tzinfo):
def utcoffset(self, t):
pass
print(datetime(2000,1,1,tzi
Change by Alexander Belopolsky :
--
nosy: belopolsky
priority: normal
severity: normal
status: open
title: Different behavior betwee
___
Python tracker
<https://bugs.python.org/issue33
Change by Alexander Belopolsky :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Alexander Belopolsky added the comment:
New changeset bcb032e4acdebc043a7659a06e6037fe71020860 by Alexander Belopolsky
in branch 'master':
bpo-33810 Remove unused code from datetime.py. (GH-7549)
https://github.com/python/cpython/commit/bcb032e4acdebc043a7659a06e6037fe71020860
Alexander Belopolsky added the comment:
New changeset bcb032e4acdebc043a7659a06e6037fe71020860 by Alexander Belopolsky
in branch 'master':
bpo-33810 Remove unused code from datetime.py. (GH-7549)
https://github.com/python/cpython/commit/bcb032e4acdebc043a7659a06e6037fe71020860
Change by Alexander Belopolsky :
--
pull_requests: +7183
___
Python tracker
<https://bugs.python.org/issue25283>
___
___
Python-bugs-list mailing list
Unsub
Change by Alexander Belopolsky :
--
keywords: +patch
pull_requests: +7182
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Alexander Belopolsky :
--
components: -Extension Modules
___
Python tracker
<https://bugs.python.org/issue33810>
___
___
Python-bugs-list mailin
New submission from Alexander Belopolsky :
Since implementation of issue 25283, the objects returned by time.localtime
always have tm_zone and tm_gmtoff attributes, but the datetime module still has
code that anticipates these attributes to be missing. [1]
[1]:
https://github.com/python
Alexander Belopolsky added the comment:
Paul,
In your opening post to this issue you suggested to change one line [1] in
Lib/datetime.py from
dtdst = dt.dst()
to
dtdst = dt.replace(fold=1).dst()
This looks like a rather innocuous change, but it does not by itself make
fromutc() return
Alexander Belopolsky added the comment:
> it's actually possible to implement full `fold` support in a generic way
I am aware of that. In fact, some of the draft versions of PEP 495
implementation did contain such code. The problem is that any such
tz.fromutc() implementation wo
Change by Alexander Belopolsky :
--
stage: -> needs patch
versions: -Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue28602>
___
_
Change by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<https://bugs.python.org/issue33701>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<https://bugs.python.org/issue33649>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
Well, even in non-POSIX mode timegm and gmtime are the inverse of one another
in BSD. The problem that you see stems from the fact that time.gmtime is
implemented as a call to the namesake C function
Change by Alexander Belopolsky <alexander.belopol...@gmail.com>:
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<https://bu
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
New changeset 89a25ce4fdb9c2a1a59d8cbfc498a2614b98e9ae by Alexander Belopolsky
(Mario Corchero) in branch 'master':
bpo-33541: Remove unused __pad function (GH-4377)
https://github.com/python/cpython/
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
I was able to reproduce this issue on Linux as follows
>>> import time, calendar, os
>>> os.environ['TZ'] = 'right/UTC' # "right" timezones account for leap seconds
>>> t
Change by Alexander Belopolsky <alexander.belopol...@gmail.com>:
--
nosy: +belopolsky
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
This issue has been superseded by #25928.
--
resolution: rejected -> duplicate
stage: patch review -> resolved
superseder: -> Add Decimal.as_integer_ratio()
___
Change by Alexander Belopolsky <alexander.belopol...@gmail.com>:
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<https://bu
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
New changeset 0e06be836ca0d578cf9fc0c68979eb682c00f89c by Alexander Belopolsky
(Miss Islington (bot)) in branch '3.7':
Add What's new entry for datetime.fromisoformat (GH-5559) (GH-5939)
https://github.com/python/c
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
New changeset fff596f792a0752b0e571fa57809e5752aba6353 by Alexander Belopolsky
(Miss Islington (bot)) in branch '3.7':
bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814)
(gh-5929)
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
New changeset fff596f792a0752b0e571fa57809e5752aba6353 by Alexander Belopolsky
(Miss Islington (bot)) in branch '3.7':
bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814)
(gh-5929)
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
New changeset 5bd04f964b4f1bcdbd0fa36de04f087c2db07cfe by Alexander Belopolsky
(Paul Ganssle) in branch 'master':
bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814)
https://github.com/
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
New changeset 5bd04f964b4f1bcdbd0fa36de04f087c2db07cfe by Alexander Belopolsky
(Paul Ganssle) in branch 'master':
bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814)
https://github.com/
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
New changeset 22864bc8e4a076bbac748ccda6c27f1ec41b53e7 by Alexander Belopolsky
(Paul Ganssle) in branch 'master':
Add What's new entry for datetime.fromisoformat (#5559)
https://github.com/python/cpython/
Change by Alexander Belopolsky <alexander.belopol...@gmail.com>:
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<https://bu
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
New changeset 04af5b1ba9eb546a29735fac6cb5298159069b53 by Alexander Belopolsky
(Paul Ganssle) in branch 'master':
bpo-10381: Add timezone to datetime C API (#5032)
https://github.com/python/cpython/
Change by Alexander Belopolsky <alexander.belopol...@gmail.com>:
--
nosy: +vstinner
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
There is an uncommitted update for the EXTENDED_ARG opcode documentation
attached to issue 27095 as mkfu4.patch by Demur Rumed.
--
nosy: +Demur Rumed
___
Python tracke
New submission from Alexander Belopolsky <alexander.belopol...@gmail.com>:
A switch to wordcode is implemented in Python 3.6, but the documentation in the
dis module was mostly left unchanged. See issue 26647, msg266388 and issue
27095, msg268389.
--
assignee: docs@python
comp
Change by Alexander Belopolsky <alexander.belopol...@gmail.com>:
--
components: +Interpreter Core -Documentation
stage: needs patch -> resolved
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
Change by Alexander Belopolsky <alexander.belopol...@gmail.com>:
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<https://bugs.
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
New changeset 9f1b7b93f5f0ef589e7b272e127cacf4ce5d23f1 by Alexander Belopolsky
(Paul Ganssle) in branch 'master':
bpo-32403: Faster date and datetime constructors (#4993)
https://github.com/python/cpython/
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
New changeset 9f1b7b93f5f0ef589e7b272e127cacf4ce5d23f1 by Alexander Belopolsky
(Paul Ganssle) in branch 'master':
bpo-32403: Faster date and datetime constructors (#4993)
https://github.com/python/cpython/
Change by Alexander Belopolsky <alexander.belopol...@gmail.com>:
--
assignee: belopolsky ->
___
Python tracker <rep...@bugs.python.org>
<https://bugs.py
Change by Alexander Belopolsky <alexander.belopol...@gmail.com>:
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<https://bu
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
> (And, honestly, `dateutil` would provide a version-independent backport
> anyway).
Why not start with that? Remember: python standard library is where code goes
to die. By implementing this feature in
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
I am about +0 on adding a keyword argument to datetime.now. Note that as I
wrote in issue 19475 (msg202242), "precision" may be a misleading name because
python makes no guarantee about the precision
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
> replacing all elements of a datetime below a certain level is a very common
> idiom
This can be accomplished rather efficiently by truncating a time tuple:
>>> t = datetime.now()
>>&
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
> I think that a "truncate to rrule" function is *way* beyond the scope of the
> standard library
I agree and I did not propose that. What I said was that in the process of
implementing truncate to
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
The problem that I have with the round/truncate proposal is that it is not
general enough. Days, hours, minutes etc. are just arbitrary intervals that
became popular for obscure historical and astronomical r
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
In my experience, when dealing with temporal data truncation (rounding towards
-infinity) is more useful than any other form of rounding. See also issue 19475.
--
___
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
Maybe __round__ can be generalized to take a timedelta instead of ndigits?
For some related prior art, take a look at
<http://code.kx.com/q/ref/arith-inte
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
New changeset 09dc2f508c8513e0466a759cc27a09108c1e55c2 by Alexander Belopolsky
(Paul Ganssle) in branch 'master':
bpo-15873: Implement [date][time].fromisoformat (#4699)
https://github.com/python/cpython/
Change by Alexander Belopolsky <alexander.belopol...@gmail.com>:
--
nosy: +p-ganssle
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
+1 on what Paul said.
Mathieu, the goal for 3.7 will be to get Paul's PR merged. It will be great if
you could help in reviewing it. We can return to the features in your PR
during the 3.8 development
1 - 100 of 3537 matches
Mail list logo