[issue9256] plistlib should create non-naïve datetime objects

2012-06-06 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +r.david.murray ___ Python tracker <http://bugs.python.org/issue9256> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2012-06-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Closing for the lack of interest. Proposed time.now() is already available as datetime.now().time(). No use case justifying any improvement in this area was presented. -- resolution: postponed -> wont fix status: open ->

[issue14908] datetime.datetime should have a timestamp() method

2012-06-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Updated patch adds a few more tests and improves error handling in C implementation. -- nosy: +haypo Added file: http://bugs.python.org/file25858/issue14908.diff ___ Python tracker <http://bugs.python.

[issue14908] datetime.datetime should have a timestamp() method

2012-06-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file25854/issue14908.diff ___ Python tracker <http://bugs.python.org/issue14908> ___ ___ Python-bug

[issue11823] disassembly needs argument counts on calls with keyword args

2012-06-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Bumping priority as a reminder to get this in. -- priority: normal -> high ___ Python tracker <http://bugs.python.org/issu

[issue11823] disassembly needs argument counts on calls with keyword args

2012-06-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: needs patch -> committed/rejected type: behavior -> enhancement versions: -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/i

[issue11823] disassembly needs argument counts on calls with keyword args

2012-06-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue11823> ___ ___ Python-bugs-list mailing list Un

[issue14908] datetime.datetime should have a timestamp() method

2012-06-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Added ReST documentation. Will commit soon. Merging nosy list from issue 2736. -- nosy: +Jay.Taylor, Neil Muller, amaury.forgeotdarc, andersjm, catlee, davidfraser, erik.stephens, guettli, hodgestar, jribbens, mark.dickinson, ping, pitrou

[issue14908] datetime.datetime should have a timestamp() method

2012-06-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file25858/issue14908.diff ___ Python tracker <http://bugs.python.org/issue14908> ___ ___ Python-bug

[issue14908] datetime.datetime should have a timestamp() method

2012-06-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I associated my commit with issue 2736 by mistake, but it is probably a good thing because that issue contains a longer history. Closing this as a duplicate. -- resolution: -> duplicate stage: commit review -> committed/rejected status

[issue2736] datetime needs an "epoch" method

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

[issue15034] tutorial should use best practices in user defined exceptions section

2012-06-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- title: tutorial should use best practices in user defined execeptions section -> tutorial should use best practices in user defined exceptions section ___ Python tracker <http://bugs.python.org/issu

[issue15034] tutorial should use best practices in user defined exceptions section

2012-06-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue15034> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9527] Add aware local time support to datetime module

