[issue28997] test_readline.test_nonascii fails on Android

2016-12-17 Thread Martin Panter
Martin Panter added the comment: This is a breakdown of running the test script on my Linux setup (UTF-8 locale): ^A^B^B^B^B^B^B^B\t\tx\t\r\n Input echoed back (before Readline disables echo) [\xc3\xafnserted] Inserted by pre_input_hook() |t\xc3\xab[after] Inserted by the Ctrl+A

[issue28180] sys.getfilesystemencoding() should default to utf-8

2016-12-17 Thread Nick Coghlan
Nick Coghlan added the comment: For folks not following the Fedora BZ issue directly, I've also attached the latest draft downstream patch here, which gives the following behaviour: == $ ./python -c "import sys; print(sys.getfilesystemencoding())" utf-8 $ LANG=C.UTF-8

[issue28180] sys.getfilesystemencoding() should default to utf-8

2016-12-17 Thread Nick Coghlan
Changes by Nick Coghlan : Added file: http://bugs.python.org/file45951/fedora-cpython-PYTHONALLOWCLOCALE.diff ___ Python tracker ___

[issue28927] bytes.fromhex should ignore all whitespace

2016-12-17 Thread Nick Coghlan
Nick Coghlan added the comment: Ah, the parallel with base64 decoding and embedding encoded data in multi-line string literals is indeed a compelling one - I'd missed that. Given that rationale, +1 from me. Perhaps it would make sense to call that out directly in the documentation? Something

[issue28982] multiprocessing.Queue.get(block=True, timeout=0) always raises queue.Empty

2016-12-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue28982] multiprocessing.Queue.get(block=True, timeout=0) always raises queue.Empty

2016-12-17 Thread Ryan Brindley
Ryan Brindley added the comment: I've updated the PR to also include raising a ValueError for timeout values < 0. This behavior mimics that of queue.Queue (noting here again that queue.Queue handles timeout = 0). -- ___ Python tracker

[issue28987] Remove typo in whats new entry on Descriptor Protocol Enhancements

2016-12-17 Thread Martin Panter
Martin Panter added the comment: Thanks Jim -- nosy: +martin.panter resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue28987] Remove typo in whats new entry on Descriptor Protocol Enhancements

2016-12-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset a46a20a1f286 by Martin Panter in branch '3.6': Issue #28987: Typos, grammar, spelling in documentation https://hg.python.org/cpython/rev/a46a20a1f286 New changeset 28cf4ffcfbf3 by Martin Panter in branch 'default': Issue #28987: Merge doc and

[issue22343] Install bash activate script on Windows when using venv

2016-12-17 Thread Evan
Evan added the comment: +1, I'm also using Windows with Git Bash and venv is unusable for me without Brandon's workaround. -- nosy: +evan_ ___ Python tracker

[issue28972] Document all "python -m" utilities

2016-12-17 Thread Miki Tebeka
Miki Tebeka added the comment: Thanks Guido, however I think my blog is not the right place - it's dog ugly and read by about 7 people on a good day :) I think that adding this to the official docs will add to the "batteries included" motto. I'll try to find a time and come up with a patch

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-17 Thread Martin Panter
Martin Panter added the comment: The first offending message I found is number 183465: >>> s.group("comp.lang.python") ('211 4329 179178 183507 comp.lang.python', 4329, 179178, 183507, 'comp.lang.python') >>> s._putcmd("OVER 183465") >>> s._getresp() '224 Overview information for 183465

[issue29003] sqlite3: can't run VACUUM on Python 3.6

2016-12-17 Thread Ned Deily
Changes by Ned Deily : -- keywords: +3.6regression nosy: +berker.peksag, ghaering ___ Python tracker ___

[issue27584] New addition of vSockets to the python socket module

2016-12-17 Thread R. David Murray
R. David Murray added the comment: Oh, I see, the ac changes are there, I was looking at the patch delta instead of the complete patch. -- ___ Python tracker

[issue27584] New addition of vSockets to the python socket module

2016-12-17 Thread R. David Murray
R. David Murray added the comment: The second patch seems to be missing the configure changes. Also, the tests have some over-long lines (we limit line lengths to 79 characters). I realize there are other long lines in that file, but no need to add more :) There is trailing whitespace on a

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-12-17 Thread Ma Lin
Ma Lin added the comment: #29003 created -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29003] sqlite3: can't run VACUUM on Python 3.6

