Alexander Belopolsky added the comment:
Non-existing tools removed by Mark in r82515. There are still tools (see '-'
lines above that need a README entry.)
--
nosy: +mark.dickinson
___
Python tracker
<http://bugs.python.
Alexander Belopolsky added the comment:
Also I believe 2to3 deserves to be mentioned in README.
--
___
Python tracker
<http://bugs.python.org/issue9093>
___
___
Changes by Alexander Belopolsky :
--
nosy: +georg.brandl
___
Python tracker
<http://bugs.python.org/issue9093>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
Committed in r82517.
--
___
Python tracker
<http://bugs.python.org/issue9151>
___
___
Python-bugs-list mailing list
Unsub
Alexander Belopolsky added the comment:
Committed some minor "modernization" changes in r82521. Given that datetime.py
is in the works (see issue7989), I don't think there is any reason to polish
this demo further.
--
resolution: -> accepted
stat
New submission from Alexander Belopolsky :
Apparently introduced by a wholesale elimination of PyString_ in r57374, the
else clause in the following snippet from call_tzname is redundant:
if (!PyUnicode_Check(result)) {
PyErr_Format(PyExc_TypeError, "tzinfo.tzname()
Changes by Alexander Belopolsky :
--
keywords: +patch
nosy: +mark.dickinson
resolution: -> accepted
stage: -> commit review
Added file: http://bugs.python.org/file17851/issue9152.diff
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
Yes, I realized that 2+ arguments would be equivalent to none, but was too lazy
to handle that case. (Falling into interactive help may actually be better than
an error message for some users.) Terry's solution is certainly better.
Atta
Alexander Belopolsky added the comment:
On the second reading, OP's request has nothing to do with pickle.load(). In
fact, there is no coherent request here.
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
_time.c is not supposed to be compiled into an extension. It is similar to
_math.c - if you add a line
_math _math.c
to Setup, you get a similar compile error. What needs to be done, however, is
to add _time.c to time and datetime lines. See
Alexander Belopolsky added the comment:
Committed in r82533.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue9152>
___
___
Python-
Alexander Belopolsky added the comment:
Merged in 3.1 in r82536.
--
stage: commit review -> committed/rejected
versions: +Python 3.1
___
Python tracker
<http://bugs.python.org/iss
Alexander Belopolsky added the comment:
Committed in r82547. I am leaving it open to decide whether this is a
3.1-backport candidate. Also I am not sure this is NEWS-worthy.
Jack,
Does this address your issue? Note that
>>> help(X.foo.fset)
will still not return help on X.fo
Alexander Belopolsky added the comment:
Many demos already include a self-test:
$ grep '^def test(' Demo/*/*.py
Demo/classes/Complex.py:def test():
Demo/classes/Dates.py:def test(firstyear, lastyear):
Demo/classes/Range.py:def test():
Demo/classes/Vec.py:def test():
D
Alexander Belopolsky added the comment:
I fixed Dates.py. See issue9151.
I also committed a minimal fix for Complex.py in r82524.
--
dependencies: +Demo/classes/Dates.py does not work in 3.x
nosy: +belopolsky
___
Python tracker
<h
Alexander Belopolsky added the comment:
I fixed Rev.py in r82550, but I don't think it is worth keeping in the current
form. Maybe it can be replaced with a pure python reimplementation of
builtins.reversed.
Note that slicing does not work for Rev:
>>> r = Rev([1,2,3])
>
Alexander Belopolsky added the comment:
Fixed Range.py in r82551.
--
___
Python tracker
<http://bugs.python.org/issue7962>
___
___
Python-bugs-list mailin
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue9155>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
I am attaching a rough patch which removes timedelta -> int minutes ->
timedelta round trips from utcoffset handling code. I think the result is an
improvement, but needs more polishing.
Mark,
Do you think this is worth pursuing? I am not int
Alexander Belopolsky added the comment:
Please keep this open. This issue is separate from pickling partial objects.
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue4
Changes by Alexander Belopolsky :
--
stage: -> needs patch
versions: +Python 3.2 -Python 2.7, Python 3.1
___
Python tracker
<http://bugs.python.org/iss
Alexander Belopolsky added the comment:
The wikisource file in the report is no longer available, but with latest
wikisource and python 2.7,
$ curl
http://download.wikimedia.org/enwikisource/latest/enwikisource-latest-pages-articles.xml.bz2|
bzip2 -cd | ./python.exe convert.py /tmp 8388608
Alexander Belopolsky added the comment:
+try:
+dc = DefaultContext
+except NameError:
+pass
+
+self.prec = dc.prec if prec is None else prec
I don't quite understand the point of catching NameError here, but it looks
like if it is caugh
Changes by Alexander Belopolsky :
--
keywords: +patch
Added file: http://bugs.python.org/file17864/issue5288.diff
___
Python tracker
<http://bugs.python.org/issue5
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17857/issue5288.diff
___
Python tracker
<http://bugs.python.org/issue5288>
___
___
Python-bug
Alexander Belopolsky added the comment:
Sorry, but I don't understand the point that you are trying to make. sq_dict
is indeed considered for inclusion in python: see issue 3783.
For this issue, we need a confirmation that the problem is present in the
current ve
Alexander Belopolsky added the comment:
Hmm, it looks like patchcheck does not fix trailing whitespace in c files:
$ grep ' $' Modules/datetimemodule.c| cat -ve
$
GET_TD_DAYS(offset1) * 86400 - $
Py_DECREF(offset);$
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file17865/issue5288.diff
___
Python tracker
<http://bugs.python.org/issue5288>
___
___
Python-bug
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17864/issue5288.diff
___
Python tracker
<http://bugs.python.org/issue5288>
___
___
Python-bug
Alexander Belopolsky added the comment:
Reopening to consider removing a special case in days_before_year(..). After
r82128, year cannot be <= 0.
--
stage: committed/rejected -> commit review
status: closed -> open
Added file: http://bugs.python.org/file17869/issue9
New submission from Alexander Belopolsky :
Prior to r82454, python implementation of timedelta had the following comment:
class timedelta:
def __new__(cls, days=0, seconds=0, microseconds=0,
# XXX The following should only be used as keyword args
Alexander Belopolsky added the comment:
Similarly, it appears that
if (*m < 1 || *m > 12) {
--*m;
normalize_pair(y, m, 12);
++*m;
/* |y| can't be bigger
Alexander Belopolsky added the comment:
On Mon, Jul 5, 2010 at 1:39 PM, Antoine Pitrou wrote:
..
> -1 from me. Deprecating correct code should be done for serious
> reasons, not aesthetical (i.e. gratuitous) ones.
I would think that deprecating error-prone constructs is well within
Alexander Belopolsky added the comment:
I am attaching a test coverage file for the patched datetimemodule.c.
--
Added file: http://bugs.python.org/file17874/datetimemodule.c.gcov
___
Python tracker
<http://bugs.python.org/issue5
Alexander Belopolsky added the comment:
It looks like I attached coverage for the original file. See
new-datetimemodule.c.gcov for coverage after the change.
--
Added file: http://bugs.python.org/file17875/new-datetimemodule.c.gcov
___
Python
Changes by Alexander Belopolsky :
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/issue9004>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue4679>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
This is a bit strange. timedelta is accepting int subclass instances:
>>> class I(int):
...pass
...
>>> timedelta(days = I(36))
datetime.timedelta(36)
but not numpy.unt_:
>>> timedelta(days = int_(36))
Traceback (mos
Changes by Alexander Belopolsky :
--
priority: normal -> low
resolution: -> rejected
status: open -> pending
___
Python tracker
<http://bugs.python.o
Alexander Belopolsky added the comment:
> As a matter of good style, though, I'd still like to see all uses of
> timedelta in the standard library and documentation use the keywords
> explicitly ...
It is a bit of a shame, but there are exactly 3 places using timedelta in
Alexander Belopolsky added the comment:
I am attaching a python prototype. I am following the convention in place for
the other datetime classes of prepending the repr with 'datetime.'. This may
not be ideal, but better than to introduce an inconsistency. The only question
Alexander Belopolsky added the comment:
On the second thought, this is clearly not a bug fix. Not a backport candidate.
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/iss
New submission from Alexander Belopolsky :
Attached patch makes timezone(timedelta(0)) always return the same instance as
timezone.utc. See issue9051 for pure python implementation.
With this patch, manipulation of aware datetime objects will be as efficient as
that of naive datetime objects
Alexander Belopolsky added the comment:
Attaching a C patch.
--
resolution: -> accepted
stage: unit test needed -> commit review
Added file: http://bugs.python.org/file17887/issue9000.diff
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
Replacing the patch. The previously attached patch reverted issue9051 a bit
too aggressively.
--
Added file: http://bugs.python.org/file17888/issue9000.diff
___
Python tracker
<http://bugs.python.
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17887/issue9000.diff
___
Python tracker
<http://bugs.python.org/issue9000>
___
___
Python-bug
Alexander Belopolsky added the comment:
Committed in r82617. Python version committed to sandbox in r82616.
--
stage: commit review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
Python implementation of UTC interning can be done better than the one in
issue9051. See attached issue9183-proto.diff.
--
Added file: http://bugs.python.org/file17889/issue9183-proto.diff
___
Python tracker
Alexander Belopolsky added the comment:
There is nothing we can do about misreporting of UTC offset. Unlike time
tuples, datetime objects do not store the DST flag and thus have no means to
disambiguate between standard and DST during the hour after the clock is set
back for DST to standard
Changes by Alexander Belopolsky :
--
dependencies: +String interpolation doesn't work with sys.version_info
___
Python tracker
<http://bugs.python.org/i
Alexander Belopolsky added the comment:
This is definitely the right way to do it. I expect that I will have only
minor nit-picks as I go through the patch.
1. You can probably just do
#define PyStructSequence_SET_ITEM PyTuple_SET_ITEM
#define PyStructSequence_GET_ITEM PyTuple_GET_ITEM
Alexander Belopolsky added the comment:
On Wed, Jul 7, 2010 at 4:19 PM, Benjamin Peterson
wrote:
>> - PyStructSequence_New does not fill ob_item array with NULLs.
>
> I'm not sure it really matters, since the fields should always be
> filled in, but I suppose it can'
Alexander Belopolsky added the comment:
Looks great. I love the patches where few '+'s are drowning in a sea of '-'s!
A gratuitous nitpick (feel free to ignore). In
+val = PyStructSequence_GET_ITEM(obj, i);
if (cname == NULL || val == NULL) {
The null
Alexander Belopolsky added the comment:
Uploaded issue5288.diff to Rietveld:
http://codereview.appspot.com/1698050
--
nosy: +benjamin.peterson
___
Python tracker
<http://bugs.python.org/issue5
Alexander Belopolsky added the comment:
issue5288a.diff addressed comments from Rietveld.
--
stage: unit test needed -> commit review
Added file: http://bugs.python.org/file17897/issue5288a.diff
___
Python tracker
<http://bugs.python.org/iss
Alexander Belopolsky added the comment:
C code changes eliminating round-trips between timdelta and int offsets
committed in r82642 and Python code changes committed to sandbox in r82641.
Now the requested behavior change is easy and I am about +0.5 on relaxing the
offset checks to allow
Alexander Belopolsky added the comment:
> A side effect of this change is that it kills the ability to have a
> PyStructSequence which has a smaller visible size than the total
> number of items.
Hmm. I was looking for this precise issue when I was reviewing the code and it
appea
New submission from Alexander Belopolsky :
Most likely the same underlying problem as in issue 9202, but can be seen on a
non-windows platform.
>>> from os import *
>>> stat('/')
Traceback (most recent call last):
File "", line 1, in
SystemError: NULL
Changes by Alexander Belopolsky :
--
keywords: +patch
Added file: http://bugs.python.org/file17906/issue9206.diff
___
Python tracker
<http://bugs.python.org/issue9
Changes by Alexander Belopolsky :
--
nosy: +benjamin.peterson, brian.curtin, eric.smith
Added file: http://bugs.python.org/file17907/issue9206.diff
___
Python tracker
<http://bugs.python.org/issue9
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17907/issue9206.diff
___
Python tracker
<http://bugs.python.org/issue9206>
___
___
Python-bug
Alexander Belopolsky added the comment:
On Thu, Jul 8, 2010 at 4:30 PM, Ronald Oussoren wrote:
..
> Note that explicitly setting the effective uid and gid of processes is
> somewhat frowned upon by Apple, they'd prefer if all daemon processes where
> started using launchd and u
Alexander Belopolsky added the comment:
Attached patch, issue9206a.diff seems to fix the os.stat() issue.
Brian, can you check if it fixes issue 9202 as well?
I planned to finish some other stuff tonight, so I am reassigning this to
Benjamin.
--
assignee: belopolsky
Alexander Belopolsky added the comment:
This whole thing is a mess. Great analysis, by the way. I started a
similar experiment some time ago, but gave up when I discovered that a
member of the admin group can read any file regardless of permissions
settings. Your solution is probably the
Alexander Belopolsky added the comment:
s/2.7/2.7.1/
--
___
Python tracker
<http://bugs.python.org/issue7900>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
issue7989a.diff is a partial success implementing Nick Coghlan's testing idea.
Unfortunately, datetime implementation with it's circular dependency on
_strftime is not very robust with respect to import trickery.
I am calling this a parti
Changes by Alexander Belopolsky :
--
assignee: -> belopolsky
___
Python tracker
<http://bugs.python.org/issue6478>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
Thank you for the bug report and a patch.
This does look like a bug and proposed patch seems to be the simplest way to
fix it. It is unfortunate that the entire TimeRE cache needs to be
recalculated when only 'Z' entry is invalidated by
Alexander Belopolsky added the comment:
Composed before reading Nick's comment:
"""
This issue is broader in scope than just the time module example that is given,
so I am not taking this over. With respect to datetime and time modules, there
are several related issues I
Alexander Belopolsky added the comment:
On Mon, Jul 12, 2010 at 12:07 PM, Antoine Pitrou wrote:
..
> Instead of being defined in _time.h, perhaps the new API function should be
> provided by core Python?
This is an interesting idea, but proposed Py_gettimeofday inherits
float_time lo
Alexander Belopolsky added the comment:
On Mon, Jul 12, 2010 at 1:06 PM, Antoine Pitrou wrote:
..
> Indeed, the GIL code would probably still use its own code paths.
> However, other less sensitive code could rely on the new API. For
> example, it is not critical for lock timeouts t
Alexander Belopolsky added the comment:
This option would be more useful if it became an optional argument to the
help() function. For someone working at the python command line prompt, having
to switch to pydoc to see private method documentation may be inconvenient. It
is more natural to
Alexander Belopolsky added the comment:
issue9206b.diff fixes test_datetime in issue9206a.diff by restoring sys.modules
in-place in tearDown method.
Based on python-dev discussion, I am marking this as accepted and uploading the
patch to Rietveld for commit review.
Please comment on the
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file17977/issue9206b.diff
___
Python tracker
<http://bugs.python.org/issue7989>
___
___
Python-bug
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17977/issue9206b.diff
___
Python tracker
<http://bugs.python.org/issue7989>
___
___
Python-bug
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17976/issue9206b.diff
___
Python tracker
<http://bugs.python.org/issue7989>
___
___
Python-bug
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file17978/issue9206b.diff
___
Python tracker
<http://bugs.python.org/issue7989>
___
___
Python-bug
Alexander Belopolsky added the comment:
The bug is still present in 2.7, and 3.2.
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue4
Alexander Belopolsky added the comment:
Is this a case of pure python implementation with a C speedup? Can you upload
the patch to Rietveld? I'll take a look once it is there.
--
nosy: +belopolsky
___
Python tracker
<http://bugs.py
Changes by Alexander Belopolsky :
--
components: +Documentation
___
Python tracker
<http://bugs.python.org/issue1581183>
___
___
Python-bugs-list mailin
New submission from Alexander Belopolsky :
I have discovered this issue while working on the unit tests for issue 7989. In
the first version of the setUp/tearDown overrides, I made a mistake when
restoring sys.modules after the test run. The fix was to do
sys.modules.__init__
New submission from Alexander Belopolsky :
On Tue, Jul 13, 2010 at 4:52 PM, Brett Cannon wrote [1]:
..
> I say this every time I give an import talk and it has been brought up here
> before but obviously not everyone catches it (which is understandable as I
> think when it came up on p
Changes by Alexander Belopolsky :
--
assignee: -> d...@python
components: +Documentation
nosy: +d...@python
stage: -> needs patch
type: -> feature request
___
Python tracker
<http://bugs.python.o
Alexander Belopolsky added the comment:
It would be nice if at the same time the facilities available in test.support
and test.regrtest were reviewed and some promoted to user facing unittest
package. They can even be placed in unittest.support and unittest.regrtest
modules for easy
Changes by Alexander Belopolsky :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue9169>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
Adding issue 7989 as a dependency because having pure python implementation in
the CPython tree will make it much easier to experiment with new datetime
features.
I am still -1 on adding specialized formatting methods to the datetime class.
I think
Alexander Belopolsky added the comment:
Issue 8273 is in some sense the opposite of this - it calls for blessing of
everything in in test.support while this issue calls for wholesale
"unblessing". I don't think either approach is right. While users should
definitely nev
Alexander Belopolsky added the comment:
In issue7989c.diff, I reverted to lazy import of _strptime, added cleanup of
_xyz helper functions, and made test_datetime more robust by restoring
sys.modules more thoroughly.
Unfortunately I've encountered an issue with Rietveld that prevents me
Alexander Belopolsky added the comment:
Yes, parsing elements ending with 'Z' into aware datetime objects makes
perfect sense, but this should be done carefully because doing so will break
any code that mixes the result with naive datetimes.
There is a lengthy RFC 3339 discussio
Alexander Belopolsky added the comment:
I don't see it being applied. Tres Seaver above reports that
issue1574217_dont_mask_errors.txt applies cleanly to 2.6 branch, which means
that it has not been applied yet.
Someone needs to check if the patch is current for 2.7 and py3k branch
Changes by Alexander Belopolsky :
--
nosy: +tim.golden
___
Python tracker
<http://bugs.python.org/issue9012>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
nosy: +tim.golden
___
Python tracker
<http://bugs.python.org/issue9079>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue9260>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
This looks like a borderline case between a bug and a feature request. If this
is deemed to be a feature, it is not appropriate for 2.x or 3.1. In any case,
I think the first step should be to consider this for py3k branch
Alexander Belopolsky added the comment:
I have verified that the issue is present in py3k. The unit test portion of
the patch applies cleanly in py3k an the added tests fail. The code portion
applies with patch -l and fixes the issue. I'll upload a patch with fixed
white
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file18002/issue1574217.diff
___
Python tracker
<http://bugs.python.org/issue1574217>
___
___
Pytho
Alexander Belopolsky added the comment:
Responding to Antoine question, I don't understand how you would use a union
here. Certainly you cannot define Py_dicthashcache_t as a union of long and
Py_ssize_t because it will not be able to easily assign long or Py_ssize_t
values to it. I
Alexander Belopolsky added the comment:
On the second thought, this comment:
- /* Cached hash code of me_key. Note that hash codes are C longs.
-* We have to use Py_ssize_t instead because dict_popitem() abuses
-* me_hash to hold a search finger.
-*/
suggests
Alexander Belopolsky added the comment:
Please ignore my comment about set type. Sets don't have this issue.
--
___
Python tracker
<http://bugs.python.org/issu
Alexander Belopolsky added the comment:
Yet it looks like set has a bigger problem whenever sizeof(Py_ssize_t) >
sizeof(long). setentry.hash is defined as long, but set_pop() stores a
Py_ssize_t index in it.
--
___
Python tracker
&l
2701 - 2800 of 3596 matches
Mail list logo