2012-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This was originally posted on python-dev, but I hope reposting it here will make this issue easier to navigate. """ With addition of fixed offset timezone class and the timezone.utc instance [0], it is easy to get UTC time as an aware da

[issue1667546] Time zone-capable variant of time.localtime

2012-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Reopening. given the uncertainty with #9527, this issue may result in getting the TZ-aware local time support in stdlib sooner. -- resolution: duplicate -> stage: committed/rejected -> patch review status: closed -> open versions: +P

[issue9527] Add aware local time support to datetime module

2012-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Two objections have been raised to the proposed datetime.localtime() function: 1. It offers the third subtly different way to obtain current time in datetime module. The first two being provided by datetime.now() and datetime.today(). 2. C library

[issue9527] Add aware local time support to datetime module

2012-06-11 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file25940/testtz.py ___ Python tracker <http://bugs.python.org/issue9527> ___ ___ Python-bugs-list m

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2012-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: David, Isn't the requested feature now implemented as email.utils.format_datetime()? Also, what is the difference between RFC 3339 format and the one provided by datetime.isoformat? >>> print(datetime(2000,1,1, tzinfo=timezone.utc

[issue13556] When tzinfo.utcoffset is out-of-bounds, the exception message is misleading

2012-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Does anyone still care about this issue? I think the error message in 3.2 is good enough and fixing this in 2.x is not worth the trouble. I am inclined to close this as "won't fix". -- versions: +Python

[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2012-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Bumping priority to get this in before beta. -- priority: normal -> high ___ Python tracker <http://bugs.python.org/issue1

[issue1667546] Time zone-capable variant of time.localtime

2012-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I've simplified Paul's patch by removing timegm and mktimetz functions. Also, platforms that don't support tm_zone are unaffected. -- stage: patch review -> commit review Added file: http://bugs.python.org/file26002

[issue1667546] Time zone-capable variant of time.localtime

2012-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Jun 13, 2012 at 7:08 PM, Paul Boddie wrote: > I think you may have forgotten to remove docstring references to those > functions. Good catch. BTW, did you write the additional tests for strptime? This is the only thing that I want to add

[issue1667546] Time zone-capable variant of time.localtime

2012-06-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue15006] Allow equality comparison between naive and aware datetime objects

2012-06-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Added documentation and simplified changes to python implementation. I think this can go to 3.3. -- versions: +Python 3.3 -Python 3.4 Added file: http://bugs.python.org/file26023/issue15006a.diff ___ Python

[issue15006] Allow equality comparison between naive and aware datetime objects

2012-06-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue15006> ___ ___ Python-bugs-list mailing list Un

[issue15006] Allow equality comparison between naive and aware datetime objects

2012-06-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- keywords: -needs review, patch nosy: -Alexander.Belopolsky resolution: -> fixed stage: commit review -> committed/rejected ___ Python tracker <http://bugs.python.org/i

[issue13825] Datetime failing while reading active directory time attribute

2012-06-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue13825> ___ ___ Python-bugs-list mailing list Un

[issue3173] external strftime for Python?

2012-06-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: IANA is now distributing Olson's timezone database software which includes an implementation of strftime(): http://www.iana.org/time-zones/repository/releases/tzcode2012b.tar.gz The code was designated as public domain by Arthur David Olson, b

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2012-06-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I have reviewed RFC 3339 and it looks like the following produces a fully compliant timestamp: >>> print(datetime(2000,1,1, tzinfo=timezone.utc).isoformat('T')) 2000-01-01T00:00:00+00:00 I see the following remaining issues: 1. It

[issue9527] Add aware local time support to datetime module

2012-06-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Jun 11, 2012 at 11:18 PM, James Henstridge wrote: > One problem I can see with using a fixed offset > tzinfo for localtime is that it might confuse people > when doing date arithmetic. Yes, this is the issue that I discussed in my fir

[issue9527] Add aware local time support to datetime module

2012-06-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > ... is a well-defined problem which does not have an adequate solution. I meant to say "does not have an adequate solution *in the current datetime module*". I think the enhanced datetime.astimezone() method will solve

[issue14653] Improve mktime_tz to use calendar.timegm instead of time.mktime

2012-06-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > That said, this might be a worthwhile as a bug fix. I think this is a reasonable bug fix. Note that apart from OS-dependent date range, some mktime implementations reportedly don't support tm_isdst values other than -1. --

[issue9527] Add aware local time support to datetime module

2012-06-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch implements astimezone() default in both Python and C. -- stage: -> patch review Added file: http://bugs.python.org/file26062/issue9527.diff ___ Python tracker <http://bugs.python.org/iss

[issue14653] Improve mktime_tz to use calendar.timegm instead of time.mktime

2012-06-21 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2012-06-21 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issue7584> ___ ___ Python-bugs-list mailing list Un

[issue9527] Add aware local time support to datetime module

2012-06-22 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: patch review -> commit review ___ Python tracker <http://bugs.python.org/issue9527> ___ ___ Python-bugs-list mai

[issue9527] Add aware local time support to datetime module

2012-06-22 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue7582] Use ISO timestamp in diff.py

2012-06-22 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue13556] When tzinfo.utcoffset is out-of-bounds, the exception message is misleading

2012-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Fixed in changeset a7237f157625. -- resolution: -> fixed status: open -> closed versions: -Python 2.7 ___ Python tracker <http://bugs.python.org/i

[issue5023] Segfault in datetime.time.strftime("%z")

2012-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Since no one is able to reproduce this crash, I am going to close this issue. -- status: open -> pending ___ Python tracker <http://bugs.python.org/iss

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-06-22 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky ___ Python tracker <http://bugs.python.org/issue10941> ___ ___ Python-bugs-list mailing list Un

[issue9527] Add aware local time support to datetime module

2012-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Working on this. It turns out tm_gmtoff uses the opposite sign to that of timezone in time.h. For more confusion, consider this: $ TZ=EST+5 date +%z -0500 I am rechecking all UTC offset signs. On Fri, Jun 22, 2012 at 3:36 PM, Jesús Cea Avión wrote

[issue665194] datetime-RFC2822 roundtripping

2012-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Most of the localtime() logic is now implemented (correctly) in datetime.astimezone(). Attached patch fixes email.utils.localtime() implementation. -- status: closed -> open Added file: http://bugs.python.org/file26094/issue665194.d

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I updated the fix to take advantage of resolved issue 9527. I also noticed and fixed another bug: Internaldate2tuple was using locale-dependent %b directive for strftime. -- Added file: http://bugs.python.org/file26100/issue10941.diff

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The latest patch belongs to issue 11024. -- ___ Python tracker <http://bugs.python.org/issue10941> ___ ___ Python-bug

[issue665194] datetime-RFC2822 roundtripping

2012-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: David, issue665194.diff patch is a bug fix for localtime(). If you decide to keep localtime(), there is not much of a rush because bug fixes can go in after beta. -- ___ Python tracker <h

[issue15148] shutil.which() docstring could be clearer

2012-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: *file* is correct because shutil.which() is more general than shell which command. (It can be used to find source files on PYTHONPATH, for example.) I think the confusing part is "return the path ... on the path." This can be fixed in reST

[issue15148] shutil.which() docstring could be clearer

2012-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Alexander, can you explain the part about finding a file on PYTHONPATH? I thought about something like this: >>> shutil.which('shutil.py', os.F_OK, ':'.join(sys.path)) '/Users/sasha/Work/python-hg/py3k/Lib/shutil.

[issue15148] shutil.which() docstring could be clearer

2012-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Brian, Did you intend to commit Tools/msi/msi.py in changeset 973b4806f760? -- ___ Python tracker <http://bugs.python.org/issue15

[issue444582] Finding programs in PATH, adding shutil.which

2012-06-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't think the Windows example in the reST documentation is correct: >>> print(shutil.which("python")) 'c:\\python33\\python.exe' It should be either >>> shutil.which("python")

[issue15165] test_email: failure on Windows 64-bit

2012-06-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't have a Win 64 setup, but I think replacing 1970 with say 1990 in the tests should fix the problem. -- nosy: +Alexander.Belopolsky ___ Python tracker <http://bugs.python.org/is

[issue15165] test_email: failure on Windows 64-bit

2012-06-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am surprised that we don't see the same failure on 32-bit windows buildbot. Windows mktime does not support negative time_t in either 32 or 64 bit version: http://msdn.microsoft.com/en-us/library/d1y53h2a(v=vs.110).aspx We are probably just

[issue15165] test_email: failure on Windows

2012-06-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Is this something that has to be fixed during the freeze? The fix is trivial: s/1970/1990/g, but I planned to revisit TZ-dependent tests during the beta period. I think we don't use run_with_tz() enough. It would also be great to make it wo

[issue15443] datetime module has no support for nanoseconds

2012-07-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Jul 25, 2012 at 4:17 AM, Marc-Andre Lemburg wrote: > ... full C double precision for the time part of a timestamp, > which covers nanoseconds just fine. No, it does not: >>> import time >>> t = time.time() >>&g

[issue15577] Real argc and argv in embedded interpreter

2012-08-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue15577> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12834] memoryview.to_bytes() and PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-08-20 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue12834> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14130] memoryview: add multi-dimensional indexing and slicing

2012-08-20 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue14130> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3132] implement PEP 3118 struct changes

2012-08-20 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky -Alexander.Belopolsky ___ Python tracker <http://bugs.python.org/issue3132> ___ ___ Python-bugs-list mailin

[issue665194] datetime-RFC2822 roundtripping

2012-08-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I'll take a look tomorrow morning. (EDT:-) -- ___ Python tracker <http://bugs.python.org/issue665194> ___ ___ Pytho

[issue665194] datetime-RFC2822 roundtripping

2012-08-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I noticed this part: +# We have an aware datetime. Use aware datetime arithmetic to find the +# seconds since the epoch. +delta = dt - datetime.datetime(*time.gmtime(0)[:6], + tzinfo

[issue15750] test_localtime_daylight_false_dst_true raises OverflowError: mktime argument out of range

2012-08-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > So you are saying that if the current timezone is UTC, FreeBSD's mktime > just arbitrarily returns -1 for any time passed to it with the 'guess > the DST flag' value set for is_dst? I don't know about FreeBSD, but I re

[issue665194] datetime-RFC2822 roundtripping

2012-08-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > So since the other tests were passing before, presumably there > is some test that could be added to exercise the bug you were > fixing. Do you remember what that was? Yes, the issue was the one that was mentioned in an XXX comment: in many pl

[issue665194] datetime-RFC2822 roundtripping

2012-08-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Please commit. I'll add the test. On Wed, Aug 22, 2012 at 9:11 PM, R. David Murray wrote: > > R. David Murray added the comment: > > I think restricting the test is fine. If we find a platform-specific bug on > another platfo

[issue665194] datetime-RFC2822 roundtripping

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

[issue665194] datetime-RFC2822 roundtripping

2012-08-22 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue665194> ___ ___ Python-bugs-list mailing list Un

[issue1578643] various datetime methods fail in restricted mode

2012-08-22 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.org/issue1578643> ___ ___ Pyth

[issue3760] PEP 3121 --- PyType_Copy is missing

2012-08-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue3760> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15390] PEP 3121, 384 refactoring applied to datetime module

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

[issue15711] PEP 3121, 384 Refactoring applied to time module

2012-08-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue15711> ___ ___ Python-bugs-lis

[issue15787] PEP 3121 Refactoring

2012-08-26 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: This is a meta-issue to keep track of a global PEP 3121 refactoring effort. Per-module issues will be added as dependencies. Let's move the discussion that is not specific to any particular module here. -- components: Extension Mo

[issue15787] PEP 3121 Refactoring

2012-08-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +PEP 3121, 384 refactoring applied to curses module, PEP 3121, 384 refactoring applied to datetime module, PEP 3121, 384 refactoring applied to dbm module ___ Python tracker <h

[issue15787] PEP 3121 Refactoring

2012-08-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +PEP 3121, 384 refactoring applied to elementtree module, PEP 3121, 384 refactoring applied to gdbm module, PEP 3121, 384 refactoring applied to hashopenssl module, PEP 3121, 384 refactoring applied to lzma module

[issue15787] PEP 3121 Refactoring

2012-08-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +PEP 3121 refactoring applied to audioop module, PEP 3121 refactoring applied to binascii module, PEP 3121 refactoring applied to fpectl module, PEP 3121, 384 Refactoring applied to array module, PEP 3121, 384 Refactoring applied to

[issue15787] PEP 3121 Refactoring

2012-08-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +Add VS CRT redist to the MSI installer, PEP 3121 Refactoring applied to nis module, PEP 3121 refactoring applied to fpetest module, PEP 3121 refactoring applied to pwd module, PEP 3121, 384 Refactoring applied to itertools module

[issue15787] PEP 3121 Refactoring

2012-08-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: -Add VS CRT redist to the MSI installer ___ Python tracker <http://bugs.python.org/issue15787> ___ ___ Pytho

[issue15787] PEP 3121 Refactoring

2012-08-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +PEP 3121, 384 Refactoring applied to decimal module, PEP 3121, 384 Refactoring applied to grp module, PEP 3121, 384 Refactoring applied to ossaudio module, PEP 3121, 384 Refactoring applied to resource module, PEP 3121, 384

[issue15787] PEP 3121 Refactoring

2012-08-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Robin, Perhaps we should start with the "xx" modules: Modules/xxmodule.c and Modules/xxsubtype.c. These modules server as a demonstration of best practices and it is natural to use them to iron out any refactoring issues without any risk t

[issue15787] PEP 3121 Refactoring

2012-08-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +loewis ___ Python tracker <http://bugs.python.org/issue15787> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9650] format codes in time.strptime docstrings

2012-08-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would like to add my +1 to this issue. I suggest adding something like this: """ Commonly used format codes: %Y Year with century as a decimal number. %m Month as a decimal number [01,12]. %d Day of the month as a decima

