[issue15848] PEP 3121, 384 Refactoring applied to xxsubtype module

2012-09-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like your patch will result in reference leaks if type creation fails. I think you should add Py_DECREF(m) before error returns. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15873] "datetime" cannot parse ISO 8601 dates and times

2012-09-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sep 9, 2012, at 8:15 AM, Roy Smith wrote: > We need to define the scope of what input strings will be accepted. Since it is easier to widen the domain of acceptable arguments than to narrow it in the future, I would say let's start by accep

[issue15873] "datetime" cannot parse ISO 8601 dates and times

2012-09-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > I realize that while that is certainly an absolute lower bound, > it's almost certainly not sufficient. The most common use case > I see on a daily basis is parsing strings that look like > "2012-09-07T23:59:59+00:00". Thi

[issue15873] "datetime" cannot parse ISO 8601 dates and times

2012-09-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > For what parts of ISO 8601 to accept, there's a standard: RFC3339 This is almost indistinguishable from the idea of accepting .isoformat() and str() results. From what I see the only difference is that 't' is accepted for date/tim

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Applied to 3.2 and 3.3. Thanks for the patch! Leaving it open pending 2.7 commit. -- resolution: -> fixed stage: commit review -> committed/rejected ___ Python tracker <http://bugs.python.org/i

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

2012-09-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: For some reason there are no review links, so I'll review in this message. Include/datetime.h +typedef struct { .. +} _datetimemodulestate; Names exposed in public headers (datetime.h is a public header) should start with Py or _Py. Other offe

[issue15695] Correct __sizeof__ support for StgDict

2012-09-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: What is the point of providing a __sizeof__ method to a purely internal type? I don't think it is possible to expose StgDict at the python level. It is always hidden behind a mapping proxy. Furthemore, StgDict is only used inside type objects an

[issue15725] PyType_FromSpecWithBases bugfix

2012-09-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Why is this a problem? ISTM all that is happening is that null tp_base is set to null if Py_tp_base slot is specified as null. If this is somehow a problem - the user should not specify Py_tp_base slot. -- nosy: +belopolsky

[issue15727] PyType_FromSpecWithBases tp_new bugfix

2012-09-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Can you give an example of the situation that you described? Perhaps you encountered it while refactoring some particular extension module. Which? In your patch new code is commented out. PySpec_New() is not a good name. It should be something like

[issue15873] "datetime" cannot parse ISO 8601 dates and times

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

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

2012-09-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would like to split this issue to separate PEP 3121 changes from PEP 384. PEP 3121 state cleanup implementation is clearly an improvement "from a resource management point of view." On the other hand, I don't see much benefit for the

[issue15941] Time module: effect of time.timezone change

2012-09-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Isn't this a duplicate of issue 8810? -- ___ Python tracker <http://bugs.python.org/issue15941> ___ ___ Python-bugs-l

[issue15941] Time module: effect of time.timezone change

2012-09-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I've read this more carefully and I now understand the issue. Indeed, setting time.timezone or time.altzone has no effect on say time.strftime('%z'). I think this should be documented and the doc should refer to time.tzset() for a prope

[issue15941] Time module: effect of time.timezone change

2012-09-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Setting this attribute has no effect. Strictly speaking, setting this attribute has the effect of changing the value of this attribute. I cannot come up with a better wording at this hour, but I would say something about it being "information

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: ronaldoussoren -> belopolsky ___ Python tracker <http://bugs.python.org/issue15973> ___ ___ Python-bugs-list mai

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I cannot reproduce on a Mac with py3k tip. Python 3.3.0rc2+ (default:19c74cadea95, Sep 19 2012, 14:39:07) [GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.61)] on darwin Type "help", "copyright", "credits" or

[issue15975] Allow multiplying timedelta by Decimal

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is similar to issue 14262. If we decide that timedelta should play nice with Decimal, I would like to consider all related features. -- versions: -Python 3.3 ___ Python tracker <http://bugs.python.

