Alexander Belopolsky added the comment:
Francesco,
You have my +1 for implementing both 1 and 2 below.
"""
1. Use timegm(3) function where HAVE_TIMEGM is defined (i have a working patch
for it)
2. Implement a more portable timegm function with tzset and mktime where
Alexander Belopolsky added the comment:
On Sun, Feb 21, 2010 at 1:58 PM, Martin v. Löwis wrote:
..
> I would propose a different strategy: if _SC_NGROUPS_MAX is defined, use
> that to find out how much memory to allocate, otherwise, fall back to
> the current max array size. Can you
Alexander Belopolsky added the comment:
Here is another interesting fact: Mac OS 10.6 comes with python 2.5 and 2.6
preinstalled:
$ python2.5 -V
Python 2.5.3c1
$ python2.6 -V
Python 2.6.1
Neither of these exhibit the same bug, but both are broken in some way. Given
$ cat tg.py
import os
g
Alexander Belopolsky added the comment:
Apparently, Apple patches posix_[gs]etgroups functions as follows:
for 2.5:
http://www.opensource.apple.com/source/python/python-44/2.5/fix/posixmodule.c.ed
for 2.6:
http://www.opensource.apple.com/source/python/python-44/2.6/fix/posixmodule.c.ed
Alexander Belopolsky added the comment:
I've converted apple patches to unified diffs, but I cannot reproduce 2.5
behavior.
--
Added file: http://bugs.python.org/file16309/apple-2.5-fix-posixmodule.c.diff
___
Python tracker
<http://bugs.py
Alexander Belopolsky added the comment:
After some head-scratching, I figured out how to reproduce stock python2.5
behavior. It turns out that defining _DARWIN_C_SOURCE not only allows
getgroups() output to exceed NGROUPS_MAX (as documented), but also effectively
disables setgroups() which
Alexander Belopolsky added the comment:
I am reclassifying this as a crash because os.getgroups() crashes the
interpreter when python is running as root on an unmodified system:
$ sudo ./python.exe -c "import os; os.getgroups()"
Traceback (most recent call last):
File &quo
Alexander Belopolsky added the comment:
On Tue, Feb 23, 2010 at 2:20 AM, Ronald Oussoren wrote:
> ..
> Alexander: Â What makes you think r63955 introduced the problem?
That revision introduced _DARWIN_C_SOURCE which, as I explained, has
two effects on get/setgroups:
""&qu
Alexander Belopolsky added the comment:
Ronald,
Have you tested your patch with issue7900-tests.diff?
On my system:
$ ./python.exe Lib/test/test_posix.py
testNoArgFunctions (__main__.PosixTester) ... Segmentation fault
and
$ sudo ./python.exe Lib/test/test_posix.py
..
FAIL
Alexander Belopolsky added the comment:
On Tue, Feb 23, 2010 at 8:46 AM, Ronald Oussoren wrote:
..
> What I did notice though is that the tests don't actually test the issue at
> hand:
> having more than 16 secondairy groups on OSX.
This is easy to fix: just add another e
Alexander Belopolsky added the comment:
On Tue, Feb 23, 2010 at 8:46 AM, Ronald Oussoren wrote:
> ..
> I get test failures, but no crashes, when I do run the additional tests.
The crash that I see is apparently due to underallocated memory:
alt_grouplist = PyMem_Malloc(n);
sho
Alexander Belopolsky added the comment:
E-mail to tracker handling still seems to remove '>' quoted lines. I am
reposting a couple of comments that got clobbered:
--
> * allocate an array of groupcount gid_t's and call getgroups(groupcount)
>
This is more or less wh
Alexander Belopolsky added the comment:
I think I finally understand what is going on and ready to make what I believe
is a reasonable proposal.
Setting _DARWIN_C_SOURCE (or _DARWIN_UNLIMITED_GETGROUPS) replaces getgroups
with a Darwin extension, but does not change setgroups:
$ nm tg1
Alexander Belopolsky added the comment:
The patch (I reviewed timemodule-gmtime-trunk.diff) looks mostly correct. One
problem that I see is that it will likely produce compiler warnings on the
systems without timegm and mktime. The warnings will be due to unused static
function time_timegm
Alexander Belopolsky added the comment:
On Tue, Feb 23, 2010 at 12:16 PM, Ronald Oussoren
wrote:
..
> How did you detect that the modern getgroups implementation doesn't
> query the kernel? That would be very odd.
I wish I could say that I mastered dtrace under OSX, but I am no
Alexander Belopolsky added the comment:
David,
Can you unset "normal" priority from this issue. Regardless of whether it is a
crash or not a crash, this is a regression for which there is no user
work-around. It looks like "normal" priority makes the issue disappear fr
Alexander Belopolsky added the comment:
Another "+1" on the patch if it is needed. Posix module consistently releases
the GIL while making system calls and this is a good idea independent of this
particular issue.
Looking at the patch made me wonder whethe
Alexander Belopolsky added the comment:
Looks good.
A documentation typo:
gmtime() -- convert seconds since Epoch to UTC tuple\n\
+timegm() - Convert a UTC tuple to seconds since the Epoch.\n\
Note the use of -- in the existing items.
I understand that the choice of float for return value
Alexander Belopolsky added the comment:
Looks like a case of missing null check. Patch attached.
--
keywords: +patch
nosy: +Alexander.Belopolsky
Added file: http://bugs.python.org/file16359/issue8013.diff
___
Python tracker
<http://bugs.python.
Alexander Belopolsky added the comment:
On Wed, Feb 24, 2010 at 12:45 PM, Martin v. Löwis
wrote:
..
> I still think that the sysconf version should be the correct one. If OSX
> fails to work correctly under
> that version, and causes Python to raise an exception - then that's
Alexander Belopolsky added the comment:
Given
assert(*m > 0);
assert(*d > 0);
at the end of normalize_y_m_d(), it looks like at lest 1 <=*month and 1 <=*day
are redundant.
A closer look also reveals
assert(1 <= *m && *m <= 12);
in the
Alexander Belopolsky added the comment:
Aha! My reliance on asserts() was misguided. With the debug build:
>>> t0-d2
Assertion failed: (ordinal >= 1), function ord_to_ymd, file
/Users/sasha/Work/python-svn/trunk/Modules/datetimemodule.c, line 269.
Abort trap
Should we reclass
Alexander Belopolsky added the comment:
I am attaching the patch that fixes the issue by ignoring empty and all space
lines during commands' entry. Note that as written the patch also makes pdb
ignore shell escapes unless it is extended with do_shell method. I think this
is the
Alexander Belopolsky added the comment:
I reproduced this bug on OSX 10.6:
>>> os.setregid(-1,-1)
Traceback (most recent call last):
File "", line 1, in
OverflowError: group id too big
Since -1 has special meaning as an argument to POSIX setregid(rgid, egid),
"&q
New submission from Alexander Sulfrian :
Hi,
if using ccache (CC="ccache gcc --flags", CXX="g++") distutils will try to
execute something like "g++ gcc --flags" as linker for c++ libraries.
Patch attached.
Alex
--
assignee: tarek
components: Distu
Alexander Belopolsky added the comment:
I would like to hear from Thomas before introducing macros in this
code. I tried to follow the style of cfield.c which shows similar
code duplication.
There are also some questions that need to be answered before
polishing the code.
1. Should mixed
Alexander Belopolsky added the comment:
Note the following comment elsewhere in Modules/readline.c:
/* the history docs don't say so, but the address of state
changes each
Alexander Belopolsky added the comment:
Not directly related to the issue at hand, but I've noticed that while
readline.get_current_history_length() is tested in the unittests,
readline.get_history_length() is not. Attached patch adds tests for reading
and writing history files.
Al
Alexander Belopolsky added the comment:
Attaching a patch that is equivalent toissue887237.diff, but uses preprocessor
to generate repetitive code.
--
Added file: http://bugs.python.org/file16466/issue887237-macro.diff
___
Python tracker
<h
Changes by Alexander Belopolsky :
--
nosy: +Alexander.Belopolsky
___
Python tracker
<http://bugs.python.org/issue6953>
___
___
Python-bugs-list mailing list
Unsub
Alexander Belopolsky added the comment:
It appears that the tests that I attached fail when libedit is used. This is
clearly due to bugs in libedits readline emulation:
1. read_history does not update history_length
2. history_truncate_file does not preserver the history cookie
Alexander Belopolsky added the comment:
On Tue, Mar 9, 2010 at 4:24 PM, stefanholek wrote:
..
> To be zero-based, get_history_item would need to look like:
..
> + if ((hist_ent = history_get(history_base + idx)))
Did you test this with l
Alexander Belopolsky added the comment:
I my experience, reporting bugs in open source components of OSX to
bugreport.apple.com is a waste of time. Such reports are largely ignored and
they are not visible to upstream developers.
I believe the upstream for libedit is NetBSD,
http
Alexander Belopolsky added the comment:
I submitted two bug reports:
7734961
libedit history_truncate_file () fails to preserve magic line
Mac OS X
Other Bug
09-Mar-2010 05:48 PM
Open
7734839
libedit read_history() does not update history_length
Mac OS X
Other Bug
09-Mar-2010 05:39 PM
Open
Alexander Belopolsky added the comment:
theller> - Should 'part' be inserted as is, [possibly] leading
theller> to a total structure of fields with mixed byte order?
+1 for this option.
--
nosy: +Alexander.Belopolsky
___
Pytho
Alexander Belopolsky added the comment:
As far as I can tell, it does not *crash* the interpreter. Instead, it
replaces the python interpreter process with a "true" utility.
$ ./python.exe
Python 2.7a4+ (trunk:78816M, Mar 9 2010, 18:57:13)
[GCC 4.2.1 (Apple Inc. build 5646) (
Alexander Belopolsky added the comment:
I forgot to add that this behavior is documented:
os.execlp = execlp(file, *args)
execlp(file, *args)
Execute the executable file (which is searched for along $PATH)
with argument list args, replacing the current process
Alexander Belopolsky added the comment:
The original report, issue1039 has a better problem description:
"In a windows debug build, an assertion is triggered when os.execvpe is
called with an empty argument list:
self.assertRaises(OSError, os.execvpe, 'no such app-', [], No
Alexander Belopolsky added the comment:
Adding Thomas.
Thomas,
Do you remember why your patch for issue1039 was not backported?
--
nosy: +theller
___
Python tracker
<http://bugs.python.org/issue8
Alexander Belopolsky added the comment:
On Tue, Mar 16, 2010 at 7:46 PM, Matthias Klose wrote:
..
> it does crash:
Strange. Can you report your Linux version and the stack trace from the crash?
On Ubuntu, 2.6.24-27-generic #1 SMP Wed Jan 27 23:54:28 UTC 2010 i686
GNU/Linux, I see no cr
Alexander Belopolsky added the comment:
On Thu, Mar 18, 2010 at 3:32 PM, R. David Murray wrote:
..
> I agree that this should be fixed, since we presumably want to be "strictly
> conforming" to the posix standards,
> but it looks like this is a regression in either linux
Changes by Alexander Belopolsky :
--
nosy: +Alexander.Belopolsky
___
Python tracker
<http://bugs.python.org/issue3135>
___
___
Python-bugs-list mailing list
Unsub
Changes by Alexander Belopolsky :
--
nosy: +Alexander.Belopolsky
___
Python tracker
<http://bugs.python.org/issue6474>
___
___
Python-bugs-list mailing list
Unsub
Changes by Alexander Belopolsky :
--
nosy: +Alexander.Belopolsky
___
Python tracker
<http://bugs.python.org/issue8174>
___
___
Python-bugs-list mailing list
Unsub
Changes by Alexander Belopolsky :
--
nosy: +Alexander.Belopolsky
___
Python tracker
<http://bugs.python.org/issue3690>
___
___
Python-bugs-list mailing list
Unsub
New submission from Alexander Belopolsky :
Since issue1039 made it illegal to pass empty argument list to execv*, I
suggest to change signature of os.execl* functions and make arg0 a required
positional argument.
This is not a backward compatible change because os.execlp('true
Alexander Belopolsky added the comment:
Please see related issue8191.
--
___
Python tracker
<http://bugs.python.org/issue8154>
___
___
Python-bugs-list mailin
Alexander Belopolsky added the comment:
Link to revision: r57731
--
nosy: +Alexander.Belopolsky
___
Python tracker
<http://bugs.python.org/issue1039>
___
___
Alexander Belopolsky added the comment:
This issue was misclassified as an interpreter crash while in fact it was a bug
in the underlying OS utility. Please see discussion in issue8154.
Since the fix changes behavior, it should be documented and a NEWS entry added.
--
type: crash
Alexander Belopolsky added the comment:
On Sun, Mar 21, 2010 at 2:52 PM, Matthias Klose wrote:
..
> os.execlp('true') does raise ValueError on released 3.x versions. sorry if I
> do misunderstand something.
My bad. I thought it was a more recent change. However as far as I
Alexander Belopolsky added the comment:
Clearly not enough information, but I have a few observations:
1. Clearly the crash occurs on exit (in Py_Finalize) during a module cleanup.
(Unfortunately it looks like a non-debug build of Python was used so figuring
out which module is involved may
Alexander Belopolsky added the comment:
This is not a bug. The issue boils down to the following:
>>> from datetime import *
>>> d = datetime(2010, 1, 1)
>>> d, d.strftime("%G")
(datetime.datetime(2010, 1, 1, 0, 0), '2009')
and OP expects '
Alexander Belopolsky added the comment:
Is there a good reason why this issue is languishing? The requested
functionality seems to be well motivated, simple to implement with few
objections resolved in the discussion.
I wonder if it would be helpful to limit this patch to 3.x series. That
Alexander Belopolsky added the comment:
Google code search for
os.execlp\([^*,]+\) lang:python
returns 15 hits, two of which are the same as Matthias found. I am not sure
what these results mean for the issue (and Matthias does not reach a conclusion
either.)
Note that the status quo in 3
Alexander Belopolsky added the comment:
If this new feature stays in 3.x, shouldn't 2.7 have a -3 warning?
Also, I would consider adding os.execlp(path) -> os.execlp(path,
os.path.basename(path)) transformation to 2to3.
--
___
Python
Alexander Belopolsky added the comment:
I noticed that the change is still present in 2.7a. For what it's worth, I
agree with David:
"""
Since it does trigger a crash on the windows equivalent API, the check should
be conditional on platform. And it should generate a p
Alexander Belopolsky added the comment:
I am attaching a forward port of Victor's timedelta_true_divide_divmod.patch to
py3k.
--
nosy: +Alexander.Belopolsky
Added file: http://bugs.python.org/file16990/issue2706.diff
___
Python tracker
Changes by Alexander Belopolsky :
--
nosy: -belopolsky
___
Python tracker
<http://bugs.python.org/issue2706>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
On Mon, Apr 19, 2010 at 4:09 PM, Mark Dickinson wrote:
I noticed that as I was porting Victor's patch. I did not add timedelta %
timedelta because I found out that timedelta % int is not supported in the
released versions while timedelta // int i
Alexander Belopolsky added the comment:
I should be able to add timedelta % timedelta and fix the nits that Mark
mentioned tonight.
--
___
Python tracker
<http://bugs.python.org/issue2
Alexander Belopolsky added the comment:
New patch, issue2706a.diff, implements timedelta % timedelta and addresses
Mark's code review comments.
With respect to Mark's
"""
One other thought: with this division operation added, it might be nice to add
constants lik
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file16990/issue2706.diff
___
Python tracker
<http://bugs.python.org/issue2706>
___
___
Python-bug
Alexander Belopolsky added the comment:
On Mon, Apr 19, 2010 at 11:03 PM, R. David Murray
wrote:
>
> Alexander, do you think it would be worthwhile to write up a summary of all
> the issues
> involved in these three releated bugs and post it to python-dev?
Sure. I ranted abo
Alexander Belopolsky added the comment:
It is very easy to generate the size table programmatically:
>>> for c in "xcbB?hHiIlLqQfdspP":
... print(c, struct.calcsize(c))
...
x 1
c 1
b 1
B 1
? 1
h 2
H 2
i 4
I 4
l 8
L 8
q 8
Q 8
f 4
d 8
s 1
p 1
P 8
However, all values abo
Alexander Belopolsky added the comment:
My patch includes unit tests and I tested it on Mac OS X. Anand, what kind of
testing do you have in mind?
--
versions: +Python 2.7, Python 3.2, Python 3.3
___
Python tracker
<http://bugs.python.
Alexander Belopolsky added the comment:
On Tue, Apr 20, 2010 at 10:30 AM, Mark Dickinson wrote:
..
> It would be possible to add the 'standard' sizes to that table (i.e. the
> sizes that you get when using '<', '>', etc.); would that be helpful?
T
Alexander Belopolsky added the comment:
This is certainly not a bug, so I don't think targeting 2.7 is appropriate. I
have explained in a comment on issue2706 (see msg75917) why I believe true
division of timedelta by int should not be supported. In short, true division
of timedelta b
Alexander Belopolsky added the comment:
I am +1 for adding these features and I have only one comment on the code:
It is documented in time.strptime() documentation that
"""
The default values used to fill in any missing data when more accurate values
cannot be inferred are (1
Alexander Belopolsky added the comment:
BTW, it does not bother me that "date.strptime()
seems a bit odd, given that it cannot accept a time part." To me "time" in
strptime means time specification that may include date, time or even just
month. If parsed specification
New submission from Alexander Myodov :
The documentation (eg at
http://docs.python.org/release/2.6.5/library/functions.html#filter) tells that
there should be an itertools.filterfalse() function complementary to builtin
filter() function, that returns the list of elements (instead of the
Changes by Alexander Myodov :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue8472>
___
___
Python-bugs-list mailing list
Unsubscri
Alexander Myodov added the comment:
In this case, I'd suggest to rephrase it to "See :func:`itertools.ifilterfalse`
for the complementary function that returns the iterator over the elements of
*iterable* for which *function* returns false.", or even remove this line a
Alexander Belopolsky added the comment:
This is in a way more similar to issue1083 than to issue2706. I am -1 on this
RFE for the same reason as I am opposing allowing true division of timedelta by
an int. The timedelta type is fundamentally an integer type. A type delta is
just a certain
Alexander Belopolsky added the comment:
I meant rejecting issue1083, of course.
--
___
Python tracker
<http://bugs.python.org/issue1289118>
___
___
Python-bug
Alexander Belopolsky added the comment:
There is another inconsistency that this patch does not seem to cure. With
patch applied and D and DT defined as in OP,
>>> D(1900,1,1) > DT(1900,1,1)
True
but
>>> DT(1900,1,1) < D(1900,1,1)
Traceback (most recent call last
Alexander Belopolsky added the comment:
Upon further reflection I am -1 on this patch. First, as implemented this
patch changes behavior of an explicit invocation of date.__eq__. The patch
proposes to remove the following tests:
-# Neverthelss, comparison should work with the base
Alexander Belopolsky added the comment:
Can someone (Mark?) add an acknowledgment for Victor Stinner to the NEWS file?
My py3k patch was 90% code from Victor's trunk patch.
--
___
Python tracker
<http://bugs.python.org/i
Alexander Belopolsky added the comment:
With issue2706 accepted, I think this issue can now be rejected because
proposed td.tosecs() can now be spelled simply as td/timedelta(seconds=1).
The other RFE for a totimestamp() method is a duplicate of issue2736.
--
nosy
Alexander Belopolsky added the comment:
On Wed, Apr 21, 2010 at 2:03 PM, Mark Dickinson wrote:
..
> (BTW, as well as the newly introduced division methods, td.tosecs already
> exists, except that it's spelt td.total_seconds.)
Aggrrr! How did that slip in? :-)
8639913600.0
Alexander Belopolsky added the comment:
On Wed, Apr 21, 2010 at 2:33 PM, Jess Austin wrote:
..
> It might seem like the latter behavior is marginally better, but really this
> is just a mess, since a date-datetime comparison TypeErrors in all
> directions. I appreciate Alexand
Alexander Belopolsky added the comment:
It is too late to get new features in 2.x.
Francesco,
Please double-check timemodule-gmtime-r312.diff, it does not seem to reflect
your reported changes. ('-' vs '--' typo is still there)
There is no need to submit multiple patche
Alexander Belopolsky added the comment:
Some more comments:
- Documentation needs a "versionadded" entry.
- A fate of calendar.timegm() needs to be decided. If the decision is to
deprecate it, deprecation warning need to be added to calendar module and docs
updated accordingl
Alexander Belopolsky added the comment:
Is there a patch with a fix or just a patch with a test. If the later, maybe
someone can remove a patch keyword.
--
nosy: +Alexander.Belopolsky -belopolsky
___
Python tracker
<http://bugs.python.
Alexander Belopolsky added the comment:
Before someone spends more time writing a patch, lets pause and consider
whether this is a bug in the first place.
My understanding of the issue is that given
>>> class A(object):
... def __eq__(self, other):
...return True
...
OP exp
Alexander Belopolsky added the comment:
I don't have much to contribute other than a simple test to reproduce the issue:
>
Alexander Belopolsky added the comment:
I cannot reproduce this behavior on my MacBook running OSX 10.6.2.
$ ./python.exe Lib/test/test_distutils.py
...
--
Ran 168 tests in 3.850s
OK (skipped=4)
Also, cp437 appears to be a
Alexander Belopolsky added the comment:
The patch looks fine. I verified that the new tests pass on trunk and py3k. I
am attaching a patch for py3k with a forward port of set opereations and repr
tests.
--
nosy: +Alexander.Belopolsky
Added file: http://bugs.python.org/file17127
Alexander Belopolsky added the comment:
I am not sure fixing this quirk of %-formatting is worth the trouble given that
one simply use new style {}-formatting:
$ python-c 'import sys; print("{}.{}.{}-{}-{}".format(*sys.version_info))'
3.2.0-alpha-0
or a work-around
$ p
Alexander Belopolsky added the comment:
The recommended way to check that an object is an instance of a namedtuple is
to check for the _fields attribute. See issue7796, msg99869.
--
___
Python tracker
<http://bugs.python.org/issue8
Alexander Belopolsky added the comment:
On Thu, Apr 29, 2010 at 11:52 AM, Raymond Hettinger
wrote:
..
> IIRC, there is an open ticket to make structseq inherit from tuple to avoid
> just this kind of problem.
>
Indeed, see
Alexander Belopolsky added the comment:
I am attaching a patch with unit tests that implements the "middle-ground
approach" making map and reduce behave the way zip is now.
I my view this slightly preferable to the "all the way" approach of letting all
exceptions
Alexander Belopolsky added the comment:
I agree that this issue should be closed with no further action, but for
historical accuracy the resolution should be "out of date" rather than "won't
fix". The original bug was about range() behavior when it get argument
Alexander Belopolsky added the comment:
Attached patch makes array(t, a) use memcpy when t == a.typecode.
The code array_new can probably be refactored to eliminate redundant checks,
but with a good C compiler this probably have no performance effect. While
refactoring can simplify the code
Alexander Belopolsky added the comment:
On Sat, May 1, 2010 at 3:50 AM, Mark Dickinson wrote:
>
> Mark Dickinson added the comment:
>
> Alexander: range *does* still accept such arguments (in 2.7); just not
> floats:
>
>>>> from decimal import Decimal
>
Alexander Belopolsky added the comment:
On Sat, May 1, 2010 at 10:59 AM, Mark Dickinson wrote:
>
> Mark Dickinson added the comment:
>
> Decimal is behaving in exactly the same way as MyInt, isn't it?
> What do you get for range(MyInt(20), MyInt(20))?
>
Hmm, maybe
Alexander Belopolsky added the comment:
Robert,
Your patch segfaults on Lib/test/test_builtin.py, but I agree with the
approach. I'll see if it is easy to fix.
--
___
Python tracker
<http://bugs.python.org/i
Changes by Alexander Belopolsky :
--
assignee: -> belopolsky
nosy: +belopolsky -Alexander.Belopolsky
___
Python tracker
<http://bugs.python.org/iss
Alexander Belopolsky added the comment:
I am attaching a patch which does not crash or leak (as tested with -R :) and
adds a unit test for OP's case.
The problem, however is that it does not work if new style classes are used in
the test case. See disabled (with if 0) test in the
Alexander Belopolsky added the comment:
Mark,
I did not see your last comment before uploading the last patch. I think your
suggestion to bypass PyNumber_Long will fix the new/old style classes
discrepancy.
--
___
Python tracker
<h
Alexander Belopolsky added the comment:
This patch, bltinmodule4.diff, seems to work for all cases.
Mark,
It looks like I came up with almost the same logic as you did. The only
difference that I can see is that your code does not check that nb_int returns
an integer. Also I put repeated
1101 - 1200 of 4095 matches
Mail list logo