Re: Check if a given value is out of certain range

2015-09-30 Thread sohcahtoa82
On Tuesday, September 29, 2015 at 1:33:23 PM UTC-7, Mark Lawrence wrote: > On 29/09/2015 17:48, Rob Gaddi wrote: > > On Tue, 29 Sep 2015 10:16:04 +0530, Laxmikant Chitare wrote: > > > >> Hi, > >> > >> I know there is an elegant way to check if a given value is within > >> certain range. > >>

Re: Question about regular expression

2015-09-30 Thread Tim Chase
On 2015-09-30 11:34, massi_...@msn.com wrote: > firstly the description of my problem. I have a string in the > following form: > > s = "name1 name2(1) name3 name4 (1, 4) name5(2) ..." > > that is a string made up of groups in the form 'name' (letters > only) plus possibly a tuple containing 1

[issue1602378] Incorrect docs for bisect_left

2015-09-30 Thread Jack Aidley
Jack Aidley added the comment: This is still an issue in the latest version of the documentation. It states "The returned insertion point i partitions the array a into two halves so that all(val < x for val in a[lo:i]) for the left side and all(val >= x for val in a[i:hi]) for the right

Question about regular expression

2015-09-30 Thread massi_srb
Hi everyone, firstly the description of my problem. I have a string in the following form: s = "name1 name2(1) name3 name4 (1, 4) name5(2) ..." that is a string made up of groups in the form 'name' (letters only) plus possibly a tuple containing 1 or 2 integer values. Blanks can be placed

Re: Check if a given value is out of certain range

2015-09-30 Thread Marko Rauhamaa
Grant Edwards : > not (0 <= x <= 10) (I) > [...] >(x < 0) or (x > 10) (II) > [...] > IMO, (I) is _more_ readable than (II) IMO, they're equally readable (except that you should drop the redundant parentheses from (II)). Marko --

Re: Linux Mint installation of Python 3.5

2015-09-30 Thread John Wong
On Tue, Sep 29, 2015 at 10:37 PM, Mario Figueiredo wrote: > Hello everyone, > > Under Linux Mint it is not a good idea to just go ahead and replace the > system installed Python versions and their packages. And yet I wish to > both update the 3.4 modules and install Python 3.5. I

[issue1602378] Incorrect docs for bisect_left

2015-09-30 Thread Tim Peters
Tim Peters added the comment: What's your objection? Here's your original example: >>> from bisect import * >>> L = [1,2,3,3,3,4,5] >>> x = 3 >>> i = bisect_left(L, x) >>> i 2 >>> all(val < x for val in L[:i]) True >>> all(val >= x for val in L[i:]) True Which criteria are not met?

Re: Check if a given value is out of certain range

2015-09-30 Thread BartC
On 29/09/2015 05:46, Laxmikant Chitare wrote: Hi, I know there is an elegant way to check if a given value is within certain range. Example - To check if x is between zero and ten, I can do 0 < x 10. That's not clear. Do you mean whether x is 1 to 9 inclusive? Because your contrary example

Re: Question about regular expression

2015-09-30 Thread Emile van Sebille
On 9/30/2015 11:34 AM, massi_...@msn.com wrote: Hi everyone, firstly the description of my problem. I have a string in the following form: s = "name1 name2(1) name3 name4 (1, 4) name5(2) ..." that is a string made up of groups in the form 'name' (letters only) plus possibly a tuple

[issue25171] does not build on OpenBSD with no value defined for PY_GETENTROPY

2015-09-30 Thread Remi Pointel
Remi Pointel added the comment: Attached is the diff to use defined(PY_GETENTROPY) instead of #define PY_GETENTROPY 1. -- Added file: http://bugs.python.org/file40631/Python_random_c ___ Python tracker

Error code 0x80070570

2015-09-30 Thread Rusiri Jayalath
Error code 0x80070570 appears when installing python 3.5.0 (32-bit) setup for my windows 8.1 system. Please help me to solve this problem. -- Thank You. Best Regards, Rusiri D. Jayalath -- https://mail.python.org/mailman/listinfo/python-list