[issue15975] Allow multiplying timedelta by Decimal

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: In fact, this is a near-duplicate of #14262 becaus instead of >>> decimal.Decimal('0.1')*datetime.timedelta(seconds=3) one can always write >>> datetime.timedelta(seco

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Mark wrote in his comment on issue 15975: > we're looking at significant extra code to implement > Decimal * timedelta Not necessarily. I will only support adding this feature if it can be done without making datetime know about Decimal.

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Sep 19, 2012 at 3:09 PM, Ram Rachum wrote: > One example is decimal fields on Django, used for dollar amounts. .. and since time is money and money is time we should support easy conversion between the two. :-) -- n

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Sep 19, 2012 at 3:24 PM, Ram Rachum wrote: > I hope this was intended as a joke. If this was an actual criticism, let me > know so > I could explain why it makes sense. It was both. Yes, any use cases will be helpful. Timedelta is

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Sep 19, 2012 at 4:32 PM, Ram Rachum wrote: > But that number, 1.15, is stored in a Django decimal field. My criticism was towards the idea that one may need to multiply timedelta by a dollar amount or convert a dollar amount to a timede

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sep 19, 2012, at 5:36 PM, Ram Rachum wrote: > Why would we use float to represent the ratio of the bonus to the client? Because float is the builtin type that Python provides to represent such quantities. > Why would we risk imprecision ther

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I think the following simple patch should do the trick. I'll add some tests and commit. Should this get in 3.3.0? diff -r 19c74cadea95 Modules/_datetimemodule.c --- a/Modules/_datetimemodule.c Wed Sep 19 08:25:01 2012 +0300 +++ b/Mo

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > What about datetime subclasses? Do you mean timezone subclasses? Timezone type is not subclassable, but we should probably support comparison with any tzinfo subclass. I'll add this logic, but arguably that would be a new

[issue15973] Segmentation fault on timezone comparison

2012-09-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Alexander, did you send a contributor agreement? At least twice. :-) -- keywords: +patch priority: normal -> high stage: needs patch -> commit review Added file: http://bugs.python.org/file27234/issue1

[issue15973] Segmentation fault on timezone comparison

2012-09-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Leeaving the issue open in case it will go to 3.3.0. Reassigning to the RM. -- assignee: belopolsky -> georg.brandl resolution: -> fixed stage: commit review -> committed/rejected ___ Python track

[issue9650] format codes in time.strptime docstrings

2012-10-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 3.4 -Python 3.3 ___ Python tracker <http://bugs.python.o

[issue9650] format codes in time.strptime docstrings

2012-10-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Christian's or rather Skip's idea is covered by Issue 3173. This was discussed several times on python-dev. -- ___ Python tracker <http://bugs.python.

[issue16243] Regression in inspect module

2012-10-15 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: In Python 3.3.0 and 3.2.3: >>> from inspect import * >>> def f(a,b):pass ... >>> formatargspec(getargspec(f)) Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.frame

[issue16243] Regression in inspect module

2012-10-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: My bad, but I think documentation can be improved by adding an example. -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python type: behavior -> enhancement versions: -Python 3.2, Pyth

[issue6478] time.tzset does not reset _strptime's locale time cache

2012-10-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The patch looks good, but I have a few comments on the test: 1. Does it work on Windows? It seems to rely on Olson's TZ names. 2. Please use @run_with_tz decorator. -- ___ Python tracker

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