2016-12-17 Thread Ma Lin
New submission from Ma Lin: I'm using Python 3.6.0 RC2. When I try to run VACUUM command, an exception raised: conn.execute('begin') # <- remove this line get the same result conn.execute('VACUUM') sqlite3.OperationalError: cannot VACUUM from within a transaction On Python 3.5, everything is

[issue28407] Improve coverage of email.utils.make_msgid()

2016-12-17 Thread R. David Murray
R. David Murray added the comment: Thanks Dillon. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28407] Improve coverage of email.utils.make_msgid()

2016-12-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8687b3554b1f by R David Murray in branch '3.5': #28407 Improve test coverage of make_msgid. https://hg.python.org/cpython/rev/8687b3554b1f New changeset 87671b1f7ff4 by R David Murray in branch '3.6': Merge #28407 Improve test coverage of

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-12-17 Thread R. David Murray
R. David Murray added the comment: It is an unexpected change in behavior and is therefore probably a bug. It will work if you set isolation_level=None. Because of that I don't think it is a release critical bug, though one could wish we'd discovered it earlier. Please open a new issue for

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-12-17 Thread Ma Lin
Ma Lin added the comment: I'm using Python 3.6.0 RC2, I don't know if it's a bug. When I try to run VACUUM command, an exception raised: conn.execute('begin') # <- remove this line get the same result conn.execute('VACUUM') sqlite3.OperationalError: cannot VACUUM from within a transaction

Re: Unicode script

2016-12-17 Thread MRAB
On 2016-12-16 02:44, MRAB wrote: On 2016-12-15 21:57, Terry Reedy wrote: On 12/15/2016 1:06 PM, MRAB wrote: On 2016-12-15 16:53, Steve D'Aprano wrote: Suppose I have a Unicode character, and I want to determine the script or scripts it belongs to. For example: U+0033 DIGIT THREE "3" belongs

[issue29002] typing.AnyStr doc is unclear about python2 unicode support

2016-12-17 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Unless of course you mean pip installing typing for Py2 and then using ``# type`` comments to provide the types. Even in that case, I don't really think the documentation for Python 3.5 should be mentioning types in 2.7, that'd get confusing.

Re: The right way to 'call' a class attribute inside the same class

2016-12-17 Thread Chris Angelico
On Sun, Dec 18, 2016 at 12:01 PM, Erik wrote: > Yes, in that case there is (I didn't grok that you meant using 'new' by > "calling a function as a constructor", but it's obvious now you spell it > out). Yeah. I thought that I got that terminology from MDN, but I can't

[issue29002] typing.AnyStr doc is unclear about python2 unicode support

2016-12-17 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: The ``typing`` module doesn't exist in Python 2.7. All code samples provided in the docs *work* since no type-checking is performed by Python. That is, no enforcing of the types provided is made, that's for 3rd party packages to supply. --

[issue27973] urllib.urlretrieve() fails on second ftp transfer

2016-12-17 Thread Senthil Kumaran
Senthil Kumaran added the comment: Just an update. We missed the last 2.7.13 release train. Sorry for that. It's worth to fix this bug still ASAP. It's intricately related to some other bugs like (issue25458, issue26960). I got to this and realized the dependency and other bugs. All those

Re: The right way to 'call' a class attribute inside the same class

2016-12-17 Thread Erik
On 16/12/16 01:17, Chris Angelico wrote: On Fri, Dec 16, 2016 at 11:36 AM, Erik wrote: On 12/12/16 23:23, Chris Angelico wrote: In JavaScript, it's normal to talk about "calling a function as a constructor". When you do, there is a 'this' object before you start.

[issue29002] typing.AnyStr doc is unclear about python2 unicode support

2016-12-17 Thread Alex Jurkiewicz
New submission from Alex Jurkiewicz: The typing.AnyStr documentation: https://docs.python.org/3/library/typing.html#typing.AnyStr It gives some examples using u-strings (u'foo') but doesn't make explicit some subtleties about behaviour with Python 2. Specifically, with Python 2 all the given

[issue28936] test_global_err_then_warn in test_syntax is no longer valid

2016-12-17 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Updated patch as proposed by Serhiy. -- Added file: http://bugs.python.org/file45948/syntax-error-order-v2.patch ___ Python tracker