Re: Error code 0x80070570

2015-09-30 Thread Joel Goldstick
On Wed, Sep 30, 2015 at 1:36 PM, Rusiri Jayalath wrote: > Error code 0x80070570 appears when installing python 3.5.0 (32-bit) setup > for my windows 8.1 system. Please help me to solve this problem. > > -- > > Thank You. > > > > > > > > Best Regards, > > > > > > > >

[issue25278] Unexpected socket exception on SFTP 'STOR' command

2015-09-30 Thread Blanquier
Blanquier added the comment: Hi, I send you the file as attached document. I use the test_sftp_upload() as entry point. Le 30/09/2015 16:43, R. David Murray a écrit : > R. David Murray added the comment: > > As Eric said, we really can't diagnose this unless you show is your python > code (as

Re: Question about regular expression

2015-09-30 Thread Joel Goldstick
On Wed, Sep 30, 2015 at 2:50 PM, Emile van Sebille wrote: > On 9/30/2015 11:34 AM, massi_...@msn.com wrote: > >> Hi everyone, >> >> firstly the description of my problem. I have a string in the following >> form: >> >> s = "name1 name2(1) name3 name4 (1, 4) name5(2) ..." >> >>

[issue25194] Opt-in motivations & affiliations page for core contributors

2015-09-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Thanks, Nick. The second version looks much better. A few minor nits, which you may want to address: * Order in the section should probably be alphabetic rather than random time based (makes it easier to search for entries once the list gets longer)

Re: ConnectionError handling problem

2015-09-30 Thread shiva upreti
On Friday, September 25, 2015 at 12:55:01 PM UTC+5:30, Cameron Simpson wrote: > On 24Sep2015 22:46, shiva upreti wrote: > >On Friday, September 25, 2015 at 10:55:45 AM UTC+5:30, Cameron Simpson wrote: > >> On 24Sep2015 20:57, shiva upreti

searchstringparser 0.2.3 released

2015-09-30 Thread Moritz Beber
Dear all, It is my pleasure to announce the first version of the *searchstringparser* package (0.2.3) on pypi. It currently contains a PLY (Python Lex-Yacc) based implementation of a general lexer and PostgreSQL specific parser. The parser translates general search queries that users might expect

Re: pypy - Gurobi solver library

2015-09-30 Thread Laura Creighton
In a message of Tue, 29 Sep 2015 18:58:19 -0700, LJ writes: >Hi All, > >I use gurobipy to model a large scale optimization problem. Is there a way to >use pypy with the gurobipy library? Has anyone done this? > >Thanks. I don't think so. I think that gurobipy depends on having all of numpy

Re: Check if a given value is out of certain range

2015-09-30 Thread Luca Menegotto
Il 29/09/2015 23:04, Random832 ha scritto: How about x not in range(11)? Remember: simpler is better. -- Ciao! Luca -- https://mail.python.org/mailman/listinfo/python-list

Installing Python 3.5 fails

2015-09-30 Thread Tom Barnett
I do have a fresh successful install of Visual Studio 2015 Redistributables installed. Then I reinstalled Python 3.5 and still now joy. What am I missing? Tom Tom Barnett Senior Systems Administrator Prime, inc. 2740 N. Mayfair Springfield, MO 65803 Ph. 417.866.0001 Fax 417.521.6863 *

Re: Installing Python 3.5 fails

2015-09-30 Thread Laura Creighton
In a message of Tue, 29 Sep 2015 21:40:08 -, Tom Barnett writes: > > > >I do have a fresh successful install of Visual Studio 2015 Redistributables >installed. > >Then I reinstalled Python 3.5 and still now joy. > >What am I missing? > >Tom (It's another missing

Re: Error code 0x80070570

2015-09-30 Thread eryksun
On 9/30/15, Rusiri Jayalath wrote: > Error code 0x80070570 appears when installing python 3.5.0 (32-bit) setup > for my windows 8.1 system. Please help me to solve this problem. 0x80070570 is ERROR_FILE_CORRUPT: the file or directory is corrupted and unreadable. It

[issue18967] Find a less conflict prone approach to Misc/NEWS

2015-09-30 Thread R. David Murray
R. David Murray added the comment: I never said they always had to be different, and "wholly different" is certainly not the case, nor do I think I implied that. So if your tool supports my scenario that's all I'm asking for :) -- ___ Python