[issue15817] Misc/gdbinit: Expose command documentation to gdb help

2012-08-29 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: Currently "help user-defined" lists commands defined in Misc/gdbinit without explanations (gdb) help user-defined User-defined commands. The commands in this class are those defined by the user. Use the "define" command to define

[issue15814] memoryview: equality-hash invariant

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

[issue15805] Add stdout redirection tool to contextlib

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

[issue15821] Improve docs for PyMemoryView_FromBuffer()

2012-08-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Having been bitten by an indirect buffer bug in 2.7, I decided to write some tests for 3.3. I added an objview() function to _testbuffer module that creates an indirect view for nested tuples. I have not written unit tests yet, so I'll attach a

[issue15821] Improve docs for PyMemoryView_FromBuffer()

2012-08-30 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file27060/test_indirect.py ___ Python tracker <http://bugs.python.org/issue15821> ___ ___ Python-bug

[issue15821] Improve docs for PyMemoryView_FromBuffer()

2012-08-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Your test case seems to pass here. :) Was it supposed to crash? No, I worked real hard to make it pass. :-) I think it would crash 2.7 and 3.2, but I have not tried. I also suspect it leaks memory. Do you think this is something that we sho

[issue15821] Improve docs for PyMemoryView_FromBuffer()

2012-08-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > PyMemoryViewObject already is a PyVarObject with its own shape, > strides and suboffsets. You are right. I was mistakenly looking at 3.2.3 sources. It looks like there are a lot of undocumented change