Re: Best attack order for groups of numbers trying to destroy each other, given a victory chance for number to number attack.

2016-12-17 Thread skybuck2000
Specially for Dennis, a nice story: There are four little animals. The first animal is a tiger, the second animal is a deer, the third animal a parrot, the fourth animal is a fish. The animals are very angry at each other and want to EAT each other ! =D However each animal has a certain

Re: python list index - an easy question

2016-12-17 Thread BartC
On 17/12/2016 19:10, John wrote: Hi, I am new to Python, and I believe it's an easy question. I know R and Matlab. x=[1,2,3,4,5,6,7] x[0] 1 x[1:5] [2, 3, 4, 5] * My question is: what does x[1:5] mean? x[A:B] means the slice consisting of x[A], x[A+1],...

Re: Best attack order for groups of numbers trying to destroy each other, given a victory chance for number to number attack.

2016-12-17 Thread skybuck2000
Unless you are capable of expressing problems in numerical terms you'll have very hard luck having it computed by a computer ! ;) I did find some interesting docs about "decision trees". Exhaustive search Branch and Bound Hill Climbing Random/Best Effort Solutions and so forth. A computer

Re: python list index - an easy question

2016-12-17 Thread Terry Reedy
On 12/17/2016 2:10 PM, John wrote: Hi, I am new to Python, and I believe it's an easy question. I know R and Matlab. x=[1,2,3,4,5,6,7] x[0] 1 x[1:5] [2, 3, 4, 5] * My question is: what does x[1:5] mean? The subsequence between slice positions 1 and 5,

[issue28936] test_global_err_then_warn in test_syntax is no longer valid

2016-12-17 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I don't think this is a bug, but detecting first a SyntaxError that appears textually first might be seen as an improvement. I would say such behaviour seems more intuitive. A possible downside could be a (probably very minor) slow-down of compilation. I

[issue28407] Improve coverage of email.utils.make_msgid()

2016-12-17 Thread Dillon Brock
Dillon Brock added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[RELEASE] Python 2.7.13

2016-12-17 Thread Benjamin Peterson
It is my pleasure to announce the release of Python 2.7.13, the latest bugfix release of the venerable Python 2.7 series. This release incorporates conservative bugfixes as well as improvements to keep Python 2.7 running on modern systems. The only change from the 2.7.13 release candidate 2 weeks

[issue25778] winreg.EnumValue does not truncate strings correctly

2016-12-17 Thread Steve Dower
Steve Dower added the comment: I've committed to 3.6.1 and 3.7, but I'm not convinced that the problem is worth the risk of changing the behaviour in 2.7.14 and 3.5.3. Considering we kept forgetting to commit this for so long and largely got away with it, I assume there aren't hundreds of

[issue25778] winreg.EnumValue does not truncate strings correctly

2016-12-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8cee4862fb34 by Steve Dower in branch '3.6': Issue #25778: winreg does not truncase string correctly (Patch by Eryk Sun) https://hg.python.org/cpython/rev/8cee4862fb34 New changeset 3014854e68e4 by Steve Dower in branch 'default': Issue #25778:

[issue28747] Expose SSL_CTX_set_cert_verify_callback

2016-12-17 Thread Ned Deily
Ned Deily added the comment: >From a release manager perspective, I'm OK in principle with adding it to >3.6.1 as long as the ssl experts are OK with it. -- nosy: +alex, dstufft, janssen ___ Python tracker

[issue28747] Expose SSL_CTX_set_cert_verify_callback

2016-12-17 Thread Steve Dower
Steve Dower added the comment: The current _3.patch builds on default without warning and the tests pass (_2.patch is the one Ned tried). Any objections to committing this into 3.7? What about 3.6.1? As an additive and easy to detect API, I think it's suitable, and I will certainly use it

[issue27574] Faster parsing keyword arguments

2016-12-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: -> resolved status: open -> closed Added file: http://bugs.python.org/file45947/faster_keyword_args_parse_alt2.patch ___

[issue27574] Faster parsing keyword arguments

2016-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Just for the history, there are two alternative patches. They unpack keyword arguments to linear array. I expected this approach can add more optimization, but actually the benefit is too small or negative. -- Added file:

[issue28180] sys.getfilesystemencoding() should default to utf-8