[issue25275] Documentation v/s behaviour mismatch wrt integer literals containing non-ASCII characters

2015-09-30 Thread R. David Murray
R. David Murray added the comment: No, we can't make it stop working for int, that would be a backward compatibility break. Doing so was discussed at one point and rejected (another issue somewhere in this tracker :) -- ___ Python tracker

[issue25284] Spec for BaseEventLoop.run_in_executor(executor, callback, *args) is outdated in documentation

2015-09-30 Thread Guido van Rossum
Guido van Rossum added the comment: Someone please submit a patch... -- assignee: -> docs@python components: +Documentation -asyncio keywords: +easy nosy: +docs@python ___ Python tracker

[issue24755] asyncio.wrap_future undocumented

2015-09-30 Thread Andrej A Antonov
Changes by Andrej A Antonov : -- nosy: +polymorphm ___ Python tracker ___ ___

[issue25285] regrtest: run tests in subprocesses with -j1 on buildbots

2015-09-30 Thread STINNER Victor
New submission from STINNER Victor: Currently, regrtest ignores the -j1 parameter. For -jN, the multiprocess mode is only enabled for N != 1. I propose to modify regrtest to run tests in subprocesses when -j1 is used. It would solve the issue #18906. I also want to run tests in subprocesses

[issue25285] regrtest: run tests in subprocesses with -j1 on buildbots

2015-09-30 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file40632/regrtest_run_in_subprocess.patch ___ Python tracker

[issue25171] does not build on OpenBSD with no value defined for PY_GETENTROPY

2015-09-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset e4ac5a899657 by Victor Stinner in branch 'default': Issue #25171: Fix compilation issue on OpenBSD in random.c https://hg.python.org/cpython/rev/e4ac5a899657 -- nosy: +python-dev ___ Python tracker

[issue18967] Find a less conflict prone approach to Misc/NEWS

2015-09-30 Thread Larry Hastings
Larry Hastings added the comment: I don't agree that in all cases the Misc/NEWS entry and the checkin comment must be wholly different. While I concur that that's called for now and again, I believe this to be rare. Most checkins are small changes, and a single-line summary for both

[issue25284] Spec for BaseEventLoop.run_in_executor(executor, callback, *args) is outdated in documentation

2015-09-30 Thread Yaroslav Admin
Changes by Yaroslav Admin : -- title: Docs for BaseEventLoop.run_in_executor(executor, callback, *args) is outdated in documentation -> Spec for BaseEventLoop.run_in_executor(executor, callback, *args) is outdated in documentation

[issue25275] Documentation v/s behaviour mismatch wrt integer literals containing non-ASCII characters

2015-09-30 Thread Shreevatsa R
Shreevatsa R added the comment: About the mismatch: of course it's probably not a good idea to change the parser (so that simply typing १२३४ in Python 3 code is like typing 1234), but how about changing the behaviour of int()? Not sure whether anyone should be relying on int(u'१२३४') being

[issue25275] Documentation v/s behaviour mismatch wrt integer literals containing non-ASCII characters

2015-09-30 Thread R. David Murray
R. David Murray added the comment: Good catch. Yes, it is already documented that Int ignores leading and trailing whitespace. But, even that isn't quite correct: >>> 'A'.isdecimal() False >>> int('A', 16) 10 I seem to vaguely recall a discussion somewhere in this tracker about what

[issue25284] Spec for BaseEventLoop.run_in_executor(executor, callback, *args) is outdated in documentation

2015-09-30 Thread Nicholas Chammas
Changes by Nicholas Chammas : -- nosy: +Nicholas Chammas ___ Python tracker ___

[issue18906] Create a way to always run tests in subprocesses within regrtest

