[issue9323] trace.py bug with the main file being traced

2010-09-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Thanks, Florent. -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue9323> ___ ___ Python-

[issue9315] The trace module lacks unit tests

2010-09-13 Thread Alexander Belopolsky
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

[issue9315] The trace module lacks unit tests

2010-09-13 Thread Alexander Belopolsky
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

[issue665761] reduce() masks exception

2010-09-13 Thread Alexander Belopolsky
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

[issue9315] The trace module lacks unit tests

2010-09-13 Thread Alexander Belopolsky
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

[issue9315] The trace module lacks unit tests

2010-09-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > You probably missed Lib/test/tracedmodules/ fixed in r84794. -- ___ Python tracker <http://bugs.python.org/iss

[issue9315] The trace module lacks unit tests

2010-09-13 Thread Alexander Belopolsky
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

[issue9315] The trace module lacks unit tests

2010-09-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Updated Makefile in r84803 - r84805. -- ___ Python tracker <http://bugs.python.org/issue9315> ___ ___ Python-bugs-list m

[issue9315] The trace module lacks unit tests

2010-09-14 Thread Alexander Belopolsky
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

[issue9315] The trace module lacks unit tests

2010-09-14 Thread Alexander Belopolsky
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

[issue9860] Building python outside of source directory fails

2010-09-15 Thread Alexander Belopolsky
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

[issue9860] Building python outside of source directory fails

2010-09-15 Thread Alexander Belopolsky
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&#

[issue9860] Building python outside of source directory fails

2010-09-15 Thread Alexander Belopolsky
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

[issue9860] Building python outside of source directory fails

2010-09-15 Thread Alexander Belopolsky
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

[issue9315] The trace module lacks unit tests

2010-09-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file1/unnamed ___ Python tracker <http://bugs.python.org/issue9315> ___ ___ Python-bugs-list m

[issue9315] The trace module lacks unit tests

2010-09-15 Thread Alexander Belopolsky
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

[issue9315] The trace module lacks unit tests

2010-09-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file18891/x.py ___ Python tracker <http://bugs.python.org/issue9315> ___ ___ Python-bugs-list mailin

[issue9315] The trace module lacks unit tests

2010-09-15 Thread Alexander Belopolsky
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

[issue9315] The trace module lacks unit tests

2010-09-15 Thread Alexander Belopolsky
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

[issue9866] Inconsistencies in tracing list comprehensions

2010-09-15 Thread Alexander Belopolsky
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

[issue9865] OrderedDict doesn't implement __sizeof__

2010-09-15 Thread Alexander Belopolsky
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

[issue9865] OrderedDict doesn't implement __sizeof__

2010-09-15 Thread Alexander Belopolsky
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

[issue9866] Inconsistencies in tracing list comprehensions

2010-09-15 Thread Alexander Belopolsky
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

[issue9860] Building python outside of source directory fails

2010-09-15 Thread Alexander Belopolsky
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

[issue9315] The trace module lacks unit tests

2010-09-16 Thread Alexander Belopolsky
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

[issue9315] The trace module lacks unit tests

2010-09-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: List comprehension test is removed from 3.1 in r84848. -- ___ Python tracker <http://bugs.python.org/issue9315> ___ ___

[issue9264] trace.py documentation is incomplete

2010-09-16 Thread Alexander Belopolsky
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

[issue9876] ConfigParser can't interpolate values from other sections

2010-09-16 Thread Alexander Solovyov
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

[issue9888] int overflow in datetime causes seg fault from datetime.ctime()

2010-09-17 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue9888> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2016] Crash when modifying the **kwargs passed to a function.

2010-09-20 Thread Alexander Belopolsky
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

[issue9906] including elementary mathematical functions in default types

2010-09-21 Thread Alexander Belopolsky
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 __

[issue9864] email.utils.{parsedate, parsedate_tz} should have better return types

2010-09-21 Thread Alexander Belopolsky
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

[issue9621] Graphviz output for 2to3 fixer patterns

2010-09-21 Thread Alexander Belopolsky
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.

[issue9860] Building python outside of source directory fails