2016-12-17 Thread Jan Niklas Hasse
Jan Niklas Hasse added the comment: > Usually, when a new option is added to Python, we add a command line option > (-X utf8) but also an environment variable: I propose PYTHONUTF8=1. > > Use your favorite method to define the env var "system wide" in your docker > containers. This doesn't

[issue29000] Not matched behavior within printf style bytes formatting

2016-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks David. -- assignee: docs@python -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29000] Not matched behavior within printf style bytes formatting

2016-12-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 96d728c14267 by Serhiy Storchaka in branch '3.5': Issue #29000: Fixed bytes formatting of octals with zero padding in alternate https://hg.python.org/cpython/rev/96d728c14267 New changeset 29c9c414c310 by Serhiy Storchaka in branch '3.6': Issue

[issue9770] curses.ascii.isblank() function is broken. It confuses backspace (BS 0x08) with tab (0x09)

2016-12-17 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: On 32-bit platform the size of empty bytes object is 17 bytes not counting padding and GC links. Plus 4 bytes for a pointer in a list. On 64 bit platform numbers are about twice larger. Therefore add at least 20-40 bytes per line. Is not 100 MiB too large

Re: python list index - an easy question

2016-12-17 Thread Peter Otten
John wrote: > Hi, > >I am new to Python, and I believe it's an easy question. I know R and >Matlab. > > x=[1,2,3,4,5,6,7] x[0] > 1 x[1:5] > [2, 3, 4, 5] > * > > My question is: what does x[1:5] mean? By Python's convention, the > first

[issue29001] logging.handlers.RotatingFileHandler rotation broken under gunicorn

2016-12-17 Thread Bruce Edge
New submission from Bruce Edge: I've been seeing some funny behavior in log files form a logging.handlers.RotatingFileHandler. Here's my handler config snippet, in a "log.cfg": [handlers] keys=log_file [formatters] keys=access [formatter_access] format=%(asctime)s -

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-17 Thread Xavier de Gaye
Xavier de Gaye added the comment: > If sender sends a lot of empty lines and file is not None, LF or CRLF is > stripped from lines Oh, I missed that. Maybe give a weight of 4 to 8 bytes or even more to a line, this value being added to the bytes count whether the line is empty or not. Do you

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-17 Thread Xavier de Gaye
Xavier de Gaye added the comment: I responded to your last review Serhiy, but the psf mail system reports a delivery failure, so you may have missed the notification as well as the other reviewers. -- ___ Python tracker

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If sender sends a lot of empty lines and file is not None, LF or CRLF is stripped from lines, and len(line) is 0. Every empty line increases the size of the lines list by 4 or 8 bytes. Since count is not changed, the loop is not bounded. Every LF byte sent

Re: python list index - an easy question

2016-12-17 Thread boB Stepp
On Sat, Dec 17, 2016 at 1:10 PM, John wrote: > > Hi, > >I am new to Python, and I believe it's an easy question. I know R and > Matlab. > > > >>> x=[1,2,3,4,5,6,7] > >>> x[0] > 1 > >>> x[1:5] > [2, 3, 4, 5] > * > > My question is: what does

[issue28949] Stdlib modules disappear from file system

2016-12-17 Thread Jason R. Coombs
Jason R. Coombs added the comment: Throughout the week, I've not experienced this issue again. Perhaps the reinstall of Dropbox corrected some transient condition. Or perhaps my system was in some environment where it was particularly sensitive on Monday but has since returned to the status

[issue13051] Infinite recursion in curses.textpad.Textbox

2016-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I can reproduce the second bug too. Here is updated patch. The main difference is that it preserves maxx and maxy attributes and support them up to date. -- Added file: http://bugs.python.org/file45945/textpad-recursion-fix2.patch

python list index - an easy question

2016-12-17 Thread John
Hi, I am new to Python, and I believe it's an easy question. I know R and Matlab. >>> x=[1,2,3,4,5,6,7] >>> x[0] 1 >>> x[1:5] [2, 3, 4, 5] * My question is: what does x[1:5] mean? By Python's convention, the first element of a list is indexed as "0". Doesn't

[issue28816] Document if zipimport can respect import hooks to load custom files from zip.

2016-12-17 Thread Brett Cannon
Brett Cannon added the comment: The cutoff for 3.6.0 has passed, but documentation patches can still go in for 3.6.1 (and 3.5.3). -- ___ Python tracker