2015-09-30 Thread STINNER Victor
STINNER Victor added the comment: I created the issue #25285: "regrtest: run tests in subprocesses with -j1 on buildbots". -- nosy: +haypo ___ Python tracker

[issue25275] Documentation v/s behaviour mismatch wrt integer literals containing non-ASCII characters

2015-09-30 Thread Shreevatsa R
Shreevatsa R added the comment: Minor difference, but the relevant function for int() is not quite isdigit(), e.g.: >>> import unicodedata >>> s = u'\u2460' >>> unicodedata.name(s) 'CIRCLED DIGIT ONE' >>> print s ① >>> s.isdigit() True >>> s.isdecimal()

Re: Check if a given value is out of certain range

2015-09-30 Thread alister
On Wed, 30 Sep 2015 21:06:02 +0300, Marko Rauhamaa wrote: > Grant Edwards : > >> not (0 <= x <= 10) (I) >> [...] >>(x < 0) or (x > 10) (II) >> [...] >> IMO, (I) is _more_ readable than (II) > > IMO, they're equally readable (except that you should

[issue25284] Docs for BaseEventLoop.run_in_executor(executor, callback, *args) is outdated in documentation

2015-09-30 Thread Yaroslav Admin
New submission from Yaroslav Admin: Parameter for BaseEventLoop.run_in_executor(executor, callback, *args) was renamed from callback to func in 3.5.0 release, but it's not reflected in the docs. Commit with change:

[issue18967] Find a less conflict prone approach to Misc/NEWS

2015-09-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: I sometimes put a bit more info in the commit message, but it's true that generally it's a copy/paste job as far as I'm concerned. -- ___ Python tracker

[issue24820] IDLE themes for light on dark

2015-09-30 Thread Marc Paul Rubin
Marc Paul Rubin added the comment: Greetings from an idle-dev 'lurker.' Has anyone tested the new dark theme with a Set Breakpoint command? The dark theme is great for me except for this quirk: breakpoints are invisible on my test box. Under the Classic light scheme breakpoints appear on a

[issue25251] Unknown MS Compiler version 1900

2015-09-30 Thread Matt Hickford
Matt Hickford added the comment: I'm not sure what the correct analogue of msvcr100 is for Visual C++ 14.0. "msvcr140.dll no longer exists" http://blogs.msdn.com/b/vcblog/archive/2014/06/03/visual-studio-14-ctp.aspx elif msc_ver == '1600': # VS2010 / MSVC 10.0

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread STINNER Victor
STINNER Victor added the comment: > Before importing the io module sys.stderr is stdprinter. It always encodes > written string to UTF-8. Proposed patch makes it to use the backslashreplace > error handler. I like this solution. stdprinter is supposed to be replaced quickly. But we may need

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Before importing the io module sys.stderr is stdprinter. It always encodes written string to UTF-8. Proposed patch makes it to use the backslashreplace error handler. In future perhaps we could implement stdprinter in Python. -- components:

[issue25270] codecs.escape_encode systemerror on empty byte string

2015-09-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The patch looks fine to me, but I still wonder how p - PyBytes_AS_STRING(v) can be negative when size == 0... Ah, now I get it: the new size is 0, but the refcount is not 1, since the nullstring is shared. This causes the exception. >From

Re: Create a .lua fle from Python