2010-09-21 Thread Alexander Belopolsky
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

[issue9866] Inconsistencies in tracing list comprehensions

2010-09-21 Thread Alexander Belopolsky
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

[issue9913] Misc/SpecialBuilds.txt is out of date

2010-09-21 Thread Alexander Belopolsky
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

[issue9914] trace/profile conflict with the use of sys.modules[__name__]

2010-09-21 Thread Alexander Belopolsky
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

[issue766910] fix one or two bugs in trace.py

2010-09-21 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file8481/unnamed ___ Python tracker <http://bugs.python.org/issue766910> ___ ___ Python-bugs-list m

[issue766910] fix one or two bugs in trace.py

2010-09-21 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue766910> ___ ___ Python-bugs-lis

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2010-09-21 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +ncoghlan, terry.reedy ___ Python tracker <http://bugs.python.org/issue9325> ___ ___ Python-bugs-list mailing list Unsub

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2010-09-22 Thread Alexander Belopolsky
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

[issue9919] gdbinit lineno result is one line in excess

2010-09-23 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- components: +Demos and Tools versions: +Python 3.2 -Python 2.5 ___ Python tracker <http://bugs.python.org/issue9919> ___ ___

[issue6608] asctime does not check its input

2010-09-23 Thread Alexander Belopolsky
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

[issue9936] trace misreports "missing" lines

2010-09-23 Thread Alexander Belopolsky
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

[issue9936] trace misreports "missing" lines

2010-09-23 Thread Alexander Belopolsky
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

[issue9936] trace misreports "missing" lines

2010-09-23 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +eli.bendersky, terry.reedy ___ Python tracker <http://bugs.python.org/issue9936> ___ ___ Python-bugs-list mailin

[issue9936] trace misreports "missing" lines

2010-09-23 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- versions: +Python 2.7, Python 3.1 ___ Python tracker <http://bugs.python.org/issue9936> ___ ___ Python-bugs-list mailin

[issue9936] trace misreports "missing" lines

2010-09-24 Thread Alexander Belopolsky
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

[issue9941] Unify trace and profile interfaces

2010-09-24 Thread Alexander Belopolsky
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

[issue9941] Unify trace and profile interfaces

2010-09-24 Thread Alexander Belopolsky
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

[issue6608] asctime does not check its input

2010-09-24 Thread Alexander Belopolsky
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

[issue6608] asctime does not check its input

2010-09-24 Thread Alexander Belopolsky
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

[issue6608] asctime does not check its input

2010-09-24 Thread Alexander Belopolsky
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

[issue9936] trace misreports "missing" lines

2010-09-24 Thread Alexander Belopolsky
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/

[issue9936] trace misreports "missing" lines

2010-09-26 Thread Alexander Belopolsky
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

[issue9941] Unify trace and profile interfaces

2010-09-27 Thread Alexander Belopolsky
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

[issue9309] Add environment variable complementing command line option -no-user-cfg

2010-09-30 Thread Alexander Dreyer
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

[issue9309] Add environment variable complementing command line option -no-user-cfg

2010-09-30 Thread Alexander Dreyer
Alexander Dreyer added the comment: Of course, I mean: The error will *not* be detected... -- ___ Python tracker <http://bugs.python.org/issue9309> ___ ___ Pytho

[issue6608] asctime does not check its input

2010-10-01 Thread Alexander Belopolsky
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

[issue4775] Incorrect documentation - UTC time

2010-10-04 Thread Alexander Belopolsky
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 <

[issue7789] Issue using datetime with format()

2010-10-04 Thread Alexander Belopolsky
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

[issue7789] Issue using datetime with format()

2010-10-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue7789> ___ ___ Python-bugs-list mailing list Un

[issue10021] Format parser is too permissive

2010-10-04 Thread Alexander Belopolsky
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

[issue10021] Format parser is too permissive

2010-10-04 Thread Alexander Belopolsky
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

[issue10021] Format parser is too permissive

2010-10-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> d...@python components: +Documentation -Interpreter Core nosy: +d...@python ___ Python tracker <http://bugs.python.org/issu