[issue28927] bytes.fromhex should ignore all whitespace

2016-12-17 Thread Robert Xiao
Robert Xiao added the comment: I see your point, Nick. Can I offer a counterpoint? Most of the string parsers operate only on relatively short inputs, like numbers. Numbers in particular are rarely written with inner spaces, so it makes sense not to ignore internal whitespaces. On the other

[issue28951] re.flags not documented in Module Contents as promised.

2016-12-17 Thread R. David Murray
R. David Murray added the comment: (Please delete the message you are replying to when responding to bug tracker emails.) I think a section heading would be good (three subheads under module contents: functions, flags, and exceptions). I'm less in favor of alphabetical entries for synonyms.

[issue29000] Not matched behavior within printf style bytes formatting

2016-12-17 Thread R. David Murray
R. David Murray added the comment: OK, that makes sense. Patch looks good to me. -- ___ Python tracker ___

[issue14364] Argparse incorrectly handles '--' as argument to option

2016-12-17 Thread paul j3
paul j3 added the comment: I've copied 'dbldash.patch' over from http://bugs.python.org/issue13922. I mistakenly added it to a closed issue. The patch is old, and should be revised. It is also missing tests for this '--opt=--' case, even though it solves it. I also reference this patch

Re: Reading python list as a newsgroup (was ...)

2016-12-17 Thread Grant Edwards
On 2016-12-17, D'Arcy Cain wrote: > On 2016-12-16 08:16 PM, Dennis Lee Bieber wrote: >> Unfortunately, my client can only "pre filter" on subject and author; I >> could kill all @gmail.*, but could not focus on just Google Groups >> submissions... > > I don't know what client

Re: Reading python list as a newsgroup (was ...)

2016-12-17 Thread Grant Edwards
On 2016-12-17, Dennis Lee Bieber wrote: > On Fri, 16 Dec 2016 15:11:54 + (UTC), Grant Edwards > declaimed the following: > >>I didn't notice much spam on c.l.p (but then again, I filter out all >>posts from google-groups). The problem on

[issue28996] wcscoll is broken on Android and test_locale fails

2016-12-17 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: I'm afraid that the sentence "wcscoll/wcsxfrm have known bugs" is misleading for people who are not quite familiar with Android. The actual cause is that BioniC's setlocale() behaves differently than other platforms. Most implementations returns NULL if

[issue29000] Not matched behavior within printf style bytes formatting

2016-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch fixes this inconsistency. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file45943/bytes-format-oct-alt-zero.patch ___ Python tracker

[issue28972] Document all "python -m" utilities

2016-12-17 Thread Guido van Rossum
Guido van Rossum added the comment: I'm neutral on this idea. I would much rather focus on making sure that the various modules (such as pdb or tarfile) which have useful command-line functionality document that clearly and uniformly, but as part of each module's library docs. I don't think

[issue28996] wcscoll is broken on Android and test_locale fails

2016-12-17 Thread Xavier de Gaye
Xavier de Gaye added the comment: Here is a patch that skips test_strcoll_with_diacritic and test_strxfrm_with_diacritic. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file45942/test_locale_strcoll.patch

[issue28996] wcscoll is broken on Android and test_locale fails

2016-12-17 Thread Xavier de Gaye
Xavier de Gaye added the comment: Both strcoll() and strxfrm() are broken (character 'à' unicode code point is 'e0'): >>> import locale >>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') 'C.UTF-8' >>> locale.strcoll('\u00e0', 'b') 1 >>> locale.strxfrm('\u00e0') < locale.strxfrm('b') False The

[issue28180] sys.getfilesystemencoding() should default to utf-8

2016-12-17 Thread Nick Coghlan
Nick Coghlan added the comment: On 17 December 2016 at 20:15, Marc-Andre Lemburg wrote: > Another use case to consider is embedding the Python > interpreter in another application. In such situations, > the C locale will usually already be set by the main > application

[issue28951] re.flags not documented in Module Contents as promised.

2016-12-17 Thread kevin
kevin added the comment: Oh, and on the alphabetized list, I suggest NOT listing synonyms together, but just mark some as "synonym for X" and listing them all alphabetically (according to "en" collation, not "C" so upper- and lower-case sort together, not separately). On Sat, Dec 17, 2016 at

