[issue7962] Demo and Tools need to be tested and pruned

2010-07-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I wonder if it would be possible as a part of Demo and Tools clean-up to move them into packages under Lib. I would really like to be able to do $ python -m demo.turtle instead of (on a Mac) $ cd /Applications/Python\ 2.6/Extras/Demo/turtle/ $ python

[issue9388] locale documentation describes non-existing ERA_YEAR constant

2010-07-26 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Grepping through the source tree, reveals a single match for ERA_YEAR: Doc/library/locale.rst:247: .. data:: ERA_YEAR Google search for it shows an OpenSolaris bug report that explains the origin of this constant: """ There appea

[issue7962] Demo and Tools need to be tested and pruned

2010-07-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Jul 26, 2010 at 11:58 PM, Ned Deily wrote: .. > This has nothing to do with Apple.  "/Applications/Python x.y" is created by > the python.org OS X > installer, not supplied by Apple.  See Mac/BuildScript/build-installer.py

[issue9387] Make python -m tkinter run tkinter demo

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed with changes suggested by Éric in r83177. -- resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue9384] Tkinter windows pop under the terminal in OSX

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Jul 27, 2010 at 1:54 AM, Ronald Oussoren wrote: .. > Does "pydoc -k" also crash? Yes, it does: $ ./python.exe -m pydoc -k xyz lib2to3.fixes.fix_repr - Fixer that transforms `xyzzy` into repr(xyzzy). Segmentation fault but this

[issue7962] Demo and Tools need to be tested and pruned

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Jul 27, 2010 at 1:49 AM, Ronald Oussoren wrote: .. > What Apple does and doesn't ship is not important for this discussion. > I agree. I used Apple as an example because I happened to post from an Apple laptop. I am sure it is simila

[issue9387] Make python -m tkinter run tkinter demo

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Jul 27, 2010 at 10:44 AM, Éric Araujo wrote: > > Éric Araujo added the comment: > > BTW, why is the sys.argv hackery necessary? > Does import or runpy or something force us to jump through hoops? I guess we need to ask benja

[issue9387] Make python -m tkinter run tkinter demo

2010-07-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +benjamin.peterson, michael.foord ___ Python tracker <http://bugs.python.org/issue9387> ___ ___ Python-bugs-list mailin

[issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > if *name* already exists as a directory with the specified > permissions, then do not raise an error. AFAICT, the code in the patch does not check permissions of the existing path(s) or even whether it is a directory or not. -

[issue5109] array.array constructor very slow when passed an array object.

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am replacing issue5109.diff with an updated version (white space only changes). Does anyone object to this change or need more time to review? -- components: +Extension Modules -Library (Lib) resolution: -> accepted stage: patch rev

[issue5109] array.array constructor very slow when passed an array object.

2010-07-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17157/issue5109.diff ___ Python tracker <http://bugs.python.org/issue5109> ___ ___ Python-bug

[issue1170] shlex have problems with parsing unicode

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Fernando, Is this 2.7 only problem? In 3.2 >>> list(shlex.shlex('ab')) ['ab'] and bytes are not supported. >> list(shlex.shlex(b'ab')) Traceback (most recent call last): .. AttributeError: 'byte

[issue9391] Allow docstrings on dicts and named tuples outside of functions or classes.

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: -1 on dicts You can simply subclass from dict to add docs. I think you can add docs to named tuples even without subclassing, but I need to check. -- nosy: +belopolsky versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.3

[issue9391] Allow docstrings on dicts and named tuples outside of functions or classes.

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Indeed, namedtuple auto-generates a doc-string and does not provide a way to customize it. It sounds reasonable to add a doc argument to namedtuple() function that would control __doc__ of the result. I am +0 on that. -- keywords: +easy

[issue1170] shlex have problems with parsing unicode

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Jul 27, 2010 at 2:26 PM, Fernando Perez wrote: .. > Yes, sorry that I failed to mention the example I gave applies only to 2.x, > not to 3.x. Why do you expect shlex to work with unicode in 2.x? The documentation clearly says that the ar

[issue1170] shlex have problems with parsing unicode

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Jul 27, 2010 at 3:04 PM, Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > +1 on get shlex to work better with Unicode. In 2.7.x? It more or less works in

[issue9378] Make python -m pickle do something useful

2010-07-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> accepted stage: patch review -> commit review ___ Python tracker <http://bugs.python.org/issue9378> ___ __

[issue9378] Make python -m pickle do something useful

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r83188. -- stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue7962] Demo and Tools need to be tested and pruned

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like turtle was not the best example for msg111682 because it is already in Lib and python -m turtle runs demo. I am not sure what the relationship between Demo/turtle and the turtle module is

[issue1170] shlex have problems with parsing unicode

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: David, What do you think about attached patch? Would that be a change in the "more" direction? -- Added file: http://bugs.python.org/file18224/issue1170.diff ___ Python tracker <http://bu

[issue1170] shlex have problems with parsing unicode

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am adding MvL to nosy. Martin, I believe you are the ultimate authority on how to tokenize a unicode stream. -- nosy: +loewis ___ Python tracker <http://bugs.python.org/issue1

[issue9315] The trace module lacks unit tests

2010-07-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching a patch, issue9315-trace-fix.diff, that fixes a py3k bug exposed by issue9315.1-py3k.patch tests. One of the 3.x changes that caused the failure was that frames now have a __doc__ attribute and cannot be distinguished from functions. I

[issue9315] The trace module lacks unit tests

2010-07-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am on a train. Can take a look in about an hour, but I did not commit anything related to this issue recently. On Jul 28, 2010, at 9:30 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Alexander, it looks like y

[issue9315] The trace module lacks unit tests

2010-07-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Yep, this looks like me. Will fix shortly. Feel free to revert my change if it stops you. On Jul 28, 2010, at 9:39 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > test test_sys_setprofile crashed -- : > can

[issue9315] The trace module lacks unit tests

2010-07-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > test test_sys_setprofile crashed ... Fixed in r83204 - r83206. -- ___ Python tracker <http://bugs.python.org/iss

[issue9398] Unify sys.settrace and sys.setprofile tests

2010-07-28 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Th sys.settrace and sys.setprofile functions have the same interface an very similar purpose. The difference is in the types of events that get reported. However the tests for these functions are implemented separately and cover different sets of

[issue9398] Unify sys.settrace and sys.setprofile tests

2010-07-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +eli.bendersky, ncoghlan, tjreedy ___ Python tracker <http://bugs.python.org/issue9398> ___ ___ Python-bugs-list mailin

[issue9105] pickle security note should be more prominent

2010-07-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +BreamoreBoy ___ Python tracker <http://bugs.python.org/issue9105> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9183] Intern UTC timezone

2010-07-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Updated issue9183a.diff patch combines C and Python code changes since datetime.py is now in stdlib. Does anyone want to review before it goes in? -- components: +Library (Lib) resolution: -> accepted Added file: http://bugs.python.

[issue9183] Intern UTC timezone

2010-07-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +fdrake ___ Python tracker <http://bugs.python.org/issue9183> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9051] Improve pickle format for aware datetime instances

2010-07-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +Intern UTC timezone ___ Python tracker <http://bugs.python.org/issue9051> ___ ___ Python-bugs-list mailin

[issue3173] external strftime for Python?

2010-07-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Jul 28, 2010 at 11:22 PM, Guido van Rossum wrote: .. > What about the licensing? That look like the BSD license *with* > advertising clause... > I am not a lawyer and I am not intimately familiar with PSF policies, but this license does

[issue9410] Add Unladden Swallow's optimizations to Python 3's pickle.

2010-07-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: For those not familiar with Unladen Swallow, can you describe what the "most interesting optimizations" are? Maybe there is an Unladen Swallow document you can point to. Would any of these optimizations apply to python impl

[issue9417] Declaring a class creates circular references

2010-07-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This was discussed in issue1545463 which was deemed not to be worth fixing. The particular bug described in issue1545463 would also be fixed by the still open issue812369. So yes, there are cases where these cycles are a problem even with gc

[issue3873] Unpickling is really slow

2010-07-29 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue3873> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9416] complex formatting incorrectly omits a negative zero real part

2010-07-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I wonder if complex addition/subtraction should preserve -0.0 when it is added to a purely imaginary number. I.e., >>> -0.0+1j (-0+1j) -- nosy: +belopolsky ___ Python tracker <http://bug

[issue9315] The trace module lacks unit tests

2010-07-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Eli, Thanks a lot for your continuing effort. I would like to check in your work before any further enhancement. Please find a reasonable stop point and post a commit ready patch preferably with a news file entry describing the bug that is fixed

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

2010-07-30 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +georg.brandl ___ Python tracker <http://bugs.python.org/issue9325> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9428] profile.py bug with the main file being profiled

2010-07-30 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Attached patch, profile-run.diff, fixes the same bug as in issue9323, only in the profile rather than the trace module. Even though the affected code is small, it may be a good idea to share it between the trace and profile modules as well as unify

[issue9264] trace.py documentation is incomplete

2010-07-30 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue9264> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9315] The trace module lacks unit tests

2010-07-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Eli, Did you attach a wrong file? New issue9315.1.patch looks the same as old issue9315.1.patch. -- ___ Python tracker <http://bugs.python.org/issue9

[issue9429] 2to3 does not rename test.test_support to test.support

2010-07-30 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Even though test.support is an internal module, it is helpful to have a 2to3 fixer for the 'test_support' to 'support' rename. My naive attempt to add a fix (see patch pasted below), worked for "from test import test_sup

[issue9430] Document str() and repr() of timedelta.

2010-07-30 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Attaching a tentative patch. I think it is better to document these as operations rather than special methods. It may need to be clarified that "-2 days, 0:00:22" is timedelta(-2, 22) rather than -timedelta(2, 22), but I cannot co

[issue9430] Document str() and repr() of timedelta.

2010-07-30 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue9430> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9430] Document str() and repr() of timedelta.

2010-07-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: First revision: issue9430.diff -- Added file: http://bugs.python.org/file18278/issue9430.diff ___ Python tracker <http://bugs.python.org/issue9

[issue9315] The trace module lacks unit tests

2010-07-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Eli, I was about to commit issue9315.3.patch, which is a lightly modified version of issue9315.2.patch, but it turned out that test_trace cannot be run by regrtest.py: $ ./python.exe Lib/test/regrtest.py test_trace test_trace test test_trace failed

[issue9315] The trace module lacks unit tests

2010-07-30 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file18279/issue9315.3.patch ___ Python tracker <http://bugs.python.org/issue9315> ___ ___ Python-bug

[issue9315] The trace module lacks unit tests

2010-07-31 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file18293/issue9315.3.patch ___ Python tracker <http://bugs.python.org/issue9315> ___ ___ Python-bug

[issue9315] The trace module lacks unit tests

2010-07-31 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file18279/issue9315.3.patch ___ Python tracker <http://bugs.python.org/issue9315> ___ ___ Python-bug

[issue9315] The trace module lacks unit tests

2010-07-31 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- ___ Python tracker <http://bugs.python.org/issue9315> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue9315] The trace module lacks unit tests

2010-07-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching updated patches for py3k and release27-maint branches. Unfortunately I cannot commit them as is. When I run make test, I still get some strange failures. Eli, Why do you need to generated fakemodule inside test_trace? Why not take

[issue9315] The trace module lacks unit tests

2010-07-31 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file18304/issue9315.4-p3k.patch ___ Python tracker <http://bugs.python.org/issue9315> ___ ___ Pytho

[issue9441] increase logging handlers test coverage

2010-08-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I noticed that you use timedelta.total_seconds in secs which returns a float while no test covers fractional number of seconds. While not a problem with your choice of tests, equality comparison of floating point values commonly leads to fragile tests

[issue8078] add more baud constants to termios

2010-08-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- keywords: +easy ___ Python tracker <http://bugs.python.org/issue8078> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8994] pydoc does not support non-ascii docstrings

2010-08-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- components: +Library (Lib) ___ Python tracker <http://bugs.python.org/issue8994> ___ ___ Python-bugs-list mailing list Unsub

[issue9276] pickle should support methods

2010-08-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Not a proposed solution, but food for thought. Methods do have __reduce_ex__ method which works with protocol 3: >>> class X: ... def f(self): ... pass >>> X.f.__reduce_ex__(3) (, (,), {}, None, None) This result is useless f

[issue9315] The trace module lacks unit tests

2010-08-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: While it may be instructive to get to the bottom of what causes this behavior, I believe the right thing to do is to simply place traced code in a separate file in the test directory. Faking a module by manipulating sys.modules is hard to make robust

[issue9315] The trace module lacks unit tests

2010-08-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Aug 1, 2010 at 11:05 PM, Eli Bendersky wrote: .. > The fake module was the least intrusive way I could think of to simulate > stuff for trace.py - > it's a scalable approach if I'll need more than one module in the future

[issue9276] pickle should support methods

2010-08-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Aug 2, 2010 at 9:25 AM, Marc-Andre Lemburg wrote: .. >> You can *already* trick unpickling code into executing serialized code.  You >> don't need > this feature in order to be able to do it. > > How ? > >>&g

[issue9276] pickle should support methods

2010-08-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +alexandre.vassalotti, pitrou ___ Python tracker <http://bugs.python.org/issue9276> ___ ___ Python-bugs-list mailin

[issue9276] pickle should support methods

2010-08-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Aug 2, 2010 at 10:05 AM, Marc-Andre Lemburg wrote: .. > Without the definition of class x on the receiving side, there > would be no exploit. You are mistaken. Try adding del x (or del evil in my example) between dumps and loads and

[issue9276] pickle should support methods

2010-08-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Aug 2, 2010 at 10:11 AM, Marc-Andre Lemburg wrote: .. > Hmm, I just tried the code and it seems that you're right: > > The pickle string does not contain a reference to class x, > but only the name of the function to call. W

[issue9276] pickle should support methods

2010-08-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Aug 2, 2010 at 10:32 AM, Jean-Paul Calderone wrote: > > Jean-Paul Calderone added the comment: > >> I also like Antoine's idea of pickling the function/method name instead of >> the whole code object. > > I like

[issue9264] trace.py documentation is incomplete

2010-08-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I'll try to meet the deadline. :-) -- ___ Python tracker <http://bugs.python.org/issue9264> ___ ___ Python-bugs-l

[issue9264] trace.py documentation is incomplete

2010-08-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Oh, this is not assigned to me. Terry, do you need help with this? -- ___ Python tracker <http://bugs.python.org/issue9

[issue9264] trace.py documentation is incomplete

2010-08-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in release26-maint, r83549, to beat the rc1 deadline. I'll comment on a few improvements that we can do for 3.x later. Eli, I needed to fix white space issues in your patch before committing. Please run make patchcheck on your ch

[issue1170] shlex have problems with parsing unicode

2010-08-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't like my patch anymore because it breaks code that manipulates public wordchars attribute. Users may want to set it to their own alphabet or append additional characters to the default list. Maybe wordchars should always be "

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-08-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is clearly an invalid issue for python, but I wanted to keep it open until I or someone else gets a chance to report it to numpy project. I was hoping to close this with a link to numpy tracker

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-08-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Terry, Realistically, though, if you close this issue it is virtually guaranteed that not further action will be taken. I have not been involved with numpy for a couple of years now, so it would take me some time to find their tracker and restore my

[issue2651] Strings passed to KeyError do not round trip

2010-08-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Unassigning because others seem to be ahead of me reviewing this patch. I will keep an eye on this, though. Please note that I marked issue #614557 to depend on this one. Adding 'key' attribute to exceptions is the subject of that issue

[issue614557] LookupError etc. need API to get the key

2010-08-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: belopolsky -> ___ Python tracker <http://bugs.python.org/issue614557> ___ ___ Python-bugs-list mailing list Un

[issue9079] Make gettimeofday available in time module

2010-08-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Updated the patch to reflect recent datetimemodule.c renaming to _datetimemodule.c. No other changes between issue9079b.diff and issue9079c.diff. I am going to commit issue9079c.diff soon unless someone wants more time to review. -- Added

[issue9079] Make gettimeofday available in time module

2010-08-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed issue9079c.diff as r83744. This commit does not provide time.gettimeofday() and therefore does not close the issue. -- keywords: -needs review, patch stage: commit review -> needs patch ___ Pyt

[issue9315] The trace module lacks unit tests

2010-08-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Eli, Are you still working on this? Please note that Georg committed "beginnings of a trace.py unittest" in r83527, so your tests will need to be merged with his. -- nosy: +georg.brandl ___ Pyth

[issue9315] The trace module lacks unit tests

2010-08-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Aug 5, 2010 at 2:04 PM, Eli Bendersky wrote: .. > Georg, > > Are you having plans for writing comprehensive tests for the module, or is > this just a placeholder? I think I can answer for Georg (subject to being corrected, of cours

[issue9527] Add aware local time support to datetime module

2010-08-05 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : See python-dev post for motivation. http://mail.python.org/pipermail/python-dev/2010-August/102842.html I am attaching a patch implementing the proposed method in datetime.py. I will also paste the code below. Note that this is only prototype

[issue2736] datetime needs an "epoch" method

2010-08-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- superseder: -> Add aware local time support to datetime module ___ Python tracker <http://bugs.python.org/issue2736> ___ _

[issue1647654] No obvious and correct way to get the time zone offset

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

[issue9527] Add aware local time support to datetime module

2010-08-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Merging nosy lists from issues #1647654 and #2736. If datetime.localtime() is implemented, I argue that the features requested in these two issues will become unnecessary. -- nosy: +Neil Muller, amaury.forgeotdarc, andersjm, catlee

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

2010-08-05 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : The original RFE at issue 7989 was: """ After discussion on numerous issues, python-dev, and here at the PyCon sprints, it seems to be a good idea to move timemodule.c to _timemodule.c and convert as much as possible into pure Python.

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