[issue10021] Format parser is too permissive

2010-10-04 Thread Alexander Belopolsky
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

[issue9936] trace misreports "missing" lines

2010-10-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue9936> ___ ___ Python-bugs-list mailing list Un

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2010-10-05 Thread Alexander Belopolsky
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

[issue7980] time.strptime not thread safe

2010-10-05 Thread Alexander Belopolsky
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

[issue7980] time.strptime not thread safe

2010-10-05 Thread Alexander Belopolsky
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

[issue9079] Make gettimeofday available in time module

2010-10-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue9079> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9528] Add pure Python implementation of time module to CPython

2010-10-05 Thread Alexander Belopolsky
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

[issue7582] Use ISO timestamp in diff.py

2010-10-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +Add aware local time support to datetime module ___ Python tracker <http://bugs.python.org/issue7582> ___ ___

[issue10029] bug in sample code in documentation

2010-10-05 Thread Alexander Belopolsky
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

[issue10029] bug in sample code in documentation

2010-10-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue10029> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10029] "Equivalent to" code for zip is wrong in Python 3

2010-10-05 Thread Alexander Belopolsky
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', '

[issue10029] "Equivalent to" code for zip is wrong in Python 3

2010-10-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: -loewis ___ Python tracker <http://bugs.python.org/issue10029> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10029] "Equivalent to" code for zip is wrong in Python 3

2010-10-07 Thread Alexander Belopolsky
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

[issue10029] "Equivalent to" code for zip is wrong in Python 3

2010-10-08 Thread Alexander Belopolsky
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

[issue1777412] Python's strftime dislikes years before 1900

2010-10-08 Thread Alexander Belopolsky
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

[issue1545463] New-style classes fail to cleanup attributes

2010-10-08 Thread Alexander Belopolsky
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

[issue4775] Incorrect documentation - UTC time

2010-10-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issue4775> ___ ___ Python-bugs-list mailing list Un

[issue9866] Inconsistencies in tracing list comprehensions

2010-10-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issue9866> ___ ___ Python-bugs-list mailing list Un

[issue8902] add datetime.time.now() for consistency

2010-10-08 Thread Alexander Belopolsky
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

[issue8902] add datetime.time.now() for consistency

2010-10-08 Thread Alexander Belopolsky
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/

[issue10073] calendar.isleap() not checking parameter type

2010-10-12 Thread Alexander Belopolsky
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

[issue10073] calendar.isleap() not checking parameter type

2010-10-12 Thread Alexander Belopolsky
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

[issue7980] time.strptime not thread safe

2010-10-13 Thread Alexander Belopolsky
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

[issue10087] HTML calendar is broken

2010-10-13 Thread Alexander Belopolsky
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

[issue10087] HTML calendar is broken

2010-10-13 Thread Alexander Belopolsky
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

[issue10087] HTML calendar is broken

2010-10-13 Thread Alexander Belopolsky
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

[issue10087] HTML calendar is broken

2010-10-13 Thread Alexander Belopolsky
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

[issue10090] python -m locale fails on OSX

2010-10-13 Thread Alexander Belopolsky
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

[issue10092] calendar does not restore locale properly

2010-10-13 Thread Alexander Belopolsky
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' >>>

[issue10092] calendar does not restore locale properly

2010-10-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +christian.heimes, georg.brandl ___ Python tracker <http://bugs.python.org/issue10092> ___ ___ Python-bugs-list mailin

[issue10092] calendar does not restore locale properly

2010-10-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +twouters ___ Python tracker <http://bugs.python.org/issue10092> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10087] HTML calendar is broken

2010-10-13 Thread Alexander Belopolsky
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

[issue9005] Year range in timetuple

2010-10-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r85441. -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue9005> ___ ___ Python-

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-10-14 Thread Alexander Ljungberg
Changes by Alexander Ljungberg : -- nosy: +aljungberg ___ Python tracker <http://bugs.python.org/issue9205> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10102] mktime adding an hour in April (naive struct)?

2010-10-14 Thread Alexander Belopolsky
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

<    1   2   3   4   5   6   7   8   9   10   >