[issue28951] re.flags not documented in Module Contents as promised.

2016-12-17 Thread kevin
kevin added the comment: Well, my original problem is that I wanted to find out what the flags did and could not find any pointer in the table of contents. I think they deserve either really good cross-references, or a heading in the contents. And a non-confusing alphabetized list, if they're

[issue28927] bytes.fromhex should ignore all whitespace

2016-12-17 Thread Nick Coghlan
Nick Coghlan added the comment: My recollection is that fromhex() ignores spaces to account for particularly common ways of formatting hex numbers as space separated groups: "CAFE F00D" "CAFEF00D CAFEF00D CAFEF00D" "CA FE F0 0D" etc Those show up even in structured hexadecimal

[issue29000] Not matched behavior within printf style bytes formatting

2016-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is not documentation issue, but a bug in formatting octals in bytes. >>> '%#07x' % 123 '0x0007b' >>> b'%#07x' % 123 b'0x0007b' >>> '%#07o' % 123 '0o00173' >>> b'%#07o' % 123 b'000o173' ^ -- components: +Interpreter Core -Documentation nosy:

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-17 Thread Xavier de Gaye
Xavier de Gaye added the comment: This patch defines a _MAXBYTES limit of 100 Mb. The limit is checked upon reading one line and also upon reading the multi-lines of the response to a user command. -- Added file: http://bugs.python.org/file45939/nntplib_maxbytes.patch

[issue29000] Not matched behavior within printf style bytes formatting

2016-12-17 Thread woo yoo
woo yoo added the comment: Make a slight change to my code, which becomes `b'%#07x' % 34`, the weird situation appears. -- ___ Python tracker ___

[issue29000] Not matched behavior within printf style bytes formatting

2016-12-17 Thread R. David Murray
R. David Murray added the comment: The documentation matches the behavior. In this context "the first digit" is the 4. The leading zeros are the pad fill. Now, whether this is *useful* behavior or not is a separate question :) And yes, the docs could be clarified on this point either way.

[issue28951] re.flags not documented in Module Contents as promised.

2016-12-17 Thread R. David Murray
R. David Murray added the comment: Making a 'flags' subheading in module contents would be reasonable. Alternatively we could just drop that parenthetical, since the descriptions for each flag are themselves cross-linked. -- ___ Python tracker

[issue29000] Not matched behavior within printf style bytes formatting

2016-12-17 Thread woo yoo
woo yoo added the comment: The link is https://docs.python.org/3.5/library/stdtypes.html#printf-style-bytes-formatting -- ___ Python tracker ___

[issue29000] Not matched behavior within printf style bytes formatting

2016-12-17 Thread woo yoo
New submission from woo yoo: Per the documentation,"The alternate form causes a leading octal specifier ('0o') to be inserted before the first digit", However the actual behavior didn't conform to the principle. Code: >>>b'%#07o' % 34 Output: b'o42' -- assignee: docs@python

Re: To improve a script