[issue15821] Improve docs for PyMemoryView_FromBuffer()

2012-08-30 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file27061/_testbuffer.diff ___ Python tracker <http://bugs.python.org/issue15821> ___ ___ Python-bug

[issue15821] Improve docs for PyMemoryView_FromBuffer()

2012-08-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I've updated test_indirect.py to print all memoryview fields and cleaned up the _testbuffer patch a little. Note this code that is needed to prevent a memory leak: +/* PyMemoryView_FromBuffer ignores info.obj. Add it explicitely. */ +if

[issue15821] Improve docs for PyMemoryView_FromBuffer()

2012-08-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Aug 30, 2012 at 1:22 PM, Stefan Krah wrote: > So the topic is reduced to: > > 1) Previous: If non-NULL, steal the view.obj reference with automatic >decrement in PyBuffer_Release(). > New: If non-NULL, tr

[issue15821] Improve docs for PyMemoryView_FromBuffer()

2012-08-30 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file27059/_testbuffer.diff ___ Python tracker <http://bugs.python.org/issue15821> ___ ___ Python-bug

[issue15821] Improve docs for PyMemoryView_FromBuffer()

2012-08-30 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file27060/test_indirect.py ___ Python tracker <http://bugs.python.org/issue15821> ___ ___ Python-bug

