[issue12129] Document Object Model API - validation

2016-12-23 Thread Pradeep
Pradeep added the comment: xml minidom.py needs extra validation in setAttributes for certain special characters depending on the attribute name. Attribute values cannot have special characters like <,> and cant be nested as described in the example below element01 =

[issue29051] Improve error reporting involving f-strings (PEP 498)

2016-12-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Tracebacks should contain the first line of continuation lines ___ Python tracker

[issue29053] Implement >From_ decoding on input from mbox

2016-12-23 Thread bpoaugust
New submission from bpoaugust: The email package implements mboxo From_ mangling on output by default. However there is no provision to unmangle >From_ on input. This means that it's not possible to import mboxo files correctly. -- components: email messages: 283879 nosy: barry,

[issue14483] inspect.getsource fails to read a file of only comments

2016-12-23 Thread Pam McA'Nulty
Changes by Pam McA'Nulty : -- nosy: +Pam.McANulty ___ Python tracker ___ ___

[issue29051] Improve error reporting involving f-strings (PEP 498)

2016-12-23 Thread Chi Hsuan Yen
New submission from Chi Hsuan Yen: Here are the two examples I found confusing when playing with f-strings. The first one involves with a NameError: $ cat test2 f''' { FOO } ''' $ python3.7m test2 Traceback (most recent call last): File "test2", line 5, in ''' NameError: name 'FOO' is

[issue29052] Detect Windows platform 32bit/64bit automatically

2016-12-23 Thread Berker Peksag
Berker Peksag added the comment: Thanks, it looks like a reasonable request to me, but the issue tracker for python.org is located at https://github.com/python/pythondotorg/issues Please open a new issue there (or send a pull request) -- nosy: +berker.peksag resolution: -> third

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
New submission from Cornelius Diekmann: My OS: Debian GNU/Linux 8.6 (jessie) Python 3.4.2 pty.py from Python-3.5.2/Lib (pty.py is just a tiny, portable python file which did not see many changes) Bug Report Steps to Reproduce: I wrote a very simple python remote shell: #!/usr/bin/env

[issue29053] Implement >From_ decoding on input from mbox

2016-12-23 Thread R. David Murray
R. David Murray added the comment: Not easily. Making the feedparser more pluggable is on my wish list, but at this point someone would have to fund me for work on the email package before I'd be able to even clear the backlog to think about it :) I'd say accepting this as a new feature is a

[issue29053] Implement >From_ decoding on input from mbox

2016-12-23 Thread bpoaugust
bpoaugust added the comment: Is there any way to override the current behaviour? -- ___ Python tracker ___

[issue29052] Detect Windows platform 32bit/64bit automatically

2016-12-23 Thread Karsten Tinnefeld
New submission from Karsten Tinnefeld: When navigating https://www.python.org/ with a browser, in the main menu fly-out Downloads/Download for Windows it suggests to download the 32 bit version of the current 2.x and 3.x releases (leaving out the information that the buttons provide 32 bit

[issue14483] inspect.getsource fails to read a file of only comments

2016-12-23 Thread Sean Grider
Sean Grider added the comment: I had forgotten all about this bug until I saw an email from Pam today. The appears to still be some delay. -- ___ Python tracker

[issue29018] Misinformation when showing how slices work in The Tutorial

2016-12-23 Thread issuefinder
issuefinder added the comment: You seem to be right. Sorry about the incovenience. -- ___ Python tracker ___

[issue29051] Improve error reporting involving f-strings (PEP 498)

2016-12-23 Thread R. David Murray
R. David Murray added the comment: These are not problems with f-strings in particular, they are problems in general with the way python parsing and error reporting happens. The second is presumably (I haven't gotten around to understanding how f-strings work under the hood) an example of

[issue29026] time.time() documentation should mention UTC timezone

2016-12-23 Thread STINNER Victor
STINNER Victor added the comment: Another suggestion: mention localtime() and gmtime() in time() documentation to explain how to convert such timestamp to a more common date format. -- ___ Python tracker

[issue29055] random.choice on empty sequence should hide previous exception [patch]

2016-12-23 Thread Josh Rosenberg
Josh Rosenberg added the comment: Seems reasonable to me. -- nosy: +josh.r ___ Python tracker ___ ___

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +macOS nosy: +benjamin.peterson, mark.dickinson, ned.deily, rhettinger, ronaldoussoren ___ Python tracker

[issue14483] inspect.getsource fails to read a file of only comments

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

[issue29055] random.choice on empty sequence should hide previous exception [patch]

2016-12-23 Thread then0rTh
New submission from then0rTh: Passing empty sequence to random.choice function leads to: Traceback (most recent call last): ... ValueError: number of bits must be greater than zero During handling of the above exception, another exception occurred: Traceback (most recent call last): ...

[issue29026] time.time() documentation should mention UTC timezone

2016-12-23 Thread Eric Appelt
Eric Appelt added the comment: I had some checks performed on a Windows platform using the following snippet: # valid for 2016 import time def check(): t = time.gmtime() print(46*86400*365 + 11*86400 + (t.tm_yday-1)*86400 + t.tm_hour*3600 + t.tm_min*60 + t.tm_sec)

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Pam McA'Nulty
New submission from Pam McA'Nulty: make failed on Mac OS X including sys/random.h It looks to be caused by this commit: https://github.com/python/cpython/commit/1958527a2c5dda766b1917ab563622434b3dad0d Restoring the removed ifdefs solves the problem (see github PR) Official patch to follow

[issue29056] logging.Formatter doesn't respect more than one formatException()

2016-12-23 Thread Dan Passaro
New submission from Dan Passaro: If two formatters maintain the default implementation of Formatter.format(), but provide custom behavior for Formatter.formatException(), whichever formatException() is called first and returns something truthy is the only formatException() that is used. This is

[issue23903] Generate PC/python3.def by scraping headers

2016-12-23 Thread Steve Dower
Steve Dower added the comment: > ast.h and node.h are private headers. You're right, these should be excluded (possibly from the release too?) I've been playing with the script in a separate context and I think I've hit a few issues (though I have made some modifications, so YMMV). It's

[issue14483] inspect.getsource fails to read a file of only comments

2016-12-23 Thread Pam McA'Nulty
Pam McA'Nulty added the comment: I just clicked "Random Issue" and it seemed to be an "easy" (ish) one - which is just what I'd like to tackle over xmas break :) -- ___ Python tracker

[issue14483] inspect.getsource fails to read a file of only comments

2016-12-23 Thread R. David Murray
R. David Murray added the comment: Well, there's nobody being paid for keeping track of bugs and responding, so things do slip through the cracks. Pinging an issue after there's been a lack of response for a while is appropriate, if you notice it yourself :) (Mark, while he was trying to be

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: I wrote a proper patch for the issue of handling EOF in STDIN, including tests. My patch is against the github mirror head, but don't worry, the files I touch haven't been touched in recent years ;-) I only tested on Linux. My patch only addresses the

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Ned Deily
Ned Deily added the comment: Pam, what version of macOS / OS X did this fail on? -- ___ Python tracker ___

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Pam McA'Nulty
Pam McA'Nulty added the comment: OSX: 10.11.6 (15G1212) Xcode 8.2.1 Build version 8C1002 -- ___ Python tracker ___

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Ned Deily
Ned Deily added the comment: Argh! This is the third go-around on this problem, starting with the quick fix for macOS 10.12 in Issue28676 then on to Issue28932 where Benjamin added a more elaborate configure test when it broke OpenBSD, and now that causes builds on macOS versions earlier

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Pam McA'Nulty
Pam McA'Nulty added the comment: I will say that, though my fix seems to work, it feels that the "right" place to put the fix is in ./configure. Sadly, I don't speak './configure', though I apparently remember enough C from 17 years ago to get this working. --

[issue23903] Generate PC/python3.def by scraping headers

2016-12-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9cb87e53e324 by Serhiy Storchaka in branch '3.5': Sort and remove duplicates from PC/python3.def (issue #23903). https://hg.python.org/cpython/rev/9cb87e53e324 New changeset 0927b5c80c50 by Serhiy Storchaka in branch '3.6': Sort and remove

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Pam McA'Nulty
Pam McA'Nulty added the comment: Patch for fix -- keywords: +patch Added file: http://bugs.python.org/file46009/Issue29057_random_include.patch ___ Python tracker

[issue29056] logging.Formatter doesn't respect more than one formatException()

2016-12-23 Thread Dan Passaro
Dan Passaro added the comment: Working around this issue can be done by overriding format() in subclasses like so: def format(self, record): record.exc_text = '' try: return super().format(record) finally: record.exc_text = '' --

[issue23903] Generate PC/python3.def by scraping headers

2016-12-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Reordered to make diffs easier for reviewing. -- Added file: http://bugs.python.org/file46011/python3def.patch ___ Python tracker

[issue28695] Add SSL_CTX_set_client_cert_engine

2016-12-23 Thread Andrea Grandi
Andrea Grandi added the comment: What about using OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL) instead of OPENSSL_config()? -- nosy: +Andrea Grandi ___ Python tracker

[issue28968] xml rpc server fails with connection reset by peer error no 104

2016-12-23 Thread Martin Panter
Martin Panter added the comment: Python 2.6 is quite old and doesn’t even receive security patches any more as far as I know. I would start by trying 2.7, or failing that, try backporting the changes from Issue 6267. My guess is this is related to persistent HTTP connections being dropped. I

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Make review tool happy by giving it less broken patch format :) `make patchcheck` is already happy. Sorry for the noise :( -- Added file: http://bugs.python.org/file46015/pty_and_tests.patch ___ Python tracker

[issue29058] Mark new limited C API

2016-12-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Functions added to a limited API after 3.2 should be available only when Py_LIMITED_API is not defined or is set to corresponding hexadecimal Python version (e.g. 0x0305). Proposed patch makes following names available only for corresponding versions

[issue28559] Unclear error message when raising wrong type of exceptions

2016-12-23 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue29051] Improve error reporting involving f-strings (PEP 498)

2016-12-23 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue28702] Confusing error message when None used in expressions, eg. "'NoneType' object has no attribute 'foo'"

2016-12-23 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue28997] test_readline.test_nonascii fails on Android

2016-12-23 Thread Martin Panter
Martin Panter added the comment: The basic idea of your patch may be reasonable, but something is not right. Imagine the locale is something other than UTF-8. The input code will now contain mojibake print("\xC3\xAB"), although the decode() call will translate the result back to the expected

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Review tool still did not show the test_pty.py file. Sry. -- Added file: http://bugs.python.org/file46013/pty.patch ___ Python tracker

[issue23903] Generate PC/python3.def by scraping headers

2016-12-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue29058. -- ___ Python tracker ___ ___ Python-bugs-list

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Removed git patch header from pty.patch to make python code review tool happy. Sorry, this is my first contribution. -- Added file: http://bugs.python.org/file46012/pty.patch ___ Python tracker

[issue23903] Generate PC/python3.def by scraping headers

2016-12-23 Thread Steve Dower
Steve Dower added the comment: Good call. I think I might actually replace the script with a build step that uses the C preprocessor to get all the names, then a script to generate the file. If someone who knows the POSIX build system can help out, we could generate a list on each build for

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Martin Panter
Martin Panter added the comment: This is a change in behaviour of the _copy() loop: it will stop as soon as EOF is read from the parent’s input, and immediately close the terminal master. Unpatched, the loop continues to read output from the child, until the child closes the terminal slave.

[issue29060] Changing the installation location still adds AppData filepaths that do not exist to the path variable on Windows 10

2016-12-23 Thread Daz
New submission from Daz: New to python issue tracking; prone to ignorance. I'm on Windows 10. I noticed after checking to add Python to my path variable and then changing the location from AppData's directory that after the installation, the filepaths associated with AppData were added to the

[issue29060] Changing the installation location still adds AppData filepaths that do not exist to the path variable on Windows 10

2016-12-23 Thread Daz
Daz added the comment: New to python issue tracking; prone to ignorance. I'm on Windows 10. I noticed after checking to add Python to my path variable and then changing the location from AppData's directory that after the installation, the filepaths associated with AppData were added to the

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: So, if sys/random.h can't be included without error why does the configure check for it work? -- ___ Python tracker

[issue29059] Windows: Python not using ANSI compatible console

2016-12-23 Thread Joseph Hackman
New submission from Joseph Hackman: On windows, Python does not request that Windows enable VT100 for console output for Python. That is to say that ANSI codes such as \033[91m will function on Mac and Linux Pythons, but not Windows. As there is no good interface in core Python to the

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-12-23 Thread Carl George
Carl George added the comment: While attempting to build a Python 3.6 RPM for RHEL/CentOS 6, I noticed the following warning. *** WARNING: renaming "_sqlite3" since importing it failed: build/lib.linux-i686-3.6-pydebug/_sqlite3.cpython-36dm-i386-linux-gnu.so: undefined symbol:

[issue29060] Changing the installation location still adds AppData filepaths that do not exist to the path variable on Windows 10

2016-12-23 Thread Steve Dower
Steve Dower added the comment: You should have a set of log files in your %TEMP% directory. Could you zip them up and attach to this issue? That should show whether the installer got confused about something. Note that if you install the launcher but not for all users (the other check box on

[issue29061] secrets.randbelow(-1) hangs

2016-12-23 Thread Brian Nenninger
New submission from Brian Nenninger: secrets.randbelow(-1) causes the interpreter to hang. It should presumably raise an exception like secrets.randbelow(0) does. This is on Mac OS X 10.11.6, shell transcript below. = $ python3 Python

[issue29053] Implement >From_ decoding on input from mbox

2016-12-23 Thread bpoaugust
bpoaugust added the comment: Attached please find patch which works for me. To use it independently of email, do something like: messages = mailbox.mbox(filename, MboxoFactory) where: class MboxoFactory(mailbox.mboxMessage): def __init__(self, message=None):

[issue19756] test_nntplib: sporadic failures, network isses? server down?

2016-12-23 Thread Martin Panter
Martin Panter added the comment: Multi-connect.patch is a smaller patch that changes setUpClass() → setUp(), so that each test method creates a new NNTP connection. The downside is all the reconnecting slows the test execution from 42 s down to 115 s, which is why I would like to move the

[issue29060] Changing the installation location still adds AppData filepaths that do not exist to the path variable on Windows 10

2016-12-23 Thread Zachary Ware
Changes by Zachary Ware : -- assignee: -> steve.dower components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker

[issue15795] Zipfile.extractall does not preserve file permissions

2016-12-23 Thread Karen Tracey
Karen Tracey added the comment: Note the zipfile being processed may have been created on a non-Unix system, and the external_attr value can't be usefully interpreted as permission bits when the value at _CD_CREATE_SYSTEM (https://hg.python.org/cpython/file/default/Lib/zipfile.py#l107) in the

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-12-23 Thread R. David Murray
R. David Murray added the comment: Please open a new issue for this request. -- ___ Python tracker ___ ___

[issue14483] inspect.getsource fails to read a file of only comments

2016-12-23 Thread Pam McA'Nulty
Pam McA'Nulty added the comment: Yeah, I looked at the code and saw what you described, David. I think I'll see if there's a good place to mention this constraint in the docs and then I'll find another one (besides the macOS build issue I ran into when trying to build the latest master)

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

2016-12-23 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file46020/max_over_line.patch ___ Python tracker ___

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

2016-12-23 Thread Martin Panter
Changes by Martin Panter : Removed file: http://bugs.python.org/file46019/max_over_line.patch ___ Python tracker ___

[issue29061] secrets.randbelow(-1) hangs

2016-12-23 Thread Ned Deily
Changes by Ned Deily : -- nosy: +rhettinger, steven.daprano priority: normal -> high stage: -> needs patch versions: +Python 3.7 ___ Python tracker

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

2016-12-23 Thread Martin Panter
Martin Panter added the comment: Max_over_line.patch is my attempt: Keep the original _MAXLINES = 2048 code, but override it with _MAX_OVER_LINE = 64000 when reading OVER response lines. I also added a test case. -- Added file: http://bugs.python.org/file46019/max_over_line.patch