2010-08-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Aug 6, 2010 at 3:44 AM, Marc-Andre Lemburg wrote: .. > Why are you calling the ticket "*Add* pure Python implementation of time > module to CPython" when you appear to be after *replacing* the C > implementation of the time m

[issue9315] The trace module lacks unit tests

2010-08-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Comments on issue9315.27-maint.5.patch: 1. I think you forgot to svn add Lib/test/__init__.py. 2. Instead of "import tracedmodules.testmod", please use something like "from test.tracedmodules import testmod". There is no need to u

[issue9264] trace.py documentation is incomplete

2010-08-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The fixed up version is just r83549. It may merge cleanly with py3k - I believe doc changes are trivial if any between 2.6 and 3.x. I would like this to go through another round of reviews without release calendar pressure. I would like to see some

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

2010-08-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Reopening because I think this fix is responsible for a new problem: $ ./python.exe -m trace -C. -s -c Lib/test/regrtest.py Traceback (most recent call last): ... File "Lib/test/regrtest.py", line 1458, in assert __file__ == os.pa

[issue8685] set(range(100000)).difference(set()) is slow

2010-08-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Andrew, This issue is somewhat similar to issue8425. I may be reading too much into the "priority" field, but it looks like Raymond would like to review #8425 first. You can help by commenting on how the two issues relate to each other.