2014-04-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Is this documentation still valid? +.. staticmethod:: date.strptime(date_string, format) + + Return a :class:`date` corresponding to *date_string*, parsed according to + *format*. This is equivalent to ``date(*(time.strptime(date_string, + format

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

2014-04-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: If datetime.date.strptime(date_string, format) validates format, then it is *not* equivalent to date(*(time.strptime(date_string, format)[0:3])), is it? -- ___ Python tracker <http://bugs.python.

[issue21176] Implement matrix multiplication operator (PEP 465)

2014-04-07 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: [Nathaniel Smith at numpy-discussion] Guido just formally accepted PEP 465: https://mail.python.org/pipermail/python-dev/2014-April/133819.html http://legacy.python.org/dev/peps/pep-0465/#implementation-details Yay. The next step is to implement

[issue21176] Implement matrix multiplication operator (PEP 465)

2014-04-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I've got to the point where I can do >>> import ast >>> ast.dump(ast.parse('a @ b')) "Module(body=[Expr(value=BinOp(left=Name(id='a', ctx=Load()), op=MatMult(), right=Name(id='b', ctx=Loa

[issue21176] Implement matrix multiplication operator (PEP 465)

2014-04-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Wow! That was quick. And I am still fighting with bitbucket. Maybe I should stop duplicating the effort at this point. -- ___ Python tracker <http://bugs.python.org/issue21

[issue21176] Implement matrix multiplication operator (PEP 465)

2014-04-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Thanks for stepping in. From a quick look at your patch I don't see anything that I would do much differently. I noticed some whitespace issues in Include/token.h: -#define AT 49 -#define RARROW 50 -#define ELLIPSIS

[issue21176] Implement matrix multiplication operator (PEP 465)

2014-04-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: + .. versionadded:: 3.4 Are you planning to use the time machine? :-) -- ___ Python tracker <http://bugs.python.org/issue21

[issue19414] iter(ordered_dict) yields keys not in dict in some circumstances

2014-04-12 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue19414> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21221] Minor struct_time documentation bug

2014-05-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > .. 0 when it is not. -1 indicates that .. It does not read well when the sentence starts with a number. Consider rephrasing as "The value of -1 .." or something like that. -- ___ Python t

[issue11313] Speed up default encode()/decode()

2012-11-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't think a comment explaining that default encoding is utf-8 in python 3.x will improve readability of this code. if (encoding == NULL) return PyUnicode_DecodeUTF8(s, size, errors); seems quite self-explan

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2012-11-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Is it practical to implement GPS time as datetime given that we don't have support for leap seconds? -- ___ Python tracker <http://bugs.python.org/i

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

2012-11-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Juarez, Are you planning to implement format validation as you described in msg165882? Without that, date.strptime() is not very useful because it is almost equivalent to datetime.strptime().date

[issue6478] time.tzset does not reset _strptime's locale time cache

2012-11-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue6478_v2.patch looks good to me. There is a long line in _strptime.py which I will fix before committing. -- stage: test needed -> commit review versions: -Python 3.2 ___ Python tracker &l

[issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash.

2012-11-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I recall a discussion in which it was argued that "look before you leap"-style argument checking that we implemented in py3k was a feature and backporting it to 2.x could potentially break code running on platforms with promiscuous (and poss

[issue16818] Couple of mistakes in PEP 431

2013-01-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue16818> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16837] Number ABC can be instantiated

2013-01-01 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: According to the reference manual, "None of the types defined in [numbers] module can be instantiated." However, >>> from numbers import * >>> Number() This can probably be fixed by making Number.__hash__ an abstract

[issue16837] Number ABC can be instantiated

2013-01-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch fixes the issue and passes regression tests, so most likely the ability to instantiate Number is not an intentional feature. "pass" should probably be replaced with a meaningful docstring, but I would like to hear from others

[issue10572] Move test sub-packages to Lib/test

2013-01-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: ctypes/tests is within my area of interests and may prove to be one of the harder pieces. I'll try to move it and report the results. I have not worked with the rest, so unless it is truly trivial this will have to wait for another volu

[issue2267] datetime.datetime operator methods are not subclass-friendly

2013-01-12 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> wont fix status: open -> closed ___ Python tracker <http://bugs.python.org/issue2267> ___ ___ Pyth

[issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash.

2013-02-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Benjamin, I am assigning this to you because 2.7.4 release is probably the last chance to do something about this behavior in 2.7 series. I am tentatively resolving this as "won't fix." In 3.x, we decided that well defined behavior is

[issue19065] sqlite3 timestamp adapter chokes on timezones

2013-09-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Sounds like a reasonable request, but the proposed code does not seem to work for the Eastern hemisphere (negative tz offsets.) I am not very familiar with sqlite module. What timestamp format does it use? Isn't it some varian of ISO 3339? See

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2013-09-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: See also #5907. -- ___ Python tracker <http://bugs.python.org/issue1820> ___ ___ Python-bugs-list mailing list Unsub

[issue1507011] Use a set to keep interned strings

2013-10-09 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- superseder: -> Use a set for interned strings ___ Python tracker <http://bugs.python.org/issue1507011> ___ ___ Python-

[issue19187] Use a set for interned strings

2013-10-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This exact issue was discussed in #19187 and #7224 many years ago. -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue19

[issue19187] Use a set for interned strings

2013-10-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The first reference above should have been to #1507011. -- ___ Python tracker <http://bugs.python.org/issue19187> ___ ___

[issue19187] Use a set for interned strings

2013-10-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > In embedded systems, every byte of memory counts It is not just embedded systems. The range 192 KB to 1.5 MB is where typical L2 cache sizes are these days. I would expect that the intern dictionary is accessed very often and much more often t

[issue19266] Rename contextlib.ignore to contextlib.suppress

2013-10-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +Add context manager for the "try: ... except: pass" pattern ___ Python tracker <http://bugs.python.o

[issue15806] Add context manager for the "try: ... except: pass" pattern

2013-10-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- superseder: -> Rename contextlib.ignore to contextlib.suppress ___ Python tracker <http://bugs.python.org/issu

[issue19266] Rename contextlib.ignore to contextlib.suppress

2013-10-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Please give some weight to the fact the ignore() was > checked in for seven months, ... +1 -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/i

[issue19266] Rename contextlib.ignore to contextlib.suppress

2013-10-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Catch would be fine with me :) Both "catch" and "trap" have the same problem in my view: you don't get to eat what you have caught (or trapped). :-) > Please note that someone *reading the thread* on python-dev > m

[issue19266] Rename contextlib.ignore to contextlib.suppress

2013-10-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Feel free to ignore() me if it helps to close this debate. English is not my native language and my understanding may not match that of the majority of users. Note, however, that this debate might not even have started if not for a change s/ignored

[issue19265] Increased test coverage for datetime pickling

2013-10-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I guess the extra coverage is in "if getstate" branch of class tzinfo: ... def __reduce__(self): getinitargs = getattr(self, "__getinitargs__", None) if getinitargs: args = getinitargs() el

[issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year

2013-10-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > what's the reason for accepting the time.strptime() > version as a bug, but not datetime.datetime.strptime()? In case of time.strptime(), we have an option of returning (1900, 2, 29, ..) which while not being a valid date, is a valid

[issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time

2013-11-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I cannot reproduce this and I suspect that the problem shows up only in certain times. I believe this is related to the long-standing issue that was fixed in 3.3. See issue 1667546. In Python prior to 3.3, time_struct did not store timezone

[issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time

2013-11-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > The documentation for time.strftime(format[, t]) reads: > "If t is not provided, the current time as returned by localtime() is used" > but apparently there must be something extra going on under the hood. Yes, the C implementati

[issue19475] Add microsecond flag to datetime isoformat()

2013-11-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue19475> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19475] Add microsecond flag to datetime isoformat()

2013-11-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: +1 on adding an option to isoformat(). We already have an optional argument, so the symmetry with __str__ is not complete. To make this option more useful, rather than implementing always_emit_microseconds=False flag, I would add a keyword argument

[issue19475] Add microsecond flag to datetime isoformat()

2013-11-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: +1 on all Victor's points. I like 'resolution' because this is the term that datetime module uses already: >>> from datetime import * >>> datetime.resolution datetime.timedelta(0, 0, 1) There is a slight chance of conf

[issue19475] Add microsecond flag to datetime isoformat()

2013-11-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: MAL: Have you thought about the rounding/truncation issues associated with not showing microseconds ? I believe it has to be the truncation. Rounding is better left to the user code where it can be done either using timedelta arithmetics or at the time

[issue19475] Add microsecond flag to datetime isoformat()

2013-11-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am afraid that the rounding issues may kill this proposal. Can we start with something simple? For example, we can start with show=None keyword argument and allow a single value 'microseconds' (or 'us'). This will solve the i

[issue12750] datetime.strftime('%s') should respect tzinfo

2014-06-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would like to hear from others on this feature. One concern that I have is whether it is wise to truncate the fractional seconds part in '%s'. Also, if we support '%s' in strftime we should probably support it in strptime as we

[issue12750] datetime.strftime('%s') should respect tzinfo

2014-06-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > It is not clear what the returned value for %s strptime should be: I would start conservatively and require %z to be used with %s. In this case, we can easily produce aware datetime objects. I suspect that in the absence of %z, the most useful opt

[issue12750] datetime.strftime('%s') should respect tzinfo

2014-06-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On the second thought, I don't think accepting this should be contingent on any decision with respect to strptime. -- assignee: -> belopolsky stage: needs patch -> commit review ___ Python tra

[issue12750] datetime.strftime('%s') should respect tzinfo

2014-06-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > rounding problem fixed with math.floor Can you explain why math.floor rather than builtin round is the correct function to use? -- ___ Python tracker <http://bugs.python.org/issu

[issue13277] tzinfo subclasses information

2014-06-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would say this is a doc issue. There are some tzinfo algorithms that depend on utcoffset(dt)-dst(dt) being invariant, but this is the part of datetime library that I have never fully understood. What I do understand is that conversion from local time

[issue12750] datetime.strftime('%s') should respect tzinfo

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is the simpler demonstration of the "floor" behavior on Linux: >>> from datetime import datetime >>> datetime.fromtimestamp(-0.1).strftime('%s') '-1' >>> datetime.fromtimestamp(-1.1).strftim

[issue12750] datetime.strftime('%s') should respect tzinfo

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Could you, please add tests for non-fixed offset timezones? There are several defined in datetimetester.py already. -- versions: +Python 3.5 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue12

[issue12750] datetime.strftime('%s') should respect tzinfo

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The patch should update documentation. See https://docs.python.org/3.5/library/datetime.html#strftime-and-strptime-behavior -- ___ Python tracker <http://bugs.python.org/issue12

[issue12750] datetime.strftime('%s') should respect tzinfo

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: +t = datetime(1969, 1, 1, 0,0,0, 60, tzinfo=timezone.utc) Please add spaces after commas. -- ___ Python tracker <http://bugs.python.org/issue12

[issue13413] time.daylight incorrect behavior in linux glibc

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I think this is out-of-date. On Mac OS X, I get ``` $ python3 -V Python 3.4.1 $ TZ=Europe/Moscow python3 -c "import time; print(time.daylight)" 0 ``` I'll check on Linux now ... -- ___ Python

[issue13413] time.daylight incorrect behavior in linux glibc

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Same result on a freshly compiled Python 3.4.1 (default, Jun 29 2014, 15:26:46) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux $ TZ=Europe/Moscow ~/Apps/bin/python3 -c "import time; print(time.daylight)" 0 I suspect that the problem was

[issue13413] time.daylight incorrect behavior in linux glibc

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > But python detect daylight flag as differences between January and July > localtime. This is the best we can do because time.daylight is a constant and this does not work in locations like Moscow where daylight rules were adopted ~ 30 years a

[issue13413] time.daylight incorrect behavior in linux glibc

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I suspect there will be another period soon when time.daylight logic will break after Europe/Moscow goes back to winter time (hopefully for good). There is no solution of this issue within constraints of the time module. See issue9527 for how it was

[issue9051] Improve pickle format for aware datetime instances

2014-06-29 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +alexandre.vassalotti, haypo, pitrou ___ Python tracker <http://bugs.python.org/issue9051> ___ ___ Python-bugs-list m

[issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0

2014-06-29 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +lemburg ___ Python tracker <http://bugs.python.org/issue9004> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Reclassifying this as a doc issue. -- components: +Documentation -Extension Modules stage: test needed -> needs patch versions: +Python 3.5 -Python 3.3 ___ Python tracker <http://bugs.python.org/iss

[issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0

2014-06-29 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- keywords: +easy ___ Python tracker <http://bugs.python.org/issue9004> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: David, Is there anything left to do here that is not covered by issue 11024? -- ___ Python tracker <http://bugs.python.org/issue10

[issue1062277] Pickle breakage with reduction of recursive structures

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Problem "B" has been resolved, but problem "A" is still there. Python 3.4.1 (default, Jun 29 2014, 15:26:46) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux Type "help", "copyright", "credits" or "

[issue9860] Building python outside of source directory fails

2014-06-29 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker <http://bugs.python.o

[issue10541] regrtest.py -T broken

2014-06-29 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- versions: +Python 3.5 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue10541> ___ ___ Python-bugs-list mailin

[issue10541] regrtest.py -T broken

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

[issue10541] regrtest.py -T broken

2014-06-29 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue10541> ___ ___ Python-bugs-

[issue20858] Enhancements/fixes to pure-python datetime module

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Brian, I would like to apply your changes for 3.5. Do you have any updates? -- stage: patch review -> commit review versions: +Python 3.5 -Python 3.3, Python 3.4 ___ Python tracker <http://bugs.pyth

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

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would like to bring this issue to some conclusion. Here is the summary: Pro: datetime.time.now() is shorter than datetime.datetime.now().time() Cons: 1. date, time = datetime.date.today(), datetime.time.now() is attractive, but wrong. 2

[issue1812] doctest _load_testfile function -- newline handling seems incorrect

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

[issue3173] external strftime for Python?

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

[issue10446] pydoc3 links to 2.x library reference

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: MODULE DOCS section is no longer present in pydoc generated pages. -- resolution: accepted -> out of date status: open -> closed ___ Python tracker <http://bugs.python.org/i

<    16   17   18   19   20   21   22   23   24   25   >