2015-09-30 Thread jmp
On 09/29/2015 07:28 PM, Peter Otten wrote: jmp wrote: import bs4 import jinja2 xml = """ BuenosAires 30 Seatle 25 """ lua_template = """ cities_temps ={ {%- for city, temp in cities.iteritems() %} ["{{city}}"] = {{temp}}, {%-

Re: Check if a given value is out of certain range

2015-09-30 Thread alister
On Tue, 29 Sep 2015 18:44:33 -0500, Tim Chase wrote: > On 2015-09-29 21:32, Mark Lawrence wrote: >> On 29/09/2015 17:48, Rob Gaddi wrote: >> >> Is there any similar elegant way to check if a value is out of >> >> certain range? >> >> Example - To check if x is either less than zero or greater

[issue25276] test_decimal sometimes crash on PPC64 AIX 3.x

2015-09-30 Thread STINNER Victor
New submission from STINNER Victor: This buildbot has low free memory. Maybe some part of _decimal doesn't handle an allocation failure? http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/4173/steps/test/logs/stdio ... [307/399/10] test_decimal Fatal Python error: Segmentation

[issue25277] test_eintr hangs on randomly on "AMD64 FreeBSD 9.x 3.x"

2015-09-30 Thread STINNER Victor
New submission from STINNER Victor: Too bad, the test test_eintr hangs sometimes on "AMD64 FreeBSD 9.x 3.x". http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/3442/steps/test/logs/stdio [397/399] test_traceback -- running: test_eintr (254 sec), test_subprocess (62

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread STINNER Victor
STINNER Victor added the comment: Hum, the code didn't compile anymore on Windows. I took the opportunity to fix the errno issue that I saw. Note: In fact, Python/fileutils.c is a a little bit different. Functions like _Py_write() save errno to restore it later because the caller expects

[issue25275] Documentation v/s behaviour mismatch wrt integer literals containing non-ASCII characters

2015-09-30 Thread R. David Murray
R. David Murray added the comment: Apparently that documentation is simply wrong. The actual definition of what 'int' handles is *different* from what the parser handles. I think that difference must constitute a bug (not just a doc bug), but I'm not sure if it is something that we want to

[issue25278] Unexpected socket exception on SFTP 'STOR' command

2015-09-30 Thread Blanquier
New submission from Blanquier: With Filezilla Server 0.9.53, SFTP activated (force SSL on login, allow explicit FTP over TLS). From the FTP client point of view: when I use ftp_id.storbinary( 'STOR file_name'...), a socket.error exception arrive sometime. It's a socket.error exception and the

[issue25278] Unexpected socket exception on SFTP 'STOR' command

2015-09-30 Thread R. David Murray
R. David Murray added the comment: Does this have anything to do with python itself and its standard library? From your description this sounds like a problem with filezilla and should be reported to them. -- nosy: +r.david.murray resolution: -> third party stage: -> resolved

[issue25280] Message can be formatted twice in importlib

2015-09-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In importlib a verbose message can be formatted twice, the first time before passing it to _verbose_message(), and the second time in _verbose_message(), Example: $ python -v ... >>> open('{0}.pyc', 'wb').close() >>> __import__('{0}') Traceback (most

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Hum, the code didn't compile anymore on Windows. I took the opportunity to > fix the errno issue that I saw. Thank you Victor. -- ___ Python tracker

[issue25278] Unexpected socket exception on SFTP 'STOR' command

2015-09-30 Thread R. David Murray
R. David Murray added the comment: (Note: issue 25278 with a small amount of additional info closed as a duplicate of this one). -- status: pending -> open ___ Python tracker

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2652c1798f7d by Victor Stinner in branch '3.4': Issue #25182: Fix compilation on Windows https://hg.python.org/cpython/rev/2652c1798f7d New changeset 0eb26a4d5ffa by Victor Stinner in branch '3.5': (Merge 3.4) Issue #25182: Fix compilation on

[issue25275] Documentation v/s behaviour mismatch wrt integer literals containing non-ASCII characters

2015-09-30 Thread R. David Murray
R. David Murray added the comment: I mean, in python2 you can use unicode in python code, only in strings, as opposed to python3 where unicode is valid in identifiers (but not integer literals, obviously). -- ___ Python tracker

Re: failure in installing

2015-09-30 Thread Thomas 'PointedEars' Lahn
Sagar Joshi wrote: > hey, there is a failure installing python3.5.0 in my PC can u help -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail. -- https://mail.python.org/mailman/listinfo/python-list

[issue25194] Opt-in motivations & affiliations page for core contributors

2015-09-30 Thread R. David Murray
R. David Murray added the comment: After the "are especially encouraged" bullet list, I think you should add a paragraph about the motivations for that special encouragement (that you've previously articulated, such as colleagues being able to learn they have a coworker they can turn to as a

[issue25279] Unexpected ftplib.error_xxx exception on SFTP 'STOR' command

2015-09-30 Thread Blanquier
Blanquier added the comment: With Filezilla Server 0.9.53, SFTP activated (force SSL on login, allow explicit FTP over TLS). From the FTP client point of view: when I use ftp_id.storbinary( 'STOR file_name'...), a ftplib.error_xxx exception arrive someting. On the windows server:

[issue25278] Unexpected socket exception on SFTP 'STOR' command

2015-09-30 Thread Eric V. Smith
Eric V. Smith added the comment: >From the info in issue 25279, I'd say it's an error in your code. But to make sure it's not an error in the stdlib, can you show us your code? Without that, it's not possible to diagnose this any further. -- nosy: +eric.smith status: pending -> open

[issue25278] Unexpected socket exception on SFTP 'STOR' command

2015-09-30 Thread Eric V. Smith
Changes by Eric V. Smith : -- status: open -> pending ___ Python tracker ___ ___

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for the review Victor. > But we may need something else to escape non-encodable characters in the > filename when sys.stdout is a TextIOWrapper using the strict error handler. This is not related to this issue. sys.stderr uses backslashreplace.

Re: failure in installing

2015-09-30 Thread Chris Angelico
On Wed, Sep 30, 2015 at 10:36 PM, Sagar Joshi wrote: > hey, there is a failure installing python3.5.0 in my PC can u help yes ChrisA PS. If my response wasn't helpful enough, it's because your question wasn't helpful enough. You'll need to give us a lot more information,

[issue25275] Documentation v/s behaviour mismatch wrt integer literals containing non-ASCII characters

2015-09-30 Thread R. David Murray
R. David Murray added the comment: I mean, in python2 you can't use unicode in python code, only in strings, as opposed to python3 where unicode is valid in identifiers (but not integer literals, obviously). -- ___ Python tracker

[issue25275] Documentation v/s behaviour mismatch wrt integer literals containing non-ASCII characters

2015-09-30 Thread R. David Murray
Changes by R. David Murray : -- Removed message: http://bugs.python.org/msg251931 ___ Python tracker ___

[issue25279] Unexpected ftplib.error_xxx exception on SFTP 'STOR' command

2015-09-30 Thread Blanquier
New submission from Blanquier: activated (force SSL on login, allow explicit FTP over TLS). From the FTP client point of view: when I use ftp_id.storbinary( 'STOR file_name'...), a ftplib.error_xxx exception arrive someting. On the windows server: (000336)30/09/2015 08:56:59 - nemo_pyc

Re: failure in installing

2015-09-30 Thread Mark Lawrence
On 30/09/2015 13:36, Sagar Joshi wrote: hey, there is a failure installing python3.5.0 in my PC can u help Not directly, as once again both my main and spare crystal balls are at the menders due to over use. However should you decide to tell us what OS version you've got, exactly what you

[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset ec02ccffd1dc by Victor Stinner in branch 'default': Issue #25220: Fix "-m test --forever" https://hg.python.org/cpython/rev/ec02ccffd1dc -- ___ Python tracker

failure in installing

2015-09-30 Thread Sagar Joshi
hey, there is a failure installing python3.5.0 in my PC can u help -- https://mail.python.org/mailman/listinfo/python-list

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6347b154dd67 by Serhiy Storchaka in branch '3.4': Issue #25182: The stdprinter (used as sys.stderr before the io module is https://hg.python.org/cpython/rev/6347b154dd67 New changeset e8b6c6c433a4 by Serhiy Storchaka in branch '3.5': Issue #25182:

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread STINNER Victor
STINNER Victor added the comment: > This is not related to this issue. sys.stderr uses backslashreplace. Ok, fine. --- +_errno = errno; Py_END_ALLOW_THREADS +Py_XDECREF(bytes); if (n < 0) { -if (errno == EAGAIN) +if (_errno == EAGAIN)

[issue25270] codecs.escape_encode systemerror on empty byte string

2015-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be better to test a condition "size > 0" before calling _PyBytes_Resize(), as in many other case where _PyBytes_Resize() is used. Or accept shared objects in _PyBytes_Resize() if new size is equal to old size. This will allow to getrid of additional

[issue25279] Unexpected ftplib.error_xxx exception on SFTP 'STOR' command

2015-09-30 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Unexpected socket exception on SFTP 'STOR' command ___ Python tracker

[issue25278] Unexpected socket exception on SFTP 'STOR' command

2015-09-30 Thread R. David Murray
Changes by R. David Murray : -- status: open -> pending ___ Python tracker ___ ___

Re: ConnectionError handling problem

2015-09-30 Thread Cameron Simpson
On 29Sep2015 23:04, shiva upreti wrote: On Friday, September 25, 2015 at 12:55:01 PM UTC+5:30, Cameron Simpson wrote: Ok. You original code says: try: r=requests.post(url, data=query_args) except: print "Connection error" and presumably we think your

Re: Error code 0x80070570

2015-09-30 Thread Denis McMahon
On Wed, 30 Sep 2015 23:06:13 +0530, Rusiri Jayalath wrote: > Error code 0x80070570 appears when installing python 3.5.0 (32-bit) > setup for my windows 8.1 system. Please help me to solve this problem. This seems to be a windows error, not a python issue. Try google. -- Denis McMahon,

[issue24820] IDLE themes for light on dark

2015-09-30 Thread Mark Roseman
Mark Roseman added the comment: Hi Marc, you're correct that is an error in the theme. To correct it, change the setting for 'break-background' to be something like #22. Thanks! -- ___ Python tracker

[issue25251] Unknown MS Compiler version 1900

2015-09-30 Thread Steve Dower
Steve Dower added the comment: There isn't one. MinGW doesn't support building with the UCRT yet, so you'll need to link to a different version of the library and hope that it works (or test/fix the extension). -- ___ Python tracker

[issue24820] IDLE themes for light on dark

2015-09-30 Thread Mark Roseman
Mark Roseman added the comment: Attached a patch to the current config dialog to add breakpoint to the window, and have updated the same thing in my newer dialog. -- keywords: +patch Added file: http://bugs.python.org/file40635/breakpoint-prefs.patch

Re: ConnectionError handling problem

2015-09-30 Thread Laura Creighton
In a message of Thu, 01 Oct 2015 07:30:59 +1000, Cameron Simpson writes: >Most likely the Ctrl-C interrupts whatever system call is hanging, causing it >to return (failed, probably with errno EINTR). And the python program resumes >because the OS system call has returned. > >Cheers, >Cameron

Re: Check if a given value is out of certain range

2015-09-30 Thread Mark Lawrence
On 30/09/2015 19:31, sohcahto...@gmail.com wrote: On Tuesday, September 29, 2015 at 1:33:23 PM UTC-7, Mark Lawrence wrote: On 29/09/2015 17:48, Rob Gaddi wrote: On Tue, 29 Sep 2015 10:16:04 +0530, Laxmikant Chitare wrote: Hi, I know there is an elegant way to check if a given value is

Re: Question about regular expression

2015-09-30 Thread Denis McMahon
On Wed, 30 Sep 2015 11:34:04 -0700, massi_srb wrote: > firstly the description of my problem. I have a string in the following > form: . The way I solved this was to: 1) replace all the punctuation in the string with spaces 2) split the string on space 3) process each thing in the list to

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

2015-09-30 Thread Ashley Anderson
Ashley Anderson added the comment: Another *ping* for a patch review since it's been almost a month since the last one. -- ___ Python tracker ___

[issue25254] Idle: debugger source line highlighting fails again

2015-09-30 Thread Mark Roseman
Mark Roseman added the comment: Was the 'source' checkbox in the debugger checked? -- ___ Python tracker ___

[issue25272] asyncio tests are getting noisy

2015-09-30 Thread Martin Panter
Martin Panter added the comment: Another source of noise is this warning about a task being slow to respond. I briefly investigated this a while back. I concluded that it only happens when other tests are run before it; it does not happen when test_asyncio is run alone. It is caused by the

[issue25275] Documentation v/s behaviour mismatch wrt integer literals containing non-ASCII characters

2015-09-30 Thread Martin Panter
Martin Panter added the comment: Related discussion and background in Issue 10581, although that report seems to be geared at extending the Unicode support even further (disallowing mixed scripts, allowing proper minus signs, full-width characters, Roman numerals, etc). The existing support

[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 complete one? --

[issue25258] HtmlParser doesn't handle void element tags correctly

2015-09-30 Thread Martin Panter
Martin Panter added the comment: My thinking is that the knowledge that does not have a closing tag is at a higher level than the current HTMLParser class. It is similar to knowing where the following HTML implicitly closes the elements: Item AItem B In both cases I would not expect the

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

2015-09-30 Thread Ashley Anderson
Ashley Anderson added the comment: Thanks Alexander, but I think the latest patch is still mine. It seems strange to review my own patch. I'll do it if that's common, but since this will (hopefully, eventually) be my first accepted patch I would appreciate the feedback from another reviewer.

[issue25270] codecs.escape_encode systemerror on empty byte string

2015-09-30 Thread Martin Panter
Martin Panter added the comment: The patch looks sufficient to fix the problem, though I do like Serhiy’s suggestions. For the record, because I was curious: Function codecs.escape_encode() is not documented, and barely tested. It was used for the documented “string_escape” codec in Python

[issue25276] test_decimal sometimes crash on PPC64 AIX 3.x

2015-09-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Extension Modules type: -> crash ___ Python tracker ___

[issue25184] "python -m pydoc -w" fails in nondecodable directory

2015-09-30 Thread Martin Panter
Martin Panter added the comment: Here is a patch that implements my IRI (Unicode URL) proposal. Differences compared to Serhiy’s patches: * “file:” URLs use Unicode if possible. Percent encode encoding only used for reserved ASCII characters and undecodable bytes. * HTTP URLs use UTF-8 and

[issue24841] Some test_ssl network tests fail if svn.python.org is not accessible.

2015-09-30 Thread Vinson Lee
Vinson Lee added the comment: I tested the attached patch on latest cpython master and it works for me. test_ciphers (test.test_ssl.NetworkedTests) ... skipped "Resource 'svn.python.org' is not available" test_connect (test.test_ssl.NetworkedTests) ... skipped "Resource 'svn.python.org' is

Re: Question about regular expression

2015-09-30 Thread Emile van Sebille
On 9/30/2015 12:20 PM, Tim Chase wrote: On 2015-09-30 11:34, massi_...@msn.com wrote: I guess this problem can be tackled with regular expressions, b ... However, if you *want* to do it with regular expressions, you can. It's ugly and might be fragile, but

[issue25274] "./python -m test test_sys": Fatal Python error: Cannot recover from stack overflow

2015-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue25222. _Py_CheckRecursiveCall may be being called recursively through Py_FatalError. -- components: +Interpreter Core, Tests nosy: +serhiy.storchaka type: -> crash ___ Python tracker

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > > This is not related to this issue. sys.stderr uses backslashreplace. > Ok, fine. But is related to issue25183. -- ___ Python tracker

[issue22413] Bizarre StringIO(newline="\r\n") translation

2015-09-30 Thread Martin Panter
Martin Panter added the comment: I understand it may not be worth changing the behaviour. Would you instead accept a change to the documentation to point out that “newline” does _not_ actually work like TextIOWrapper? Or perhaps even deprecating or recommending against using “newline”?

[issue25286] views are not sequences

2015-09-30 Thread Akira Li
New submission from Akira Li: The entry for *dict view* in the glossary may be clarified, to avoid confusion with collection.abc.Sequence i.e., from: They are lazy sequences that will see changes in the underlying dictionary. to something like: They provide a dynamic view on the

[issue16701] Docs missing the behavior of += (in-place add) for lists.

2015-09-30 Thread Martin Panter
Martin Panter added the comment: “For the most part” works for me. Here is the patch. -- Added file: http://bugs.python.org/file40637/seq-inplace.v3.patch ___ Python tracker

  1   2   >