[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2015-09-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: -> needs patch type: -> enhancement ___ Python tracker <http://bugs.python.org/issue24954> ___ ___ Python-bugs-

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Victor, I did not quite understand why you've chosen ROUND_HALF_UP over ROUND_HALF_EVEN, but as long as fromtimestamp() uses the same rounding as timedelta() - I am happy. -- ___ Python tracker

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It would be nice to hear from Mark Dickinson on this. In Python 3, we took a much more systematic approach to rounding than a rather haphazard Python 2. For example, the rounding mode for timedelta(0, float_seconds) is not specified in Python 2, but it

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > By the way, why does Python use ROUND_HALF_EVEN for round()? ROUND_HALF_EVEN does not introduce statistical bias in your floating point data. With this choice a randomly chosen decimal has an equal chance of being rounded up or down. I think one

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is what Wikipedia has to say on the subject: """ Round half to even .. This method treats positive and negative values symmetrically, and is therefore free of sign bias. More importantly, for reasonable distributions of y value

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: .. and here is an unbeatable argument: "this variant of the round-to-nearest method is also called unbiased rounding, convergent rounding, statistician's rounding, **Dutch rounding**, Gaussian rounding, odd–even rounding, or bankers&

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: .. and "[Round half to even] is the default rounding mode used in IEEE 754 computing functions and operators." -- ___ Python tracker <http://bugs.python.o

[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > In every case I got [ValueError] You shouldn't have. I am no Windows expert, but I suspect something is wrong with your use of the command line. Please try it at the Python prompt or put the code in

[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Sorry for a bad guess. John's advise makes much more sense than mine. -- ___ Python tracker <http://bugs.python.org/is

[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: John, There is no doubt that this is a bona fide bug. I was just hoping that someone with a Windows development machine would help figuring out the affected versions. >From the hg history, it looks like the faulty code is present in all versi

[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I will keep the "security" classification, but will not increase the priority. Accepting format strings from untrusted sources is a vulnerability in and by itself and in most cases those strings ar

[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: FWIW, the patch looks good to me, but it needs to be reviewed by a Windows developer. -- components: +Extension Modules ___ Python tracker <http://bugs.python.org/issue24

[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: As far as I know, the practical consequence of "security" classification for the issue is how many affected older versions will be patched. I am keeping that and the 3.2 - 3.5 versions range. The priority may affect whether this will make it

[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > if there's a risk I'm overlooking I'd like to better understand it, > and the relevant Python documentation should be updated. I don't think there is any special risk that you are overlooking other than a documented fact t

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > timestamps aren't random, so "statistical bias" is roughly meaningless in > this context. I agree. I don't think I made any arguments about timestamps specifically other than a consistency with timedeltas. In the later ca

[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Hmm, on Mac OSX "%" and "A%" are valid format strings: >>> time.strftime("%") '%' >>> time.strftime("A%") 'A%' Mark's experiments show that on Windows they are not. What

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > It doesn't matter who's consuming the rounding of a binary > float to decimal microseconds That is true, but what does matter is who is producing the incoming floats. Consider an extreme case of a timer that ticks twice a microsecon

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: You may find it easier to start with a patch for 3.5 which is the only time sensitive task. I'll be happy to review your code in whatever form you find it easier to submit, but I believe in hg it is easier to forward port than to bac

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-09-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Addressed review comments. -- Added file: http://bugs.python.org/file40382/issue22241-2.diff ___ Python tracker <http://bugs.python.org/issue22

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-09-06 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: commit review -> resolved ___ Python tracker <http://bugs.python.org/issue22241> ___ ___

[issue22241] strftime/strptime round trip fails even for UTC datetime object

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

[issue24917] time_strftime() Buffer Over-read

2015-09-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Historically, time and os modules have been considered low level, thin wrappers over system libc functions. Users of these modules are the proverbial "consenting adults" who should understand their power and the associated risks. The place to

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2015-09-06 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- versions: +Python 3.6 -Python 3.4 ___ Python tracker <http://bugs.python.org/issue15873> ___ ___ Python-bugs-list mailin

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Larry> Well, for now I assume it really truly genuinely isn't going in 3.5.0. This is an unfortunate outcome. Larry> I suppose we can debate about 3.4.x and 3.5.1 later It is even more unfortunate that the question of whether this regressio

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Victor> please don't revert this change. I did not suggest reverting the entire commit. The change that affects fromdatetime() is just -us = round(frac * 1e6) +us = int(frac * 1e6) in datetime.py. It is probably more inv

[issue25029] MemoryError in test_strptime

2015-09-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would blame this change: <https://hg.python.org/cpython/rev/c31dad22c80d/#l3.41>. The rest should not have any effect on Linux. -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/i

[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Looks like something related to issue 24917. -- nosy: +JohnLeitch, steve.dower ___ Python tracker <http://bugs.python.org/issue25

[issue25121] python logger can't wrap log file and blows with traceback

2015-09-15 Thread Alexander Belchenko
New submission from Alexander Belchenko: We're using standard logging library for logs. On machine of my colleague there is constantly traceback like this: [11:21:29] PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: '

[issue25121] python logger can't wrap log file and blows with traceback

2015-09-15 Thread Alexander Belchenko
Alexander Belchenko added the comment: PermissionError mentions file name "C:\\Users\\Andrew\\Desktop\\server\\logs\\2015-0 9-09_10-44-03\\2015-09-09_10-44-04-middleman-684.log.1" - but this file does not exist in log directory. There is only "C:\\Users\\Andrew\\Desktop\\serve

[issue25121] python logger can't wrap log file and blows with traceback

2015-09-15 Thread Alexander Belchenko
Alexander Belchenko added the comment: Yes. it's rotating file handler. I'll try to recreate this issue with simpler test application, so I can provide something as example. -- ___ Python tracker <http://bugs.python.o

[issue25121] python logger RotatingFileHandler can't wrap log file and blows with traceback

2015-09-15 Thread Alexander Belchenko
Changes by Alexander Belchenko : -- title: python logger can't wrap log file and blows with traceback -> python logger RotatingFileHandler can't wrap log file and blows with traceback ___ Python tracker <http://bugs.pytho

[issue25121] python logger RotatingFileHandler can't wrap log file and blows with traceback

2015-09-15 Thread Alexander Belchenko
Alexander Belchenko added the comment: I have suspicion about this issue. In my application tornado framework is used. I setup logger for my own code, but use the same logger for tornado, so all messages from tornado itself go into the same log file. As I said earlier it's strange bu

[issue25121] python logger RotatingFileHandler can't wrap log file and blows with traceback

2015-09-15 Thread Alexander Belchenko
Alexander Belchenko added the comment: Update to previous comment. I use the same settings for tornado logger (e.g. filename). logger = logging.getLogger('tornado') setup_logger(logger, log_config) So I have 2 loggers in one application which are trying to write to the sam

[issue25121] python logger RotatingFileHandler can't wrap log file and blows with traceback

2015-09-15 Thread Alexander Belchenko
Alexander Belchenko added the comment: According to documentation on RotateFileHandler "When this file is filled, it is closed and renamed to app.log.1, and if files app.log.1, app.log.2, etc. exist, then they are renamed to app.log.2, app.log.3 etc. respectively." But we have

[issue25121] python logger RotatingFileHandler can't wrap log file and blows with traceback

2015-09-15 Thread Alexander Belchenko
Alexander Belchenko added the comment: Based on my last assumption I'm able to reproduce this issue with simple test attached. If I comment out the line setup_logger(loggerB) The everything works OK. Once this line in - it's traceback. I guess it's fair to say the bug in

[issue22627] Calling timestamp() on a datetime object modifies the timestamp of a different datetime object.

2015-09-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am reopening this issue as an "enhancement" because I would like to revisit it in light of PEP 495. -- assignee: -> belopolsky resolution: not a bug -> status: closed -> open type: behavior -> enhancement versions: +

[issue25150] yt package pip compile/install error

2015-09-17 Thread Alexander Heger
New submission from Alexander Heger: trying to install the yt package, most recent version 3.2.1 on python 3.5.0 using pip pip3 install -U yt error output attached. The same package installs fine with python 3.4.3, same compiler and also build from scratch, so the suspicion is that it is

[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5)

2015-09-17 Thread Alexander Heger
Alexander Heger added the comment: When I just comment out the #include "pyatomic.h" line, python 3.5.0 will no longer compile gcc -pthread -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes-Werror=declaration-after-state

[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5)

2015-09-17 Thread Alexander Heger
Alexander Heger added the comment: if I just include this patch, some modules don't build: (...) gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Ibuild/temp.linux-x86_64-3.5/l

[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5)

2015-09-17 Thread Alexander Heger
Alexander Heger added the comment: So, apparently, more than just one spot needs to be fixed. I also tried just modifying the Python.h after install, but that does not do the trick either. -- ___ Python tracker <http://bugs.python.org/issue25

[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5)

2015-09-20 Thread Alexander Heger
Alexander Heger added the comment: Dear Victor, yes, you patch seems to fix the yt install. Thank you very much! I hope this can be included in 3.5.1. Best wishes, Alexander -- ___ Python tracker <http://bugs.python.org/issue25

[issue8304] time.strftime() and Unicode characters on Windows

2015-09-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Mark, I am no expert on Windows. I believe Victor is most knowledgable in this area. -- ___ Python tracker <http://bugs.python.org/issue8

[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > For stability it is better to use public name 'timezone.utc' instead of > '_utc'. Can you elaborate on the "stability" consideration? I would like to revisit this issue since we will have some changes made to da

[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- versions: +Python 3.6 -Python 3.4 ___ Python tracker <http://bugs.python.org/issue23600> ___ ___ Python-bugs-list mailin

[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am afraid you misunderstand how fromutc() method works. Note that you rarely need to call it directly: use astimezone() method to convert between timezones. -- nosy: +tim.peters ___ Python tracker <h

[issue22798] time.mktime doesn't update time.tzname

2015-09-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Akira, Would issue22798.diff patch address your issue? -- assignee: -> belopolsky resolution: not a bug -> stage: resolved -> patch review Added file: http://bugs.python.org/file40598/issue2

[issue22798] time.mktime doesn't update time.tzname

2015-09-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Is there any platform where mktime resets global tzname but does not provide tm_zone? If not, OP's issue is largely theoretical, but I still like MAL's suggestion of using strftime("%Z&q

[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue23600> ___ ___ Pyth

[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like I introduced this bug ~ 5 years ago when I made a switch from integer minutes offset to an arbitrary timedelta. It's rather amazing that it took so long to discover it. -- ___ Python tr

[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attaching a patch that should fix the issue. -- keywords: +patch stage: needs patch -> commit review versions: +Python 3.4, Python 3.5 Added file: http://bugs.python.org/file40603/issue23600.diff ___ Pyt

[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Thanks, Tim. Now I need to figure out how to commit to multiple branches. This goes to 3.4 through 3.6, right? or just to 3.5 and 3.6. -- components: +Extension Modules -Library (Lib) ___ Python tracker

[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I give up. Somehow my changes conflict with parent: 98335:0d3b64bbc82c user:Serhiy Storchaka date:Sun Sep 27 22:38:33 2015 +0300 summary: Issue #25203: Failed readline.set_completer_delims() no longer left the and my knowledge

[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: OK, I have no idea how I managed to create two commits in 3.4 and 3.5 and loose the NEWS entry in the end. -- ___ Python tracker <http://bugs.python.org/issue23

[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2015-09-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Changing the title to reference PEP 495. -- stage: -> needs patch title: Add local time disambiguation flag to datetime -> Implement PEP 495 (Local Time Disambiguation) ___ Python tracker

[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +tim.peters ___ Python tracker <http://bugs.python.org/issue9051> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > there is a risk that the "_utc" variable can be renamed > and this will break pickle compatibility. I think we will still need to maintain _utc global indefinitely to keep the old pickles readable. On the other hand, it looks

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2015-09-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file40614/issue24773-s3.diff ___ Python tracker <http://bugs.python.org/issue24773> ___ ___ Python-bug

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

2015-09-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: In my PEP 495 work (see issue 24773,) I relaxed the offset checks to allow any integer number of *seconds*. This was necessary to support all timezones in the Olson database. With respect to string representation of such offset, I would like to bring

[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2015-09-29 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky keywords: +easy ___ Python tracker <http://bugs.python.org/issue24954> ___ ___ Python-bugs-lis

[issue10381] Add timezone support to datetime C API

2015-09-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Since issue 24773 (PEP 495 implementation) will touch on CAPI, maybe it is time to implement this as well. -- nosy: +tim.peters versions: +Python 3.6 -Python 3.5 ___ Python tracker <http://bugs.python.

[issue25283] Make tm_gmtoff and tm_zone available on all platforms

2015-09-30 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: See datetime-sig thread [1] for details. [1]: https://mail.python.org/pipermail/datetime-sig/2015-September/000955.html -- assignee: belopolsky messages: 251954 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open

[issue12006] strptime should implement %G, %V and %u directives

2015-09-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Ashley, You don't have to be a committer to review a patch. Given that it is unlikely that any of the committers is an expert on ISO calendar, an external review will be most welcome. Would you complet

[issue12006] strptime should implement %G, %V and %u directives

2015-10-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: My bad. In this case, maybe Erik can review your latest patch? -- ___ Python tracker <http://bugs.python.org/issue12

[issue12006] strptime should implement %G, %V and %u directives

2015-10-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Also please let me know if this is not the proper way to respond to the code > review! I believe Rietveld gives you a "done" button on each reviewer comment. If all you do is to take the reviewer suggestion, you can just press it. Re

[issue7897] Support parametrized tests in unittest

2015-10-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- versions: +Python 3.6 -Python 3.5 ___ Python tracker <http://bugs.python.org/issue7897> ___ ___ Python-bugs-list mailin

[issue22444] Floor divide should return int

2015-10-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> rejected status: open -> closed ___ Python tracker <http://bugs.python.org/issue22444> ___ ___ Pyth

[issue13466] new timezones

2015-10-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Since nobody responded, I am closing this issue. -- resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue762963] timemodule.c: Python loses current timezone

2015-10-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> out of date status: open -> closed superseder: -> Time zone-capable variant of time.localtime ___ Python tracker <http://bugs.python.org

[issue10021] Format parser is too permissive

2015-10-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: -> needs patch versions: +Python 3.6 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue10021> ___ ___ Py

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2015-10-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Can someone recap the status of this issue? It is classified as a documentation bug, but I don't see a clear statement of what is wrong with the documentation. -- versions: +Python 3.6 -Python 3.3 ___ P

[issue14423] Getting the starting date of iso week from a week number and a year.

2015-10-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am rejecting this in favor of #12006. -- resolution: -> rejected status: open -> closed superseder: -> strptime should implement %G, %V and %u directives ___ Python tracker <http://bug

[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2015-10-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I think it is very likely that issue 5288 will result in at least seconds being allowed in UTC offsets in Python 3.6. I am assuming that much in my PEP 495 work in issue 24773. -- nosy: +tim.peters

[issue12006] strptime should implement %G, %V and %u directives

2015-10-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I've committed the latest patch. Thank you Ashley and Erik for your work and perseverance. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python

[issue25354] test_datetime failing

2015-10-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: @shanmbic - did you recompile C modules before running the tests? -- ___ Python tracker <http://bugs.python.org/issue25

[issue25354] test_datetime failing

2015-10-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Maybe @shanmbic has a clock skew and _datetime.so does not get recompiled? I would try to do make clean or even make distclean and rebuild everything. -- ___ Python tracker <http://bugs.python.org/issue25

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2015-10-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > The first issue can be solved by accepting str argument and encoding it to > bytes. A strong -1 from me. Accepting bytes objects for year in 3.x (and str in 2.x) is a gross hack. In the long run, I would like to see a public named constructo

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2015-10-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I wonder if this can be fixed using a fix_imports hook. I agree, it would be nice to fix this issue by modifying 3.x versions only. -- ___ Python tracker <http://bugs.python.org/issue22

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2015-10-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > .. pickling and unpickling will be slower If we are concerned about performance, we should definitely avoid the decode-encode roundtrip. -- ___ Python tracker <http://bugs.python.org/issu

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2015-10-12 Thread Alexander Riccio
New submission from Alexander Riccio: A minor issue (probably qualifies for the "easy" keyword): All functions in msvcrtmodule.c (I'm looking at http://svn.python.org/projects/python/trunk/PC/msvcrtmodule.c) except msvcrt_putch and msvcrt_putwch properly check return value

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2015-10-12 Thread Alexander Riccio
Alexander Riccio added the comment: For your convenience, the MSDN docs for the _putch/_putwch functions: https://msdn.microsoft.com/en-us/library/azb6c04e.aspx -- ___ Python tracker <http://bugs.python.org/issue25

[issue25387] sound_msgbeep doesn't check the return value of MessageBeep

2015-10-12 Thread Alexander Riccio
Changes by Alexander Riccio : -- components: Windows nosy: Alexander Riccio, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: sound_msgbeep doesn't check the return value of MessageBeep type: behavior versions: Pytho

[issue25387] sound_msgbeep doesn't check the return value of MessageBeep

2015-10-12 Thread Alexander Riccio
New submission from Alexander Riccio: A really minor issue (probably qualifies for the "easy" keyword): sound_msgbeep (in http://svn.python.org/projects/python/trunk/PC/winsound.c) doesn't check the return value of MessageBeep (https://msdn.microsoft.com/en-us/library/windows/d

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2015-10-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Christian, I don't think your solution will work for date/time/datetime pickles. There are many values for which pickle payload consists of bytes within 0-127 range. IIUC, you propose to decode those to Python 3 strings using ASCII encoding.

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2015-10-21 Thread Alexander Riccio
Alexander Riccio added the comment: Sorry for the delay: Gmail actually directed the update emails to my spam folder! Gmail said (something like): "It is in violation of Google's recommended email sender guidelines." ...and it's apparently not the first time this has happ

[issue14119] Ability to adjust queue size in Executors

2015-11-01 Thread Alexander Mohr
Alexander Mohr added the comment: adding support for internal queue size is critical to avoid chewing through all your memory when you have a LOT of tasks. I just hit this issue myself. If we could have a simple parameter to set the max queue size this would help tremendously

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-09 Thread Alexander Mohr
New submission from Alexander Mohr: asyncio.selector_events.BaseSelectorEventLoop._sock_connect_cb is a callback based on the selector for a socket. There are certain situations when the selector triggers twice calling this callback twice, resulting in an InvalidStateError when it sets the

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: Sorry for being obscure before, it was hard to pinpoint. I think I just figured it out! I had code like this in a subprocess: def worker(): while True: obj = self.queue.get() # do work with obj using asyncio http module def producer

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: I'm going to close this as I've found a work-around, if I find a better test-case I'll open a new bug. -- resolution: -> later status: open -> closed ___ Python tracker <http://bu

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: Actually, I just realized I had fixed it locally by changing the callback to the following: 429 def _sock_connect_cb(self, fut, sock, address): 430 if fut.cancelled() or fut.done(): 431 return so a fix is still needed, and I also

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: clarification, adding the fut.done() check, or monkey patching: orig_sock_connect_cb = asyncio.selector_events.BaseSelectorEventLoop._sock_connect_cb def _sock_connect_cb(self, fut, sock, address): if fut.done(): return return orig_sock_connect_cb(self

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: self.queue is not an async queue, as I stated above its a multiprocessing queue. This code is to multiplex a multiprocessing queue to a async queue. -- ___ Python tracker <http://bugs.python.org/issue25

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: Perhaps I'm doing something really stupid, but I was able to reproduce the two issues I'm having with the following sample script. If you leave the monkey patch disabled, you get the InvalidStateError, if you enable it, you get the ServerDisconn

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: attaching my simplified testcase and logged an aiohttp bug: https://github.com/KeepSafe/aiohttp/issues/633 -- Added file: http://bugs.python.org/file41018/test_app.py ___ Python tracker <http://bugs.python.

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-12 Thread Alexander Mohr
Alexander Mohr added the comment: btw want to thank you guys for actively looking into this, I'm very grateful! -- ___ Python tracker <http://bugs.python.org/is

[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5)

2015-11-23 Thread Alexander Heger
Alexander Heger added the comment: seems to work now with 3.5.1rc1 On 5 November 2015 at 23:01, STINNER Victor wrote: > > STINNER Victor added the comment: > > "Pyatomic-2.patch solved the problem." > > Great! The good news is that the Python 3.5.1 release

[issue25722] Lib/ssl.py breaks certificate validation for wildcard domains, e.g. *.s3.amazonaws.com

2015-11-24 Thread Alexander Todorov
New submission from Alexander Todorov: The latest ssl.py file tries to validate hostnames vs certificates but includes a faulty regexp which causes any wildcard domains (e.g. *.s3.amazonaws.com) to fail validation. Steps to Reproduce: >>> import ssl >>> ssl._dnsname_match(&

[issue25784] Please consider integrating performance fix for ipaddress.py

2015-12-02 Thread Alexander Finkel
New submission from Alexander Finkel: I encountered a performance problem using the ipaddr library to merge over 1 network addresses. I sent a patch upstream to fix it, and that patch has been merged: https://github.com/google/ipaddr-py/commit/6504b47a02739e853043f0a184f3c39462293e5c

[issue25784] Please consider integrating performance fix for ipaddress.py

2015-12-02 Thread Alexander Finkel
Alexander Finkel added the comment: Thanks for the responses. I'm afraid I was looking at the Python 3.3 source code on my desktop, it looks like the problem was fixed in the Mercurial repo about 10 months ago by https://hg.python.org/cpython/rev/f7508a176a09 Marked this issue as a dupl

[issue25837] Errors when Installing Anaconda 3

2015-12-10 Thread Alexander Whatley
New submission from Alexander Whatley: Got some error messages while installing Python 3.5.1 (Anaconda). Here is the traceback: Extracting packages ... [ COMPLETE ]|##| 100% Unlinking packages ... menuinst Exception:Traceback (most

<    33   34   35   36   37   38   39   40   41   >