2016-12-17 Thread Ben Finney
Smith writes: > Hello guys, > can someone help me to improve this script? Yes. Remove it from every repository; the world will be improved by removing such hostility from the internet. -- \“When you go in for a job interview, I think a good thing to | `\

Re: Mapping with continguous ranges of keys

2016-12-17 Thread Steve D'Aprano
On Sat, 17 Dec 2016 08:31 pm, Peter Otten wrote: > Steve D'Aprano wrote: > >> I have experimented with two solutions, and hope somebody might be able >> to suggest some improvements. Attached is the test code I ran, >> suggestions for improving the performance will be appreciated. > > If there

[issue9770] curses.ascii.isblank() function is broken. It confuses backspace (BS 0x08) with tab (0x09)

2016-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Most issues was fixed in issue27079. Except handling negative integers. Following patch fixes the latter issue. -- nosy: +serhiy.storchaka stage: -> patch review versions: +Python 3.6, Python 3.7 -Python 3.4 Added file:

To improve a script

2016-12-17 Thread Smith
Hello guys, can someone help me to improve this script? https://github.com/githubdavide/mitm/blob/master/mitm.py Thank you in advance Cheers -- https://mail.python.org/mailman/listinfo/python-list

[issue28999] Use Py_RETURN_NONE and like

2016-12-17 Thread STINNER Victor
STINNER Victor added the comment: py_return.patch LGTM. -- ___ Python tracker ___ ___ Python-bugs-list

[issue28180] sys.getfilesystemencoding() should default to utf-8

2016-12-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 17.12.2016 08:56, Nick Coghlan wrote: > > Making an explicit note of this so I remember to mention it in the draft PEP: > one of the biggest problems that arises in any attempt at a Python-only > solution to overriding the locale is that we can end up

[issue28999] Use Py_RETURN_NONE and like

2016-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Resulting patch is huge. I don't think it can be pushed. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file45937/py_return.patch ___ Python tracker

[issue28999] Use Py_RETURN_NONE and like

2016-12-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In the comment to issue28765 patch Victor suggested to replace "Py_INCREF(Py_None); return Py_None;" with "Py_RETURN_NONE;". Here is a Coccinelle [1] semantic patch that replaces all returns of new references to None, True or False with macros

[issue28998] Unifying Long Integers and Integers in 2.7

2016-12-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch Added file: http://bugs.python.org/file45935/py2_int_long.diff ___ Python tracker

[issue28998] Unifying Long Integers and Integers in 2.7

2016-12-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Since implementing PEP 237 (Unifying Long Integers and Integers) in Python 2.4 int and long instances became interchangeable. Virtually any function that needs an integer, accepts both int and long. But there are few places where only int is accepted.

Re: Mapping with continguous ranges of keys

2016-12-17 Thread Peter Otten
Steve D'Aprano wrote: > I have experimented with two solutions, and hope somebody might be able to > suggest some improvements. Attached is the test code I ran, suggestions > for improving the performance will be appreciated. If there was an attachment to this text -- that didn't make it to the

[issue28147] Unbounded memory growth resizing split-table dicts

2016-12-17 Thread INADA Naoki
INADA Naoki added the comment: Before Python 3.6, instance.__dict__.pop(key) didn't trigger this. But there are many way to trigger this. This bug is live from 3.3. This script reproduce this issue on Python 3.5. class C: pass a = C() a.a = 1 while True: a.__dict__.popitem() # convert

[issue26865] Meta-issue: support of the android platform

2016-12-17 Thread Xavier de Gaye
Xavier de Gaye added the comment: issue #28996: wcscoll is broken on Android and test_locale fails issue #28997: test_readline.test_nonascii fails on Android -- dependencies: +test_readline.test_nonascii fails on Android, wcscoll is broken on Android and test_locale fails

[issue28997] test_readline.test_nonascii fails on Android

2016-12-17 Thread Xavier de Gaye
New submission from Xavier de Gaye: test_nonascii has been implemented in issue 16182. The error message: == FAIL: test_nonascii (test.test_readline.TestReadline)

Re: building numpy arrays with regular structure

2016-12-17 Thread Peter Otten
Seb wrote: > Is there an easier way to write a numpy array with a regular structure? > For example, an array with [0, 1] along the diagnal of one of the array > dimensions, and zero elsewhere: > > zz = np.array([[[0, 1], [0, 0], [0, 0]], >[[0, 0], [0, 1], [0, 0]], >

[issue28596] on Android _bootlocale on startup relies on too many library modules

2016-12-17 Thread Xavier de Gaye
Xavier de Gaye added the comment: Closing the issue. Thanks for the patch Chi Hsuan Yen. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28996] wcscoll is broken on Android and test_locale fails

2016-12-17 Thread Xavier de Gaye
New submission from Xavier de Gaye: These failures happen now that issue 28596 has been fixed and that locale.getpreferredencoding(False) returns 'UTF-8'. == FAIL: test_strcoll_with_diacritic

[issue26928] _bootlocale imports locale at startup on Android, causing test_site to fail

2016-12-17 Thread Xavier de Gaye
Xavier de Gaye added the comment: Closing as invalid, it is useful to have the test failing on platforms that do not have CODESET and detect that too many modules are imported on startup. For Android, this problem is fixed in issue 28596. -- resolution: -> not a bug stage: commit

[issue28596] on Android _bootlocale on startup relies on too many library modules

2016-12-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1756beed417c by Xavier de Gaye in branch 'default': Issue #28596: The preferred encoding is UTF-8 on Android. https://hg.python.org/cpython/rev/1756beed417c -- ___ Python tracker