Alexander Belopolsky added the comment:
Thanks, Florent.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue9323>
___
___
Python-
Alexander Belopolsky added the comment:
Eli, while porting your tests to py3k, I had to change expected output for list
comprehension testing. This is not really surprising because 3.x
comprehensions differ from 2.x (they don't leak the loop variable anymore).
The difference be
Alexander Belopolsky added the comment:
Committed in:
py3k: r84780
release31-maint: r84783
release27-maint: r84777
Need a separate issue for the problem highlighted in msg116336.
--
status: open -> closed
___
Python tracker
&l
Alexander Belopolsky added the comment:
Since noone have spoken in favor of 2.7 backport, I am closing this issue as
committed to py3k.
--
keywords: -needs review
resolution: -> accepted
stage: patch review -> committed/rejected
status: pending -> closed
versions: -P
Alexander Belopolsky added the comment:
You must be right. I thought I did all the svn adds, but may have missed
something. I'll take care of this tonight, but I am off the grid for the next
3-4 hours.
On Sep 13, 2010, at 3:13 PM, Florent Xicluna wrote:
>
> Florent Xicluna
Alexander Belopolsky added the comment:
> You probably missed Lib/test/tracedmodules/
fixed in r84794.
--
___
Python tracker
<http://bugs.python.org/iss
Alexander Belopolsky added the comment:
On Tue, Sep 14, 2010 at 2:29 AM, Georg Brandl wrote:
..
> Note that if you add new directories under /Lib, you need to make the build
> system aware of them in several
> places (I don't remember all of them right now, one is i
Alexander Belopolsky added the comment:
Updated Makefile in r84803 - r84805.
--
___
Python tracker
<http://bugs.python.org/issue9315>
___
___
Python-bugs-list m
Alexander Belopolsky added the comment:
> Antoine suggests to relax the test and only check
> if the count is within a range (12, 13).
This feels like implementation driven testing. I would prefer to disable the
offending test pending further investigation into the core cause.
It
Alexander Belopolsky added the comment:
It looks like 3.1 with computed gotos produces the yet another different
tracing of list comprehensions:
2: l = [i for
10: i in
1: range(10)]
--
___
Python tracker
<h
New submission from Alexander Belopolsky :
When testing config options, it is often useful to build python in a directory
different from the root of the source tree. This is supported by autoconf
based builds as follows: you cd to the desired directory run configure with an
explicit path
Alexander Belopolsky added the comment:
I think the problem is with the following explicit rules in Makefile:
Parser/tokenizer_pgen.o:$(srcdir)/Parser/tokenizer.c
Parser/pgenmain.o: $(srcdir)/Include/parsetok.h
It looks like these rules are not VPATH friendly. Per Antoine
Alexander Belopolsky added the comment:
It turns out that make only gets confused when target files (Parser/pgenmain.o
etc.) exist in the source directory. Thus an obvious workaround is to build
all versions in alternative directories or delete object files from source tree
before
Alexander Belopolsky added the comment:
> (what is VPATH?)
VPATH is a search path that make uses to find targets and prerequisites.
configure sets it to its own location when invoked from a directory other than
cwd.
--
___
Python tracker
&l
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file1/unnamed
___
Python tracker
<http://bugs.python.org/issue9315>
___
___
Python-bugs-list m
Alexander Belopolsky added the comment:
> Is it really *interesting* to trace separate parts of list
> comprehensions like this?
It may or may not be useful for tracing code in the wild, but it helps to
isolate the causes of count mismatches.
I am attaching a file, x.py, that shows dif
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file18891/x.py
___
Python tracker
<http://bugs.python.org/issue9315>
___
___
Python-bugs-list mailin
Alexander Belopolsky added the comment:
I am attaching another test file, y.py, which shows that the cause of
discrepancy is outside of the trace module. The traced function is the same as
in x.py only with 5 iterations instead of 10 for brevity, but instead of using
trace module, I am
Alexander Belopolsky added the comment:
Raymond asked on IRC why this work is being back-ported. The answer is that it
is being forward-ported rather than back-ported. The trace module had no
unittests in either 2.x or 3.x and was very buggy in 3.x. Presumably, 2.x
version saw more use
New submission from Alexander Belopolsky :
Attached test script, tracetest.py, prints disassembly followed by a trace of
the following function:
1 def f():
2 return [i
3 for i
4 in range(2)]
With default configuration, the output is
2 0
Alexander Belopolsky added the comment:
I wonder if type metaclass can be taught to handle this in general for
subclasses implemented in python.
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue9
Alexander Belopolsky added the comment:
> How do you want to "handle this in general"?
Possibly by adding up __sizeof__'s of base and __dict__ in a generated
function? With a special handling of slots ...
May prove to be too complicated to b
Alexander Belopolsky added the comment:
On Wed, Sep 15, 2010 at 5:33 PM, Antoine Pitrou wrote:
..
> As I said in #9315, I think this kind of thing (bytecode traces) is an
> implementation detail; the changes
> in results shouldn't be regarded as breaking compatibility.
In r741
Alexander Belopolsky added the comment:
On Wed, Sep 15, 2010 at 5:45 PM, Roumen Petrov wrote:
..
> Please could you remove object files from source tree then try again.
>
It looks like you missed my penultimate comment.
> This is invalid issue.
At the very least, Building Python [1
Alexander Belopolsky added the comment:
See issue #9866 for follow ups on list comprehensions' tracing.
--
nosy: -Alexander.Belopolsky
status: open -> closed
superseder: -> Inconsistencies in tracing list comprehensions
___
Python tra
Alexander Belopolsky added the comment:
List comprehension test is removed from 3.1 in r84848.
--
___
Python tracker
<http://bugs.python.org/issue9315>
___
___
Alexander Belopolsky added the comment:
> So I'm open to ideas and am willing to submit improved patches for 3.2
I offered some ideas in my last message. In addition, I would like to see
profile and trace documentation to converge to similar structure and use
similar terminol
New submission from Alexander Solovyov :
Often it is useful to access some variable in other section for interpolation
needs: for example, parent directory declared in common section could be used
in configuration of certain components. Included patch can fix that (using
syntax
Changes by Alexander Belopolsky :
--
nosy: +mark.dickinson
___
Python tracker
<http://bugs.python.org/issue9888>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
On Mon, Sep 20, 2010 at 10:23 AM, Mark Lawrence wrote:
>
> Mark Lawrence added the comment:
>
> Can someone please backport this to 2.7 so we can get this closed, thanks.
>
AFAICT, r73564 preceded 2.7 branch cut, so the fix is
Alexander Belopolsky added the comment:
IIRC, trigonometric functions, such as sin or cos, are not considered
"elementary" in the real domain.
The problem with this proposal is where to stop. Right now the line is drawn
somewhere at __abs__ and __pow__. If you add __sin__ and __
Alexander Belopolsky added the comment:
I've added #9909 as a dependency, but IMO it is less likely to be accepted than
this feature request.
On this issue, I would much rather see email package to start using datetime
objects to represent time rather than named or unnamed t
Alexander Belopolsky added the comment:
Matt,
Can you post a sample graph in a common image format, say PNG? I am curious to
see it, but not curious enough to install graphviz.
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.
Alexander Belopolsky added the comment:
> Does this apply to 2.7 too?
I think it does, but it would be hard to sell any improvements in this area as
a bug fix.
--
___
Python tracker
<http://bugs.python.org/iss
Alexander Belopolsky added the comment:
I have found the root cause of these differences. The trace function is not
called when the opcode is successfully predicted. When computed gotos are
enabled, opcode prediction is disabled as explained in the following comment in
ceval.c:
Opcode
New submission from Alexander Belopolsky :
It looks like Misc/SpecialBuilds.txt has not been updated since 2.4.
This file is referenced from C-API documentation [1], but is not accessible as
a hyperlink.
Some of the recommendations in this file are out of date, in particular those
that
New submission from Alexander Belopolsky :
The main() method of trace and profile modules attempt to emulate the
environment in which traced code runs when invoked directly, but it fails in
several respects. The specific problem which is the subject of this issue is
that while __name__ is
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file8481/unnamed
___
Python tracker
<http://bugs.python.org/issue766910>
___
___
Python-bugs-list m
Changes by Alexander Belopolsky :
--
assignee: -> belopolsky
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue766910>
___
___
Python-bugs-lis
Changes by Alexander Belopolsky :
--
nosy: +ncoghlan, terry.reedy
___
Python tracker
<http://bugs.python.org/issue9325>
___
___
Python-bugs-list mailing list
Unsub
Alexander Belopolsky added the comment:
On Wed, Sep 22, 2010 at 9:39 AM, Jason R. Coombs wrote:
> .. It appears __getinitargs__ does not work on Python 2.5 or Python 2.7.
Yes, __getinitargs__ is only used for old style classes. I was
wrong on that point.
> Exceptions of the fol
Changes by Alexander Belopolsky :
--
components: +Demos and Tools
versions: +Python 3.2 -Python 2.5
___
Python tracker
<http://bugs.python.org/issue9919>
___
___
Alexander Belopolsky added the comment:
The patch looks good to me. Just a few nitpicks: the local convention seems to
be no underscores in helper functions such as gettmarg. I would call
is_valid_tm, "checktm" instead. Also, predicate-like naming (is_...) suggests
a function wi
New submission from Alexander Belopolsky :
With the attached traceme.py,
$ python -m trace -m -s -c traceme.py
lines cov% module (path)
250% traceme (traceme.py)
$ cat traceme.cover
x = (1,
>>>>>> 2,
1: 3)
This is wrong because all l
Alexander Belopolsky added the comment:
I am attaching a patch that fixes this issue. Need to add a unit test.
--
assignee: -> belopolsky
components: +Library (Lib)
keywords: +patch
stage: -> unit test needed
type: -> behavior
versions: +Python 3.2
Added f
Changes by Alexander Belopolsky :
--
nosy: +eli.bendersky, terry.reedy
___
Python tracker
<http://bugs.python.org/issue9936>
___
___
Python-bugs-list mailin
Changes by Alexander Belopolsky :
--
versions: +Python 2.7, Python 3.1
___
Python tracker
<http://bugs.python.org/issue9936>
___
___
Python-bugs-list mailin
Changes by Alexander Belopolsky :
--
stage: unit test needed -> commit review
Added file: http://bugs.python.org/file18998/issue9936a.diff
___
Python tracker
<http://bugs.python.org/iss
New submission from Alexander Belopolsky :
The trace and profile modules provide similar functionality, but have some
gratuitous differences in their APIs and command line interfaces.
For example, the method to trace a single call is Trace.runfunc, but almost
identical Profile method is
Alexander Belopolsky added the comment:
The runfunc/runcall difference is the easiest to address. I propose to add
runcall to Trace as an alias to runfunc and deprecate runfunc. In addition, I
propose to add __enter__ and __exit__ methods to both Trace and Profile so that
they can be used
Alexander Belopolsky added the comment:
MunSic,
Your patch does not apply cleanly to the py3k branch. Please not that new
features can only go to py3k. While some may argue that this issue is a bug, I
think it is more likely that it will only be accepted for 3.2. In any case, a
py3k
Alexander Belopolsky added the comment:
Hmm, it looks like issue6608-timemodule-2nd.patch is a patch on top of your
previous patches. I'll check if I can apply last three patches in order.
--
___
Python tracker
<http://bugs.python.org/i
Alexander Belopolsky added the comment:
No, it looks like the starting patch is against 2.7. We need a py3k patch.
Meanwhile, I've noticed a couple of grammatical mistakes in comments:
"strftime(), asctime() does not" -> "strftime() and asctime() do not"
"fi
Alexander Belopolsky added the comment:
Fixed in r84994, r84995 (3.1) and r84996 (2.7).
--
resolution: -> fixed
stage: commit review -> committed/rejected
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
On Sun, Sep 26, 2010 at 5:47 PM, Arfrever Frehtes Taifersar Arahesis
wrote:
..
>
> test_issue9936 fails on 2.7 branch.
Should be fixed by r85020. Thanks.
--
___
Python tracker
<http://bugs.p
Alexander Belopolsky added the comment:
I've ran into a problem adding context manager functionality to Profile/Trace
objects. When profile/trace function is set in __enter__ and removed in
__exit__ it catches two spurious events: a return from __enter__ and a call to
__exit__. Th
Alexander Dreyer added the comment:
The idea is, that an environment variable can be set globally by the
master-build system or the packaging system. In contrary, the --no-user-cfg
switch has to be added to the build description of each individial package. For
strongly community-driven
Alexander Dreyer added the comment:
Of course, I mean: The error will *not* be detected...
--
___
Python tracker
<http://bugs.python.org/issue9309>
___
___
Pytho
Alexander Belopolsky added the comment:
Committed with minor changes in r85137. Thanks for the patch!
--
resolution: -> accepted
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexander Belopolsky added the comment:
Based on the discussion so far, I am going to close this as "invalid".
--
assignee: georg.brandl -> belopolsky
resolution: -> invalid
status: open -> pending
___
Python tracker
<
Alexander Belopolsky added the comment:
The original bug report is invalid and the documentation issue is a duplicate
of #8913.
--
nosy: +belopolsky
resolution: -> duplicate
superseder: -> Document that datetime.__format__ is datetime.st
Changes by Alexander Belopolsky :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue7789>
___
___
Python-bugs-list mailing list
Un
New submission from Alexander Belopolsky :
According to the Format String Syntax section [1], attribute_name must be an
identifier. However, the parser does not catch a violation of this rule and
happily passes non-indentifier strings to getattribute:
>>> class X:
...def __getat
Alexander Belopolsky added the comment:
PEP 3101 has the following
"""
Implementation note: The implementation of this proposal is
not required to enforce the rule about a simple or dotted name
being a valid Python identifier. Instead, it will rely on the
geta
Changes by Alexander Belopolsky :
--
assignee: -> d...@python
components: +Documentation -Interpreter Core
nosy: +d...@python
___
Python tracker
<http://bugs.python.org/issu
Alexander Belopolsky added the comment:
On Mon, Oct 4, 2010 at 1:02 PM, Eric Smith wrote:
..
> Ah, but I don't need to in order to comply with the PEP!
This is true and this is the reason I changed this issue from bug to
doc. I seem to remember this having been discussed befor
Changes by Alexander Belopolsky :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue9936>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
I am afraid, for ordinary scripts these modules effectively use option 3. I
think these modules should remove its own scaffolding from "real" __main__
before loading any traced code. I am not sure how this can be achiev
Alexander Belopolsky added the comment:
MunSic,
It looks like issue7980.patch is just a unit test. Do you have a patch to fix
the issue?
--
___
Python tracker
<http://bugs.python.org/issue7
Alexander Belopolsky added the comment:
RDM> FYI there's been a proposal to create a time.py module anyway
RDM> in order to add some pure python functions not worth writing in c.
RDM> For reference, it's issue 7989.
Issue #7989 was retargeted to deal with datetime module. T
Changes by Alexander Belopolsky :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue9079>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
On Thu, Aug 12, 2010 at 10:26 PM, STINNER Victor wrote:
..
>> 1. Datetime.py time source (time.time()) represents time as
>> a floating point number which leads to system dependent behavior
>> and introduces floating point operations
Changes by Alexander Belopolsky :
--
dependencies: +Add aware local time support to datetime module
___
Python tracker
<http://bugs.python.org/issue7582>
___
___
Alexander Belopolsky added the comment:
The relevant comment at Stack Overflow is:
"""
It looks like it's a bug in the documentation. The 'equivalent' code working in
python2, but not in python3, where it has an infinite loop.
And the latest version of the docu
Changes by Alexander Belopolsky :
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue10029>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
Note that the following variant where maps are replaced with list
comprehensions seems to work:
def zip(*iterables):
# zip('ABCD', '
Changes by Alexander Belopolsky :
--
nosy: -loewis
___
Python tracker
<http://bugs.python.org/issue10029>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
As Daniel pointed out, the "equivalent to" code in builtins section comes from
2.x itertools documentation where and equivalent generator definition is
presented for each function. While these definitions are helpful when used for
documentin
Alexander Belopolsky added the comment:
On Thu, Oct 7, 2010 at 3:37 PM, Raymond Hettinger
wrote:
..
> I'll update the docs with an equivalent that works and that has a comment
> showing when the
> StopIteration is raised and caught.
>
In this case, I wonder if "equival
Alexander Belopolsky added the comment:
kiorky,
Thank you for the updated patch, but since it implements a new feature, it
cannot be applied to 2.x series. I am +1 on removing year > 1900 limitation
from datetime.strftime in 3.x, but you need to consider how this can be
achieved in p
Alexander Belopolsky added the comment:
Does anyone want to weigh in on this? I am merging in the issue812369 nosy
list.
I would like to either apply gc-import.patch or close this as superseded by
issue812369.
--
keywords: +needs review -patch
nosy: +arigo, brett.cannon, candrea
Changes by Alexander Belopolsky :
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issue4775>
___
___
Python-bugs-list mailing list
Un
Changes by Alexander Belopolsky :
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issue9866>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
I need to correct myself: datetime.today() is not an alternative spelling of
date.today(), but rather a function returning current datetime which subtly
different from datetime.now().
--
___
Python tracker
Changes by Alexander Belopolsky :
--
stage: -> needs patch
type: -> feature request
versions: -Python 2.7, Python 3.1, Python 3.3
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
I agree with David on this one. In addition to the arguments already stated,
the string value of an exception is not part of specification. The exception
is still TypeError even if the message may be confusing. I also find that once
read in the
Alexander Belopolsky added the comment:
I would also like to note the following curiosity:
>>> calendar.isleap("%d")
False
I still don't think there is anything worth fixing here, but we can consider
replacing year % 4 == 0 predicate with year & 3 == 0 which will
Alexander Belopolsky added the comment:
It seems to me that this is related to if not a duplicate of issue 8098.
--
keywords: -patch
___
Python tracker
<http://bugs.python.org/issue7
New submission from Alexander Belopolsky :
$ python3 -m calendar --type=html 2010
Produces HTML which renders into the attached PDF file. It looks like bytes
vs. strings issue.
--
assignee: belopolsky
components: Library (Lib)
files: Calendar for 2010.pdf
messages: 118532
nosy
Alexander Belopolsky added the comment:
The issue is clearly with using print() for bytes' output:
if len(args) == 1:
print(cal.formatyearpage(datetime.date.today().year, **optdict))
I am not sure, however how this can be fixed because calendar interface allows
us
Alexander Belopolsky added the comment:
On Wed, Oct 13, 2010 at 12:20 PM, Walter Dörwald wrote:
..
> Does the following patch fix your problems?
>
Probably not because with your patch print() will encode HTML stream
with the system default encoding which may be different from that
spe
Alexander Belopolsky added the comment:
There is a similar issue with printing text calendar with specified encoding:
$ python3 -m calendar --encoding=utf8
b' 2010\n\n ..
--
___
Python tracker
New submission from Alexander Belopolsky :
$ python -m locale
Locale aliasing:
Locale defaults as determined by getdefaultlocale():
Language: en_US
Encoding: UTF8
..
Locale settings after calling resetlocale
New submission from Alexander Belopolsky :
>>> import calendar
>>> calendar.TextCalendar().formatmonthname(2010,10,10)
'October 2010'
>>> calendar.LocaleTextCalendar(locale='fr_FR').formatmonthname(2010,10,10)
'octobre 2010'
>>>
Changes by Alexander Belopolsky :
--
nosy: +christian.heimes, georg.brandl
___
Python tracker
<http://bugs.python.org/issue10092>
___
___
Python-bugs-list mailin
Changes by Alexander Belopolsky :
--
nosy: +twouters
___
Python tracker
<http://bugs.python.org/issue10092>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
Note that .decode(encoding) calls have been deliberately removed in py3k: see
issue 3059.
--
nosy: +georg.brandl, gpolo
___
Python tracker
<http://bugs.python.org/issue10
Alexander Belopolsky added the comment:
Committed in r85441.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue9005>
___
___
Python-
Changes by Alexander Ljungberg :
--
nosy: +aljungberg
___
Python tracker
<http://bugs.python.org/issue9205>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
It looks like you have just discovered the joys of daylight saving time. The
problem with your example is that datetime(2003,4,6,2,58,17) is not a valid
time in your timezone (most likely you are in the US). In the US, prior to
2007, the clocks moved
101 - 200 of 4095 matches
Mail list logo