Alexander Belopolsky added the comment:
Committed in r81981. I'll open a separate documentation issue to update
Doc/includes/tzinfo-examples.py and improve TZ related documentation.
--
stage: patch review -> committed/rejected
status: open -> closed
title: datetime lac
Alexander Belopolsky added the comment:
With issue5094 patch now committed, I am replacing issue6641.diff with a new
version that does not include issue5094.
--
title: strptime doesn't support %z format ? -> datetime.strptime doesn't
support %z format ?
Add
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17590/issue6641.diff
___
Python tracker
<http://bugs.python.org/issue6641>
___
___
Python-bug
Alexander Belopolsky added the comment:
Committed issue6280-calendar.diff in r81988. I believe tests should be merged
in 2.7. Any objections?
As for the original RFE, I think it should be rejected. I believe users should
be encouraged to use datetime objects instead of timetuples and
Alexander Belopolsky added the comment:
I reverted r81988 in r81989. Some code may rely on timegm() accepting float in
tm_sec. See http2time in Lib/http/cookiejar.py.
It is very easy to modify implementation to accept float seconds, but old
implementation accidentally work for float hours
Alexander Belopolsky added the comment:
Éric,
It will be helpful if your code could also check for lines longer than 79
characters.
--
___
Python tracker
<http://bugs.python.org/issue8
Alexander Belopolsky added the comment:
.. and trailing white space.
--
___
Python tracker
<http://bugs.python.org/issue8912>
___
___
Python-bugs-list mailin
Alexander Belopolsky added the comment:
Reopening to add some minor fixes to tests and documentation. See
issue5094h.diff. Ezio, thanks for finding these issues.
--
status: closed -> open
Added file: http://bugs.python.org/file17676/issue5094h.d
Changes by Alexander Belopolsky :
--
nosy: +ezio.melotti
___
Python tracker
<http://bugs.python.org/issue5094>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alexander Belopolsky :
Recently added datetime.timezone class does not have a custom repr, so one gets
>>> timezone.utc
instead of parseable
datetime.timezone(datetime.timedelta(0))
This is inconsistent with the way other classes in datetime modu
Changes by Alexander Belopolsky :
--
dependencies: +datetime lacks concrete tzinfo implementation for UTC
versions: +Python 3.2
___
Python tracker
<http://bugs.python.org/issue9
Alexander Belopolsky added the comment:
Merged issue5094 nosy list.
--
nosy: +ajaksu2, akira, brett.cannon, doerwalter, durban, ezio.melotti,
gagenellina, kawai, l0nwlf, mark.dickinson, merwok, pitrou, r.david.murray,
rafe, techtonik, tim_one
Alexander Belopolsky added the comment:
What about
"""
.. method:: datetime.utcoffset()
If :attr:`tzinfo` is ``None``, returns ``None``, else returns ...
"""
Should this use "return" too?
--
___
Alexander Belopolsky added the comment:
How to specify offset range horse got its beating above. See msg107554. The
current wording is the best compromise between verbosity and precision.
Replacing the patch with one that fixes other nits.
--
Added file: http://bugs.python.org
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17676/issue5094h.diff
___
Python tracker
<http://bugs.python.org/issue5094>
___
___
Python-bug
Alexander Belopolsky added the comment:
On this happy note, I am closing this issue. Doc changes have been committed
in r82004, test changes in r82003. For repr(timezone(..)) development, please
follow issue #9000.
--
status: open -> clo
Changes by Alexander Belopolsky :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue3129>
___
___
Python-bugs-list mailing list
Un
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file17681/issue6641.diff
___
Python tracker
<http://bugs.python.org/issue6641>
___
___
Python-bug
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17667/issue6641.diff
___
Python tracker
<http://bugs.python.org/issue6641>
___
___
Python-bug
Alexander Belopolsky added the comment:
Mark,
I am reassigning this to you for a commit review.
--
assignee: belopolsky -> mark.dickinson
___
Python tracker
<http://bugs.python.org/iss
New submission from Alexander Belopolsky :
I find the following quite misleading:
>>> from datetime import datetime
>>> import time
>>> time.strftime('%c %z %Z', datetime.utcnow().utctimetuple())
'Wed Jun 16 03:26:26 2010 -0500 EST'
As far as I
New submission from Alexander Belopolsky :
Current datetime.timetuple() implementation goes out of its way to support edge
cases that produce timetuples beyond the naive datetime range:
>>> t1 = datetime.min.replace(tzinfo=timezone.max)
>>> t2 = datetime.max.replace(t
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue9009>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alexander Belopolsky :
Here is the history of the issue per Martin v. Löwis on python-dev:
"""
This was added with
r36221 | bcannon | 2004-06-24 03:38:47 +0200 (Do, 24. Jun 2004)
Changes by Alexander Belopolsky :
--
keywords: +patch
Added file: http://bugs.python.org/file17684/timefunc-split.diff
___
Python tracker
<http://bugs.python.org/issue9
Alexander Belopolsky added the comment:
Based on IRC discussion, here is a modified patch that places C code in _time.c
and creates a stub for _time.h so that future shared definitions can go there.
--
Added file: http://bugs.python.org/file17685/issue9012.diff
Changes by Alexander Belopolsky :
--
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/issue9012>
___
___
Python-bugs-list mai
Changes by Alexander Belopolsky :
--
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/issue9012>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
Added new Module/_time.h to the patch.
--
Added file: http://bugs.python.org/file17686/issue9012.diff
___
Python tracker
<http://bugs.python.org/issue9
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17685/issue9012.diff
___
Python tracker
<http://bugs.python.org/issue9012>
___
___
Python-bug
New submission from Alexander Belopolsky :
This idea was brought in the original fixed offset timezone proposal (see issue
5094), but was met with some opposition. See msg106914, point 2. As a result,
the timezone implementation is in conflict with tzinfo documentation that says
&qu
Changes by Alexander Belopolsky :
--
dependencies: +datetime lacks concrete tzinfo implementation for UTC
nosy: +brett.cannon, mark.dickinson
___
Python tracker
<http://bugs.python.org/issue9
Alexander Belopolsky added the comment:
Mark,
It is great to see you doing this. I looked at this code on several occasions
before and each time ran away scared! I sincerely hope I will understand how
it works after your rewrite.
Just a small suggestion at this point: can you give longer
Alexander Belopolsky added the comment:
Committed in r82034.
--
stage: commit review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
I would like to move this forward. The PyPy implementation at
http://codespeak.net/pypy/dist/pypy/lib/datetime.py
claims to be based on the original CPython datetime implementation from the
time when datetime was a python module. I looked through the
Alexander Belopolsky added the comment:
On Thu, Jun 17, 2010 at 10:31 AM, Marc-Andre Lemburg
wrote:
..
> To avoid the wasted memory and import time, it's better to use:
>
> try:
> from _cmodule import *
> except ImportError:
> from _pymodule import *
>
Hmm,
Alexander Belopolsky added the comment:
> To avoid the wasted memory and import time, it's better to use:
>
> try:
>from _cmodule import *
> except ImportError:
>from _pymodule import *
>
.. also this makes it harder to prototype things in Python or have mix
Alexander Belopolsky added the comment:
On Thu, Jun 17, 2010 at 10:32 AM, Antoine Pitrou wrote:
..
>> Is there direct regrtest support for this?
>
> You can take a look at test_io, test_memoryio or test_heapq for inspiration.
>
I looked at test_io and don't like that ap
Alexander Belopolsky added the comment:
> The only alternative is to manually duplicate tests, these leads to very
> poor test coverage because of the average developer's laziness (json is
> an example).
No, here is another alternative:
==> _example.py <==
def foo()
Alexander Belopolsky added the comment:
Porting PyPy implementation to 2.7 was fairly easy. I am posting the patch
which makes PyPy datetime.py pass regression tests when dropped in the trunk.
I expect 3.x port to be uneventful as well. Raising the priority because I
would like to check
Alexander Belopolsky added the comment:
issue6641a.diff fixes the nits that Mark found and makes the tests robust with
respect to change of timezones. Tested with all timezones avalilable on OSX
including TZ="Eire". (Ever heard of Ouagadougou?)
Parsing RFC 3339's HH:MM forma
Alexander Belopolsky added the comment:
Committed in r82053.
--
___
Python tracker
<http://bugs.python.org/issue6641>
___
___
Python-bugs-list mailing list
Unsub
Changes by Alexander Belopolsky :
--
stage: commit review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
Since this does not seem to be reproducible anymore, I am going to close this
soon.
--
resolution: -> works for me
status: open -> pending
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
Is this important enough to try to get in 2.7 before rc2? Victor?
--
components: +Extension Modules -None
type: -> behavior
versions: +Python 3.2 -Python 2.5, Python 3.1
___
Python tracker
&l
Alexander Belopolsky added the comment:
> Also, this should not be marked as high priority. It may be a
> personal priority for you, ...
Reverting priority. I thought once an issue is assigned, the priority becomes
the priority that assignee places on the issue. Sorry for the con
Alexander Belopolsky added the comment:
>> One, we should not blindly pull in the PyPy code
>> without some core PyPy developer being in on this
>
> I concur. Much of PyPy code is written for a restricted subset of
> Python instead of clean, idiomatic modern Python.
Changes by Alexander Belopolsky :
--
priority: normal -> low
stage: patch review -> unit test needed
versions: +Python 3.1 -Python 2.7
___
Python tracker
<http://bugs.python.org/iss
Alexander Belopolsky added the comment:
I am attaching datetime-sandbox-pypy.diff, a plain diff between six-year-old
sandbox and pypy versions. (Plain diff is cleaner than unified diff.)
You can see that the differences are trivial. I notice, however that original
datetime implementation
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue9025>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
Reopening because the patch introduced a regression with respect to datetime
subclasses:
>>> class DT(datetime): pass
...
>>> DT.strptime('', '')
datetime.datetime(1900, 1, 1, 0, 0)
a DT instance exp
Alexander Belopolsky added the comment:
Attaching issue6641b.diff that fixes subclassing issue. Added tests for
datetime subclass only to keep the patch focused. Adding tests for datetime and
time subclasses will be natural in issue 1100942.
--
Added file: http://bugs.python.org
Alexander Belopolsky added the comment:
Replacing issue6641b.diff after fixing some spelling errors. Thanks, Ezio.
--
Added file: http://bugs.python.org/file17709/issue6641b.diff
___
Python tracker
<http://bugs.python.org/issue6
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17708/issue6641b.diff
___
Python tracker
<http://bugs.python.org/issue6641>
___
___
Python-bug
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file17710/issue6641b.diff
___
Python tracker
<http://bugs.python.org/issue6641>
___
___
Python-bug
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17709/issue6641b.diff
___
Python tracker
<http://bugs.python.org/issue6641>
___
___
Python-bug
Alexander Belopolsky added the comment:
I would prefer to see correct algorithm in stdlib and a recipe for how to
reproduce old sequences for the users who care.
--
___
Python tracker
<http://bugs.python.org/issue9
Alexander Belopolsky added the comment:
Let me just add a story to show how an alternate python implementation may be
useful for users. As I was porting datetime.py to 3.x, I saw many failures
from pickle tests. It was not easy to figure out what was going on because C
pickle code was
Alexander Belopolsky added the comment:
Committed in r82073.
--
stage: unit test needed -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
I was probably misled by Brett's assertion that 'it's not a matter of "if" but
"when" datetime will get a pure Python version.' (msg106498) It looks like
this is not a universally shared opinion.
I am not read
Alexander Belopolsky added the comment:
Thomas' patch does more than just allow bytearray. It allows any object that
can present itself as a buffer with byte-size items. It is a bit unfortunate
that such method will end up being called "fromstring" in 3.x.With string
Alexander Belopolsky added the comment:
> This, to me, implies that .fromstring should accept bytearray (though
> probably not general buffer objects). In 2.x, I understand .fromstring
> to initialize an array from machine bytes read into a string, but not
> .fromunicode. This is
Alexander Belopolsky added the comment:
Victor, this is your chance to add French to Python docs!
--
keywords: +easy
nosy: +belopolsky, haypo
___
Python tracker
<http://bugs.python.org/issue5
Changes by Alexander Belopolsky :
--
keywords: +patch
Added file: http://bugs.python.org/file17722/issue9005.diff
___
Python tracker
<http://bugs.python.org/issue9
Changes by Alexander Belopolsky :
--
stage: needs patch -> patch review
___
Python tracker
<http://bugs.python.org/issue9005>
___
___
Python-bugs-list mai
Alexander Belopolsky added the comment:
Note that a recently closed issue 7150 similarly tightened up datetime
operations by making out of range dates raise OverflowError rather than produce
non-sensible result. This case is not a clear cut, but now with timezone.utc
available in datetime
New submission from Alexander Belopolsky :
"""
As an aside, I dislike the fact that the datetime module uses a C 'int' for
date ordinals, and clearly assumes that it'll be at least 32 bits. int could
be as small as 16 bits on some systems (small embedded systems
Alexander Belopolsky added the comment:
I raised this issue on python-dev and Guido said "OK." See "[Python-Dev] Year
0 and year 10,000 in timetuple",
http://mail.python.org/pipermail/python-dev/2010-June/100682.html
I am attaching a "commit ready" patch which
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file17729/issue9005b.diff
___
Python tracker
<http://bugs.python.org/issue9005>
___
___
Python-bug
Alexander Belopolsky added the comment:
Committed in r82128.
--
stage: commit review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
With timezone.utc available in datetime module, users should be encouraged to
use dt.astimezone(timezone.utc).timetuple() instead of dt.utctimetuple(). Note
that the later will set tm_isdst to -1. This observation can be used to argue
for either of
New submission from Alexander Belopolsky :
>>> s = pickle.dumps(timezone.utc)
>>> pickle.loads(s)
Traceback (most recent call last):
..
TypeError: ("Required argument 'offset' (pos 1) not found", , ())
--
assignee: belopolsky
messages: 108313
nosy
Alexander Belopolsky added the comment:
Looks like a duplicate of issue 8455. Leaving open so that someone else could
sort out the priority.
--
nosy: +belopolsky
superseder: -> buildbot: test_urllib2_localnet failures (Connection refused)
on Tiger build
Alexander Belopolsky added the comment:
Apparently, the failure on OSX is due to the fact that
urllib.proxy_bypass('localhost') returns True. This makes the opener to bypass
the ProxyHandler that is explicitly set up to use the correct server port:
def
Alexander Belopolsky added the comment:
In fact, urllib.proxy_bypass() returns True for any simple host name (i.e. any
string without '.' in it):
>>> proxy_bypass('xyz')
True
>>> proxy_bypass('')
True
>>> proxy_bypass('whatever
Changes by Alexander Belopolsky :
--
stage: -> patch review
___
Python tracker
<http://bugs.python.org/issue8455>
___
___
Python-bugs-list mailing list
Un
Changes by Alexander Belopolsky :
--
resolution: -> duplicate
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue9052>
___
___
Pyth
Changes by Alexander Belopolsky :
--
keywords: +easy, patch
nosy: +mark.dickinson
stage: unit test needed -> patch review
Added file: http://bugs.python.org/file17738/issue8455.diff
___
Python tracker
<http://bugs.python.org/iss
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17738/issue8455.diff
___
Python tracker
<http://bugs.python.org/issue9051>
___
___
Python-bug
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file17739/issue9051.diff
___
Python tracker
<http://bugs.python.org/issue9051>
___
___
Python-bug
Alexander Belopolsky added the comment:
A small suggestion: rather than having bool hg which means Mercurial if true
and SVN if false, consider a string valued vc variable with 'svn' for SVN and
'hg' for Mercurial. This way it will be straightforward to add support for
Alexander Belopolsky added the comment:
Ronald,
Please see my python-dev post in "red buildbots on 2.7" thread:
http://mail.python.org/pipermail/python-dev/2010-June/100873.html
I argue that we should apply a fix along the lines of no-darwin-ext.diff while
waiting for Apple to
Changes by Alexander Belopolsky :
--
components: +Documentation
title: Needs a home page -> Distutils2 needs a home page
type: -> feature request
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
Python version is fixed in sandbox and committed in r82154.
--
___
Python tracker
<http://bugs.python.org/issue9
Alexander Belopolsky added the comment:
Martin's solution works. I don't think we need to worry about non-gcc
compilers on OSX. I am attaching a patch with tests where getgroups to id -G
comparison test is skipped if id -G shows more than 16 groups.
Some of the added tests are s
Alexander Belopolsky added the comment:
Reposting from python-dev. See "os.getgroups() on MacOS X"
<http://mail.python.org/pipermail/python-dev/2010-June/100960.html>.
"""
On Wed, Jun 23, 2010 at 2:08 AM, Ronald Oussoren wrote:
..
>>
>>> * [Ron
New submission from Alexander Belopolsky :
With python started at the root of the source tree and TZ=US/Eastern in the
environment,
>>> exec(open('Doc/includes/tzinfo-examples.py').read())
>>> import os
>>> os.environ['TZ']
'US/Eastern'
Alexander Belopolsky added the comment:
The result given when Eastern tzinfo object is used is clearly wrong. The
timezone shift should not change the actual time, but
>>> x == x.astimezone(Eastern)
False
while
>>> x == x.asti
Alexander Belopolsky added the comment:
Let's establish what is the correct wall clock sequence around EDT to EST
transition:
>>> import time
>>> def print_time(s):
...tt = time.localtime(s)
...print(time.strftime('%c %z %Z', tt))
x = datetime(2010
Changes by Alexander Belopolsky :
--
assignee: -> ronaldoussoren
components: +Macintosh -None
___
Python tracker
<http://bugs.python.org/issue9048>
___
___
Py
Alexander Belopolsky added the comment:
Committed in r82184. Leaving the issue open pending a more thorough review of
pickling in datetime module.
--
keywords: -easy, patch
priority: normal -> low
___
Python tracker
<http://bugs.pyth
Alexander Belopolsky added the comment:
> - ignore the rounding mode completely, always doing round-half-to-even.
+1
--
___
Python tracker
<http://bugs.python.org/iss
New submission from Alexander Belopolsky :
In the trunk:
>>> datetime.utcfromtimestamp(0.994)
datetime.datetime(1970, 1, 1, 0, 0, 1)
In py3k:
>>> datetime.utcfromtimestamp(0.994)
datetime.datetime(1970, 1, 1, 0, 0, 0, 99)
See issue1478429 - it appears th
Alexander Belopolsky added the comment:
My mistake. I had datetime.py from pypy in the directory from which I ran the
trunk python. The problem is also in the latest sandbox version of
datetime.py, but this is not yet part of cpython proper.
Refiled as pypy bug at http://codespeak.net
Alexander Belopolsky added the comment:
Similar problem affects fromtimestamp() constructors:
>>> datetime.fromtimestamp(0.0078125)-datetime.fromtimestamp(0)
datetime.timedelta(0, 0, 7813)
>>> datetime.utcfromtimestamp(0.0078125)-datetime.utcfromtimestamp(0)
datetime.ti
Alexander Belopolsky added the comment:
I've just noticed that time_strftime already has the range checks for tm
structure fields. These checks can be separated in a function and shared with
asctime. Marking this as "easy". See also issue897625.
--
keyword
New submission from Alexander Belopolsky :
Attached patch moves cross-platform logic of obtaining current time to _time.c
which is shared between time and datetime modules. This simplifies both
modules and reduces the datetime module dependency on the time module.
--
assignee
Alexander Belopolsky added the comment:
The new patch, issue9079.diff exposes gettimeofday as time.gettimeofday()
returning (sec, usec) pair.
--
Added file: http://bugs.python.org/file17767/issue9079.diff
___
Python tracker
<http://bugs.python.
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17766/gettimeofday.diff
___
Python tracker
<http://bugs.python.org/issue9079>
___
___
Python-bug
Alexander Belopolsky added the comment:
Mark,
I am reassigning this to you for commit review. I am changing the title to
reflect the visible part of the change. The datetime module gains direct
access to system gettimeofday at the C level while time module grows
time.gettimeofday() Python
2501 - 2600 of 3596 matches
Mail list logo