[issue8834] Define order of Misc/ACKS entries

2010-08-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in release27-maint branch in r83893. I am not sure this belongs in 2.6 and there is a small practical problem with the merge due to Latin-1 encoding used in the 2.6 version. I am also not sure whether keeping separate 2.x and 3.x versions

[issue8834] Define order of Misc/ACKS entries

2010-08-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Aug 9, 2010 at 2:16 PM, Terry J. Reedy wrote: .. > I am surprised that there are separate lists. I thought there was just one > which distributions grabbed when made. I don't think this is intentional. More likely com

[issue665761] reduce() masks exception

2010-08-09 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file18453/issue665761-release27.diff ___ Python tracker <http://bugs.python.org/issue665761> ___ ___

[issue8834] Define order of Misc/ACKS entries

2010-08-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r83937 (py3k) and r83938 (release31-maint). The py3k version is now a superset of the lists in the maintenance branches. I don't want to generate any more commit traffic by bringing all branches in sync. I'll leave it t

[issue28856] %b format for bytes does not support objects that follow the buffer protocol

2016-12-01 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: Python 3.7.0a0 (default:be70d64bbf88, Dec 1 2016, 21:21:25) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>

[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2016-12-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I think we should just clip the negative lower probe value to 0 on Windows before passing it to local(). Also, if we still care about platforms with 32-bit time_t, we should check for over/under flow *before* calling local

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: Consider the following code: $ cat bug.py from array import array class C(array): def __new__(cls): return array.__new__(cls, 'B', b'abc') def __index__(self): raise TypeError x = C() print(bytes(x)) It wo

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: My test code may seem contrived, but numpy arrays exhibit similar behavior: >>> a = numpy.array([2, 2]) >>> bytes(a) Traceback (most recent call last): File "", line 1, in TypeError: only integer arrays with one element

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't think we should put too much effort into preserving numpy behavior. Consider this python 3.5 session: >>> import numpy >>> a = numpy.array([1]) >>> bytes(a) __main__:1: VisibleDeprecationWarning: converting an

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue29159> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Also relevant: * #20895 - Add bytes.empty_buffer and deprecate bytes(17) for the same purpose * PEP 467 - Minor API improvements for binary sequences -- ___ Python tracker <http://bugs.python.

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Inada, Can you explain what your patch does? I don't understand why you single out the OverflowError. When is __index__ expected to raise it? >>> (2**

[issue29159] Regression in bytes constructor

2017-01-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: @inada.naoki Sorry, I still don't understand the role of OverflowError. With respect to my earlier suggestion that buffer protocol should have priority over __index__, note that the documentation implies the same order: >>> help(bytes

[issue29159] Regression in bytes constructor

2017-01-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On the other hand, the documentation for the bytearray constructor [1] lists integer argument first. [1]: https://docs.python.org/3/library/functions.html#bytearray -- ___ Python tracker <h

[issue28130] Document that time.tzset updates time module globals

2017-01-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in ec3b08b361c0. Thanks, Greg. Leaving open until 2.7 docs are fixed as well. -- resolution: -> fixed stage: -> resolved versions: +Python 2.7 -Python 3.6 ___ Python tracker

<    26   27   28   29   30   31   32   33   34   35   >