[issue15821] PyMemoryView_FromBuffer() behavior change (possible regression)

2012-08-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Aug 31, 2012 at 2:34 PM, Stefan Krah wrote: > With the ManagedBuffer, we could now write a new function that returns > a memoryview with much nicer cleanup facilities. But that doesn't help > here since we're stuck with this

[issue15821] PyMemoryView_FromBuffer() behavior change (possible regression)

2012-08-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Aug 31, 2012 at 3:12 PM, Stefan Krah wrote: > Now I'm puzzled: I thought your goal was to preserve the implicit cleanup > from 3.2, i.e. PyBuffer_Release() is called when the managed buffer is > deallocated. > The issue that I ra

[issue15821] PyMemoryView_FromBuffer() behavior change (possible regression)

2012-08-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is what I think the test case should look like (untested): static PyObject * memoryview_from_buffer_cleanup(PyObject *self, PyObject *noargs) { PyObject *b, *view = NULL; Py_buffer info; Py_ssize_t shape[3] = {2, 2, 3}; Py_ssize_t

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sep 1, 2012, at 10:24 AM, Stefan Krah wrote: > > The definition hash(m) == hash(m.tobytes()) is pretty straightforward. I probably missed something from the early discussion, but doesn't this definition only work for 1d (or 0d) views

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sep 1, 2012, at 11:06 AM, Stefan Krah wrote: > tobytes() is the same as the flattened multi-dimensional list representation > with all elements converted to bytes. This is correct, but why is it desirable to have deliberate hash collisions b

[issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance

2012-09-01 Thread Alexander Konovalenko
New submission from Alexander Konovalenko: Two pieces of the documentation for io.IOBase seem to contradict each other: At http://docs.python.org/library/io.html#io.IOBase: "Note that calling any method (even inquiries) on a closed stream is undefined. Implementations may raise IOError in

[issue15814] memoryview: equality-hash invariant

2012-09-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sep 2, 2012, at 8:44 AM, Stefan Krah wrote: > The totals are +11.5 :) for hashing, +1 for allowing non-contiguous and > -2 for multi-dimensional I have refrained from voting because in my line of work buffers or memoryviews deal with large o

[issue15787] PEP 3121 Refactoring

2012-09-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +PEP 3121, 384 Refactoring applied to xx module, PEP 3121, 384 Refactoring applied to xxsubtype module ___ Python tracker <http://bugs.python.org/issue15

[issue15849] PEP 3121, 384 Refactoring applied to xx module

2012-09-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: xxmodule.c is used as an example in PEP 3121 itself. To the extent the recipe in the PEP is complete, the changes to actual xxmodule.c should follow the text. For example, the text in PEP recommends to leave m_free member of PyModuleDef 0: static

<    18   19   20   21   22   23   24   25   26   27   >