[issue27572] Support bytes-like objects when base is given to int()

2016-07-21 Thread Xiang Zhang

Xiang Zhang added the comment:

Thanks for the reviews Martin. Change the doc and test.

--
Added file: http://bugs.python.org/file43825/bytes_like_support_to_int_v2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-07-21 Thread Xiang Zhang

Xiang Zhang added the comment:

All tests passed now. :) I think it's OK. Also upload the v10 version restore 
the statement to avoid the crash you mentioned in comments.

[1/1] test_zlib
test_abcdefghijklmnop (test.test_zlib.ChecksumTestCase)
test issue1202 compliance: signed crc32, adler32 in 2.x ... ok
test_adler32empty (test.test_zlib.ChecksumTestCase) ... ok
test_adler32start (test.test_zlib.ChecksumTestCase) ... ok
test_crc32empty (test.test_zlib.ChecksumTestCase) ... ok
test_crc32start (test.test_zlib.ChecksumTestCase) ... ok
test_negative_crc_iv_input (test.test_zlib.ChecksumTestCase) ... ok
test_penguins (test.test_zlib.ChecksumTestCase) ... ok
test_same_as_binascii_crc32 (test.test_zlib.ChecksumTestCase) ... ok
test_big_buffer (test.test_zlib.ChecksumBigBufferTestCase) ... ok
test_badcompressobj (test.test_zlib.ExceptionTestCase) ... ok
test_baddecompressobj (test.test_zlib.ExceptionTestCase) ... ok
test_badlevel (test.test_zlib.ExceptionTestCase) ... ok
test_decompressobj_badflush (test.test_zlib.ExceptionTestCase) ... ok
test_overflow (test.test_zlib.ExceptionTestCase) ... ok
test_64bit_compress (test.test_zlib.CompressTestCase) ... ok
test_big_compress_buffer (test.test_zlib.CompressTestCase) ... ok
test_big_decompress_buffer (test.test_zlib.CompressTestCase) ... ok
test_custom_bufsize (test.test_zlib.CompressTestCase) ... ok
test_incomplete_stream (test.test_zlib.CompressTestCase) ... ok
test_large_bufsize (test.test_zlib.CompressTestCase) ... ok
test_speech (test.test_zlib.CompressTestCase) ... ok
test_speech128 (test.test_zlib.CompressTestCase) ... ok
test_64bit_compress (test.test_zlib.CompressObjectTestCase) ... ok
test_badcompresscopy (test.test_zlib.CompressObjectTestCase) ... ok
test_baddecompresscopy (test.test_zlib.CompressObjectTestCase) ... ok
test_big_compress_buffer (test.test_zlib.CompressObjectTestCase) ... ok
test_big_decompress_buffer (test.test_zlib.CompressObjectTestCase) ... ok
test_clear_unconsumed_tail (test.test_zlib.CompressObjectTestCase) ... ok
test_compresscopy (test.test_zlib.CompressObjectTestCase) ... ok
test_compressincremental (test.test_zlib.CompressObjectTestCase) ... ok
test_compressoptions (test.test_zlib.CompressObjectTestCase) ... ok
test_compresspickle (test.test_zlib.CompressObjectTestCase) ... ok
test_decompimax (test.test_zlib.CompressObjectTestCase) ... ok
test_decompinc (test.test_zlib.CompressObjectTestCase) ... ok
test_decompincflush (test.test_zlib.CompressObjectTestCase) ... ok
test_decompress_incomplete_stream (test.test_zlib.CompressObjectTestCase) ... ok
test_decompress_unused_data (test.test_zlib.CompressObjectTestCase) ... ok
test_decompresscopy (test.test_zlib.CompressObjectTestCase) ... ok
test_decompressmaxlen (test.test_zlib.CompressObjectTestCase) ... ok
test_decompressmaxlenflush (test.test_zlib.CompressObjectTestCase) ... ok
test_decompresspickle (test.test_zlib.CompressObjectTestCase) ... ok
test_empty_flush (test.test_zlib.CompressObjectTestCase) ... ok
test_flush_custom_length (test.test_zlib.CompressObjectTestCase) ... ok
test_flush_large_length (test.test_zlib.CompressObjectTestCase) ... ok
test_flush_with_freed_input (test.test_zlib.CompressObjectTestCase) ... ok
test_flushes (test.test_zlib.CompressObjectTestCase) ... ok
test_large_unconsumed_tail (test.test_zlib.CompressObjectTestCase) ... ok
test_large_unused_data (test.test_zlib.CompressObjectTestCase) ... ok
test_maxlen_custom (test.test_zlib.CompressObjectTestCase) ... ok
test_maxlen_large (test.test_zlib.CompressObjectTestCase) ... ok
test_maxlenmisc (test.test_zlib.CompressObjectTestCase) ... ok
test_odd_flush (test.test_zlib.CompressObjectTestCase) ... ok
test_pair (test.test_zlib.CompressObjectTestCase) ... ok
test_wbits (test.test_zlib.CompressObjectTestCase) ... ok

--
Ran 54 tests in 324.004s

OK
1 test OK.

--
Added file: http://bugs.python.org/file43824/64bit_support_for_zlib_v10.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-07-21 Thread Martin Panter

Martin Panter added the comment:

Here is a new patch for 2.7 that should avoid the problem with 
ChecksumBigBufferTestCase. I tested a hacked version of the test, so I am more 
confident in it now :)

--
Added file: 
http://bugs.python.org/file43823/64bit_support_for_zlib_v11-2.7.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24034] Make fails Objects/typeslots.inc

2016-07-21 Thread Martin Panter

Martin Panter added the comment:

Sorry nobody acted on your patch earlier. This is the same as Issue 26662, 
which has a more general patch that does the same sort of thing.

--
nosy: +martin.panter
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-07-21 Thread Martin Panter

Martin Panter added the comment:

I think that error message would be okay.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27586] Is this a regular expression library bug?

2016-07-21 Thread Emanuel Barry

Emanuel Barry added the comment:

For future reference, if your input can have arbitrary escapes, it might be a 
good idea to pass it through re.escape; it does proper escaping so that stuff 
like e.g. \g in your input will get treated as a literal backslash, followed by 
a literal 'g', and not an escape sequence.

--
nosy: +ebarry
type: compile error -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8406] Make some setup.py paths exclude-able

2016-07-21 Thread Matthias Bussonnier

Matthias Bussonnier added the comment:

> We regularly close issues that are 1+ year old on Jupyter/IPython or rescope 
> the issue to be actionable for contribution.

Sorry if me doing that on IPython/Jupyter recently have put you (willingc) in a 
bad position in here, sincere apologies, you are doing a great job.
On the Jupyter/IPython repositories we find that too many open issues and/or 
patch proposals open tend to repel contributors away. So we try to actively 
clean things up, especially the ones that are old and inactive. It's true that 
project might have different policies though. 

I, personally, would prefer some of my patch/issues to be closed with a "Sorry, 
we don't have time to review that and that's going to be controversial anyway, 
though we appreciate you doing the effort" than leave them in limbo with no 
responses. 

It happen of course that committers overzealously close issue, of course – we 
are human after all and make mistakes, whether we have years of experience, or  
a new contributor who does not know the protocol.  It is always a good time to 
show the example, and show how we could have improved the process.I don't think 
that making a mistake should be seen as dramatic as it's often communicated. 
After all, we have revision control, and we can reopen right ?

For example, I think that recently we [IPython/Jupyter] did a better job at 
reopening and explaining what could have been done better – and actually do it 
– instead of what was not done. But most of the time the closing of languishing 
issue was the right choice, and the cost/benefit, despite the false positive 
was worth it.

I also think the closing an issue [with or without patch], make the author 
react if they really do care, often more than that if you just ask for a status 
update. This author, in general, is often more aware of potential new issues 
that supersede the closed one and thus can link to it.

Again, I know that working on multiple projects can be hard and that practices 
that differ between project can also be hard to follow, and my recent 
spring-cleaning might have biased your practices here. Thanks for your hard 
work both on IPython/Jupyter, here and at on the PSF board, and sorry if it put 
you into trouble.

--
nosy: +mbussonn

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13849] Add tests for NUL checking in certain strs

2016-07-21 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13849] Add tests for NUL checking in certain strs

2016-07-21 Thread STINNER Victor

STINNER Victor added the comment:

issue13849.diff: LGTM.

If the tests pass on Python 2.7 and 3.5, I think that it's worth to add the 
tests to these versions as well.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27580] CSV Null Byte Error

2016-07-21 Thread Skip Montanaro

Skip Montanaro added the comment:

Thanks. The display you showed looks about like I saw in LibreOffice. If you 
export it back to another CSV file, does the new file match the original 
exactly, or does (like LibreOffice) it save a file without NUL bytes?

I don't mind having the discussion, but even though we have traditionally 
treated CSV files as binary files in Python (at least when I was closely 
involved in the 2.x days), that was mostly so end-of-line sequences weren't 
corrupted. As others have pointed out, in 2.x Python String objects stored the 
data as a normal NUL-terminated pointer-to-char for efficiency when interacting 
with C libraries. C uses NUL as a string terminator, so we couldn't work with 
embedded NULs. I haven't looked at the 3.x string stuff (I know Unicode is much 
more intimately involved). If it still maintains that close working 
relationship with the typical C strings, supporting NUL bytes will be 
problematic.

In cases where the underlying representation isn't quite what I want, I've been 
able to get away with a file wrapper which suitably mangles the input before 
passing it up the chain to the csv module. For example, the __next__ method of 
your file wrapper could delete NULs or replace them with something suitably 
innocuous, like "\001", or some other non-printable character you are certain 
won't be in the input. If you want to preserve NULs, reverse the translation 
during the write().

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26533] logging.config does not allow disable_existing_loggers=True

2016-07-21 Thread Vinay Sajip

Vinay Sajip added the comment:

> That's not really what this is about.

As I see it, it's about the ability to configure disabling of existing loggers 
on reconfiguration via the listener. While it can't be done using fileConfig(), 
it *can* be done using dictConfig().

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26533] logging.config does not allow disable_existing_loggers=True

2016-07-21 Thread Grazfather x

Grazfather x added the comment:

That's not really what this is about. This is about setting up the listener so 
that by default that setting is used.

In logging/config.py:

```python
def listen(port=DEFAULT_LOGGING_CONFIG_PORT, verify=None):
...
try:
fileConfig(file)
except Exception:
traceback.print_exc()
...

def fileConfig(fname, defaults=None, disable_existing_loggers=True):
...
```

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27586] Is this a regular expression library bug?

2016-07-21 Thread Bruce Eckel

Bruce Eckel added the comment:

Urk. There was exactly a \g in the input. Sorry for the bother.

--
resolution:  -> not a bug

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27586] Is this a regular expression library bug?

2016-07-21 Thread Tim Peters

Changes by Tim Peters :


--
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27586] Is this a regular expression library bug?

2016-07-21 Thread Tim Peters

Tim Peters added the comment:

Well, some backslash escapes are processed in the "replacement" argument to 
`.sub()`.  If your replacement text contains a substring of the form

\g

not immediately followed by

<

that will raise the exception you're seeing.  The parser is expecting to see a 
"matched group" reference after "\g", like

\g<1>
\g

So it depends on the value of your `new_output`.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27580] CSV Null Byte Error

2016-07-21 Thread Bobby Ocean

Bobby Ocean added the comment:

I attempted to open the file in excel; raised no errors. 

In any case (regardless of Microsoft-concerns), I am glad to see a discussion 
started and possibly some concern that an update might be useful to the 
community (it would certainly cut down on the number of stack-exchange posts 
about this very topic). I certainly would put my vote to have csv handle the 
NULL byte, in the same way as python does natively. 

Thanks for you time. Oh, and since you are one of the author's, thanks for 
writing/working on the csv module, VERY USEFUL. :-)

--
Added file: http://bugs.python.org/file43822/Opening_CSV.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27586] Is this a regular expression library bug?

2016-07-21 Thread Bruce Eckel

Bruce Eckel added the comment:

Sorry, I thought maybe the error message would be indicative of something. 
Here's the re:

find_output = re.compile(r"/\* (Output:.*)\*/", re.DOTALL)

Here's the program:

#! py -3
# Requires Python 3.5
# Updates generated output into extracted Java programs in "On Java 8"
from pathlib import Path
import re
import pprint
import sys

if __name__ == '__main__':
find_output = re.compile(r"/\* (Output:.*)\*/", re.DOTALL)
for outfile in Path(".").rglob("*.p1"):
print(str(outfile))
javafile = outfile.with_suffix(".java")
if not javafile.exists():
print(str(outfile) + " has no javafile")
sys.exit(1)
javatext = javafile.read_text()
if "/* Output:" not in javatext:
print(str(javafile) + " has no /* Output:")
sys.exit(1)
new_output = outfile.read_text()
new_javatext = find_output.sub(new_output, javatext)
javafile.write_text(new_javatext)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27586] Is this a regular expression library bug?

2016-07-21 Thread Tim Peters

Tim Peters added the comment:

If you don't show us the regular expression, it's going to be darned hard to 
guess what it is ;-)

--
nosy: +tim.peters

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27586] Is this a regular expression library bug?

2016-07-21 Thread Bruce Eckel

New submission from Bruce Eckel:

This looks suspicious to me, like it could be a library bug, but before chasing 
it down I was hoping someone might be able to tell me whether I might be on to 
something:

Traceback (most recent call last):
  File "update_extracted_example_output.py", line 22, in 
new_javatext = find_output.sub(new_output, javatext)
  File "C:\Python35\lib\re.py", line 325, in _subx
template = _compile_repl(template, pattern)
  File "C:\Python35\lib\re.py", line 312, in _compile_repl
p = sre_parse.parse_template(repl, pattern)
  File "C:\Python35\lib\sre_parse.py", line 872, in parse_template
raise s.error("missing <")
sre_constants.error: missing < at position 100 (line 4, column 41)

--
components: Library (Lib)
messages: 270956
nosy: Bruce Eckel
priority: normal
severity: normal
status: open
title: Is this a regular expression library bug?
type: compile error
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27546] Integrate tkinter and asyncio (and async)

2016-07-21 Thread Guido van Rossum

Guido van Rossum added the comment:

> Who actually wrote it [crawl.py], that would understand it?

I wrote it, and I can probably still recover my understanding of it.  Basically 
you say "python3 crawl.py xkcd.com -q" and it crawls the XKCD.com website -- 
that takes about 4 seconds on my machine, fetching 1764 urls. The -q is to make 
it more quiet while it's working -- but somehow it doesn't suppress the final 
report, which includes a full list of all crawled URLs -- this could use some 
surgery to pass the log level into Fetcher.report().  A test site that has only 
one URL is www.pythonlabs.com.

I ran the test program (tkaloop.py) and it appears to work, with one caveat: 
updates in response to Tk events (specifically clicking the button that toggles 
the color of the "Hello" label) seem to take an effect only once the 
self.root.update() call in your run_forever() is made, which appears to be only 
once per "interval" (i.e. 1 second).

Hopefully future development will make it so that when a Tk event happens, 
*somehow* the asyncio selector gets woken up.

(PS. Please don't abbreviate asyncio to aio. It makes your code harder to read 
for asyncio veterans. :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13849] Add tests for NUL checking in certain strs

2016-07-21 Thread Berker Peksag

Berker Peksag added the comment:

Attached patch adds tests for common members of Lib/genericpath.py.

--
keywords: +patch
nosy: +berker.peksag
stage: needs patch -> patch review
versions: +Python 3.6 -Python 3.4
Added file: http://bugs.python.org/file43821/issue13849.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26533] logging.config does not allow disable_existing_loggers=True

2016-07-21 Thread Vinay Sajip

Vinay Sajip added the comment:

I think this is just a documentation issue. You can send a dictionary suitable 
for dictConfig() as JSON over the listen() socket. This is supported by 2.7 and 
3.2+ - the documentation doesn't mention this, though.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1521950] shlex.split() does not tokenize like the shell

2016-07-21 Thread R. David Murray

R. David Murray added the comment:

No objection from me.  I'm not likely to have the time to give it the kind of 
thorough review I'd *like* to, but I don't think it is really needed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27144] concurrent.futures.as_completed() memory inefficiency

2016-07-21 Thread Rob Nester

Changes by Rob Nester :


--
nosy: +rnester

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27580] CSV Null Byte Error

2016-07-21 Thread Skip Montanaro

Skip Montanaro added the comment:

I wasn't familiar with RFC 4180. (Or, quite possibly, I forgot I used to be 
familiar with it.) Note that at the bottom of the BNF definition of the file 
structure is the definition of TEXTDATA:

TEXTDATA =  %x20-21 / %x23-2B / %x2D-7E

That pretty explicitly excludes NUL bytes (%x00 I think).

I'd still like someone load my nul.csv file into Excel and report back what it 
does (or doesn't) do with it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-21 Thread Vinay Sajip

Vinay Sajip added the comment:

> the answer would be "not at all".

Not sure about that. If all logging did were to pass the path to lower levels 
such as open or abspath, that may be true. However, some handlers do path 
computations (e.g. the rotating file handlers) and so logging would need to 
have a minimal awareness of PEP 519 or else call str() on any putative filename 
passed in, and be completely unaware of it (assuming that str() on a Path would 
return the same as __fspath__().

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1521950] shlex.split() does not tokenize like the shell

2016-07-21 Thread Vinay Sajip

Vinay Sajip added the comment:

This has been knocking around since 3.3, but never got enough attention to make 
it in. Barring objections from anyone, I'd like to commit this patch once I 
check that it applies cleanly against 3.6, before we get into 3.6 beta.

--
versions: +Python 3.6 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27580] CSV Null Byte Error

2016-07-21 Thread Bobby Ocean

Bobby Ocean added the comment:

I am sorry I must have mis-read the history part of that article.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27585] asyncio.Lock deadlock after cancellation

2016-07-21 Thread R. David Murray

R. David Murray added the comment:

If you give the loop a chance to run (an await asyncio.sleep(0)) before doing 
the acquire) it does not deadlock.  I don't understand enough of the asyncio 
internals to know if this is expected or a bug.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Stephen J. Turnbull

Stephen J. Turnbull added the comment:

I still think the easiest thing to do would be to make all non-ASCII characters 
instances of "invalid_character_token", self-delimiting in the same way that 
operators are.  That would automatically point to exactly the right place in 
the token stream, and requires zero changes to the error handling code.

I don't have time to look at the code, but I suspect that you could handle this 
exactly the same way that ? and $ are handled, and maybe even use the same 
token type.

--
nosy: +sjt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27580] CSV Null Byte Error

2016-07-21 Thread R. David Murray

R. David Murray added the comment:

Bobby: Skip is one of the authors of the csv module, and has been maintaining 
it since it was added to the standard library.  He knows whereof he speaks: 
there is no standard for csv (as noted in the article you link), and all csv 
parsers that want to be interoperable refer back to Microsoft's implementation 
when dealing with any quirks.  That implementation currently is Excel.

That said, your are right that others have adopted the format, and there is an 
argument to be made that we don't have to *limit* ourselves to what Microsoft 
supports.  Although we probably don't want to be emitting stuff that they don't 
without being explicit about it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27585] asyncio.Lock deadlock after cancellation

2016-07-21 Thread sss

New submission from sss:

The lock.py file prints

DEADLOCK HERE
_locked:  False
_waiters: deque([])

I think the problem is that acquire() will block because of the cancelled 
future in _waiters, but release() has already ran so no one will wake it up.

--
components: asyncio
files: lock.py
messages: 270944
nosy: gvanrossum, haypo, sss, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.Lock deadlock after cancellation
versions: Python 3.5
Added file: http://bugs.python.org/file43820/lock.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26944] android: test_posix fails

2016-07-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> Is there a plan to make Android a supported platform in 3.6?

Answer in the Android meta-issue at msg 270942.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-07-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Larry asked in msg 270937:
> Is there a plan to make Android a supported platform in 3.6?

This is the list of Android related issues that will modify the standard 
library and core Python when fixed:

issue 16255: subrocess.Popen needs /bin/sh but Android only has 
/system/bin/sh
[1] issue 26851: android compilation and link flags
issue 22724: byte-compile fails for cross-builds
issue 23968: rename the platform directory from plat-$(MACHDEP) to 
plat-$(PLATFORM_TRIPLET)
issue 26919: android: test_cmd_line fails
issue 26920: android: test_sys fails
issue 26928: _bootlocale imports locale at startup on Android, causing 
test_site to fail
issue 26937: android: test_tarfile fails
issue 26934: android: test_faulthandler fails
issue 26929: android: test_strptime fails
[2] issue 26942: android: test_ctypes crashes on armv7

All the other issues listed here in this meta-issue are changes to the test 
suite (mostly skipping some tests). A buildbot must also be setup for the 
Android emulators and maybe also for an Android device. That means installing 
the Android sdk and ndk and a build system on the buildbot.

[1] Issue 26851 is an enhancement.
[2] The root cause in issue 26942 is unknown yet.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Chris Angelico

Chris Angelico added the comment:

Attached is a combined patch that has the new private function for 
IsIdentifier, method 4's error handling change, and a bit of glue in the middle 
to make use of it. The result is a passing test suite (bar test_site which was 
already failing on my system) and a caret that points to the errant Unicode 
character, or the beginning of the identifier if it's a decode problem.

--
Added file: http://bugs.python.org/file43819/combined.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Chris Angelico

Chris Angelico added the comment:

Hmm, that'd be curious. The code to do that is actually pretty simple - see 
attached patch - but actually using that to affect error messages is a bit 
harder. Is it safe to mess with tok->start?

--
Added file: 
http://bugs.python.org/file43818/where-did-that-error-come-from.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27562] Import error encodings (Windows xp compatibility)

2016-07-21 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27580] CSV Null Byte Error

2016-07-21 Thread Bobby Ocean

Bobby Ocean added the comment:

@ Skip Montanaro, 

Actually, CSV has nothing to do with excel. Excel is a gui that processes CSV 
like many other programs. CSV stands for comma seperated values and is basic 
standard for data.https://en.m.wikipedia.org/wiki/Comma-separated_values

As far as I know, many programs handle NULL bytes fine (either as a empty 
atring or a # or something else). In any case, it really should be irrelevent 
how some particular programs handle a CSV file.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23951] Update devguide style to use a similar theme as Docs

2016-07-21 Thread STINNER Victor

STINNER Victor added the comment:

Thanks.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26944] android: test_posix fails

2016-07-21 Thread Larry Hastings

Larry Hastings added the comment:

Is there a plan to make Android a supported platform in 3.6?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26944] android: test_posix fails

2016-07-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

New patch with cosmetic changes.

--
assignee:  -> xdegaye
stage:  -> patch review
Added file: http://bugs.python.org/file43817/test_getgroups_2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-07-21 Thread Cathy Avery

New submission from Cathy Avery:

I have added AF_VSOCK support to python's 3.6 socket module ( socketmodule.c 
socketmodule.h cloned from https://hg.python.org/cpython ). The implementation 
is very similar to AF_NETLINK.  AF_VSOCK requires the VMware-specific VMCI 
transport which is currently upstream or the virtio-vsock drivers developed by 
Stefan Hajnoczi at Red Hat. The virtio-vsock drivers are not upstream yet but 
more information with source and build instructions can be found at 
http://qemu-project.org/Features/VirtioVsock.

More information on vSocket programming can be found at 
https://pubs.vmware.com/vsphere-60/topic/com.vmware.ICbase/PDF/ws9_esx60_vmci_sockets.pdf

The VMCI transport supports SOCK_DGRAM and SOCK_STREAM on both Linux and 
Windows. Virtio-vsock currently supports SOCK_STREAM only on Linux.

My python addition supports SOCK_STREAM and SOCK_DGRAM calls on Linux only.

I have tested my implementation on both driver sets on Linux.

Attached is a diff file so you can see which files I've modified. These include 
a new configure.ac. I have already tested the new file generation by running 
autoreconf. 

Also included in the patch is an updated socket.rst file however I could not 
get the final html page to be double spaced.

--
components: Library (Lib)
files: vsocket.patch
hgrepos: 349
keywords: patch
messages: 270935
nosy: Cathy Avery, gregory.p.smith
priority: normal
severity: normal
status: open
title: New addition of vSockets to the python socket module
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43816/vsocket.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23951] Update devguide style to use a similar theme as Docs

2016-07-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5a19fbb8501f by Zachary Ware in branch 'default':
Issue #23951: Add missing icon
https://hg.python.org/devguide/rev/5a19fbb8501f

New changeset 0f642c1ba901 by Zachary Ware in branch 'default':
Issue #23951: Clean up rstlint makefile integration
https://hg.python.org/devguide/rev/0f642c1ba901

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27583] configparser: modifying default_section at runtime

2016-07-21 Thread R. David Murray

R. David Murray added the comment:

We use the versions field to indicate which versions it might get fixed in.  
Since this is not a security issue, that would be 3.5 and 3.6, if it doesn't 
affect 2.7.  If we decide to make the code match the docs, it will probably 
only get fixed in 3.6, since it is a behavior change.

--
nosy: +r.david.murray
versions:  -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Nick Coghlan

Nick Coghlan added the comment:

Looking at issue 2382, I agree that's a different problem (I'm seeing the 
current misbehaviour even though everything is consistently encoded as UTF-8)

The main case we're interested in here is the PyUnicode_IsIdentifier one, so if 
we wanted to do better than "start or end of the token", we could introduce a 
new internal "_PyUnicode_FindNonIdentifier" that reported the position of the 
first non-identifier character (or -1 if it's a valid identifier).

Unfortunately, I'm not at all familiar with parsetok.c myself (my own work with 
the code generator has been from the AST on), so I don't have a ready answer 
for your other questions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27583] configparser: modifying default_section at runtime

2016-07-21 Thread rk

Changes by rk :


Removed file: 
http://bugs.python.org/file43815/bug_configparser_default_section.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27583] configparser: modifying default_section at runtime

2016-07-21 Thread rk

rk added the comment:

Verified/tested with Python 2.7.9, 3.2.6, 3.3.6, 3.4.2, 3.5.1.
The bug exists in all versions, so I've added 3.2, 3.3, 3.4 again.

I've also attached an updated testcase, which now works in both Python 2 and 
Python 3.

--
versions: +Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file43815/bug_configparser_default_section.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27583] configparser: modifying default_section at runtime

2016-07-21 Thread rk

rk added the comment:

(removed Python 2.7, since default_section was not supported there)

--
versions:  -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Chris Angelico

Chris Angelico added the comment:

BTW, here's how a session looks using method 4's change:

>>> varname = asdf“d“a”t”apoint
  File "", line 1
varname = asdf“d“a”t”apoint
  ^
SyntaxError: invalid character in identifier
>>> varname = asdf“d“a”t”apoint.evidence
  File "", line 1
varname = asdf“d“a”t”apoint.evidence
  ^
SyntaxError: invalid character in identifier
>>> varname = $d$a$t$apoint
  File "", line 1
varname = $d$a$t$apoint
  ^
SyntaxError: invalid syntax
>>> varname = asdf$d$a$t$apoint
  File "", line 1
varname = asdf$d$a$t$apoint
  ^
SyntaxError: invalid syntax
>>> varname = 0o1234987654 + 123
  File "", line 1
varname = 0o1234987654 + 123
^
SyntaxError: invalid syntax
>>> varname = "asdf" + "qwer
  File "", line 1
varname = "asdf" + "qwer
   ^
SyntaxError: EOL while scanning string literal

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26081] Implement asyncio Future in C to improve performance

2016-07-21 Thread Yury Selivanov

Yury Selivanov added the comment:

Yes. Most people will use vanilla asyncio anyways.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Chris Angelico

Changes by Chris Angelico :


Added file: http://bugs.python.org/file43813/method3-change-all-errors.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Chris Angelico

Changes by Chris Angelico :


Added file: http://bugs.python.org/file43812/method2-change-cur-and-inp.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Chris Angelico

Changes by Chris Angelico :


Added file: 
http://bugs.python.org/file43814/method4-change-all-errors-if-possible.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Chris Angelico

Chris Angelico added the comment:

Actually pinpointing the invalid character may be impractical, as there are two 
boolean situations: either a UnicodeDecodeError (because you had an invalid 
UTF-8 stream), or PyUnicode_IsIdentifier returns false. Either way, it applies 
to the whole identifier. So there are a few possibilities, corresponding to the 
patches I'm attaching.

1) Change the way this one specific error is handled, in tokenizer.c 
verify_identifier(). If it finds an error, adjust tok->cur to point to the 
beginning of it. No new failures in test suite.

2) As above, but also change tok->inp, because of this comment in 
tokenizer.h:31 /* NB If done != E_OK, cur must be == inp!!! */ which I have no 
idea about the meaning of. This results in truncated error messages, but 
suggests that method 1 might be breaking an invariant that results in breakage 
elsewhere. If there are, though, they're not exercised by 'make test', which 
itself may be a problem. No new test failures.

3) Change the handling of ALL parser errors, in parsetok.c parsetok(), so now 
they all point to tok->start. Octal literals with 8s or 9s in them now get the 
caret pointing to the invalid digit, rather than the end of the literal. 
Unterminated strings point to the opening quote. And some forms of 
IndentationError now segfault Python. Test suite fails (unsurprisingly).

4) In response to the above segfault, hack it back to the old way of doing 
things if there's no tok->start. Maybe the condition should be done 
differently? No new failures in the test suite.

I'd ideally like to use the technique from method 3 (either as patch 4 or with 
some other guard condition). Failing that, can anyone explain the "NB" above, 
and what ought to be done to comply with it?

--
keywords: +patch
Added file: http://bugs.python.org/file43811/method1-change-cur.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27580] CSV Null Byte Error

2016-07-21 Thread Skip Montanaro

Skip Montanaro added the comment:

Beyond whether or not the csv module can handle NUL bytes, you might figure out 
if Excel will. Since the CSV format isn't some sort of "standard", its 
operational definition has always been what Excel will produce or consume.

I don't have Excel (not a Windows guy), but I do have Gnumeric and LibreOffice. 
I constructed a simple CSV file by hand which contains several NUL bytes to see 
what they would do. Gnumeric pops up a dialog and converts them to spaces (and 
then, oddly enough, doesn't think the file has been modified). LibreOffice 
didn't complain while loading the file, but when I saved it, it silently 
deleted the NULs.

I've attached the file should anyone like to experiment with other spreadsheets.

--
Added file: http://bugs.python.org/file43810/nul.csv

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27580] CSV Null Byte Error

2016-07-21 Thread R. David Murray

R. David Murray added the comment:

By "discussed before" I presume you are referring to issue 1599055.

It is true that have been changes since then in Python's handling of null 
bytes.  Perhaps it is indeed time to revisit this.  I'll leave that to the 
experts...this can be closed as a duplicate of issue 1599055 if I'm wrong about 
things having possibly changed in the interim.

--
nosy: +r.david.murray, serhiy.storchaka, skip.montanaro

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27583] configparser: modifying default_section at runtime

2016-07-21 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +lukasz.langa
versions:  -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27578] inspect.findsource raises exception with empty __init__.py

2016-07-21 Thread R. David Murray

R. David Murray added the comment:

I think someone should propose a patch with tests and we'll evaluate it.  We 
prefer to retain backward compatibility even on undocumented interfaces, if 
possible, but yes they are more open to change (though only in a feature 
release, in general).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26081] Implement asyncio Future in C to improve performance

2016-07-21 Thread Marco Paolini

Marco Paolini added the comment:

THe guys developing uvloop say their implementation is already quite fast [1]. 
Is it worth integrating it?

[1] https://github.com/MagicStack/uvloop

--
nosy: +mpaolini

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26859] unittest fails with "Start directory is not importable" when trying to run sourceless tests

2016-07-21 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
stage: test needed -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Chris Angelico

Chris Angelico added the comment:

The question was raised that there might be a problem with (UTF-8) bytes vs 
characters, but that's definitely not it - pythonrun.c:1362 UTF-8-decodes the 
line of source and then gets its character length to use as the new offset. So 
I don't think this is a duplicate of 2382.

(Side point: There appears to be quite a bit of complexity inside the CPython 
parser to cope with the fact that it does everything in UTF-8 bytes rather than 
simply decoding to text and lexing that. I presume that's for the sake of 
efficiency - that it'd be too slow to work through PyUnicode everywhere?)

Am looking into the rest.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Berker Peksag

Berker Peksag added the comment:

This looks like a duplicate of issue 2382.

--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26852] android: add a COMPILEALL_FLAGS Makefile variable

2016-07-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> The python '-E' option was needed on 3.4 when this patch was first 
> implemented and is not needed anymore

See msg 269359 in issue 22724.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

2016-07-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

New patch that does not call sysconfig.get_config_var() on platforms that have 
'/bin/sh'.

--
Added file: http://bugs.python.org/file43809/unix_shell_16255_2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27583] configparser: modifying default_section at runtime

2016-07-21 Thread rk

New submission from rk:

Modifying "default_section" in the configparser at runtime does not behave as 
described.

The documentation says about default_section: 

When default_section is given, it specifies the name for the special section 
holding default values for other sections and interpolation purposes (normally 
named "DEFAULT"). This value can be retrieved and changed on runtime using the 
default_section instance attribute.
[https://docs.python.org/3/library/configparser.html]

So, if I modify default_section at runtime, the default values for other 
sections should then come from the new default_section. But this is not the 
case. Instead, the default-values still come from self._default, which was set 
by self._read.

So, this is either a bug in the library or a bug in the documentation.

I've attached a testcase.

--
components: Library (Lib)
files: bug_configparser_default_section.py
messages: 270918
nosy: rk
priority: normal
severity: normal
status: open
title: configparser: modifying default_section at runtime
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43808/bug_configparser_default_section.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2016-07-21 Thread Patrick Stewart

Patrick Stewart added the comment:

I've attached a patch with an extra fix to the duplicated issue 20160 
http://bugs.python.org/issue20160

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2016-07-21 Thread Patrick Stewart

Patrick Stewart added the comment:

This is still a problem, and the suggested fix seems to work. There is another 
error a few lines above where it is allocating 4 bytes for a pointer. I've 
attached a new patch with both fixes, but without Bob's tests.
This issue is a duplicate of 17310

--
nosy: +Patrick Stewart
Added file: http://bugs.python.org/file43807/ffi_msvc.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-07-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Issue 24034 is a duplicate.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Chris Angelico

Changes by Chris Angelico :


--
nosy: +Rosuav

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Nick Coghlan

New submission from Nick Coghlan:

Reporting by Rustom Mody on python-ideas, the SyntaxError caret is confusingly 
mispositioned when an invalid Unicode codepoint appears as part of a larger 
sequence of invalid codepoints and/or valid identifier characters:

>>> varname = “d“a”t”apoint
  File "", line 1
varname = “d“a”t”apoint
  ^
SyntaxError: invalid character in identifier
>>> varname = “d“a”t”apoint.evidence
  File "", line 1
varname = “d“a”t”apoint.evidence
  ^
SyntaxError: invalid character in identifier
>>> varname = “d“a”t”apoint[evidence]
  File "", line 1
varname = “d“a”t”apoint[evidence]
  ^
SyntaxError: invalid character in identifier
>>> varname = “d“a”t”apoint(evidence)
  File "", line 1
varname = “d“a”t”apoint(evidence)
  ^
SyntaxError: invalid character in identifier

If the invalid character is a non-identifiers ASCII character, the error 
message loses the trailing "in identifier" phrase and points to the correct 
place:

>>> varname = $d$a$t$apoint
  File "", line 1
varname = $d$a$t$apoint
  ^
SyntaxError: invalid syntax
>>> varname = d$a$t$apoint
  File "", line 1
varname = d$a$t$apoint
   ^
SyntaxError: invalid syntax
>>> varname = ^d$a$t$apoint
  File "", line 1
varname = ^d$a$t$apoint
  ^
SyntaxError: invalid syntax
>>> varname = !d$a$t$apoint
  File "", line 1
varname = !d$a$t$apoint
  ^
SyntaxError: invalid syntax
>>> varname = `d$a$t$apoint
  File "", line 1
varname = `d$a$t$apoint
  ^
SyntaxError: invalid syntax

--
messages: 270914
nosy: ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Mispositioned SyntaxError caret for unknown code points
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-07-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

So the error message could be ('$@' being the target):

Cannot generate $@, python not found !
To skip re-generation of $@ run 'make touch' or 'make -t $@'.
Otherwise, set python in PATH and run configure or run make with 
PYTHON_FOR_GEN=python.

Martin, what do you think ?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27578] inspect.findsource raises exception with empty __init__.py

2016-07-21 Thread Antti Haapala

Antti Haapala added the comment:

It must be noted that `getlines` itself is not documented, and thus there is no 
backwards-compatibility to preserve really. `getline` returns '' for *any* 
erroneous line, so it wouldn't affect it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27578] inspect.findsource raises exception with empty __init__.py

2016-07-21 Thread Antti Haapala

Antti Haapala added the comment:

Or perhaps getlines should return [''] for empty regular files?

--
nosy: +ztane

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27562] Import error encodings (Windows xp compatibility)

2016-07-21 Thread Iovan Irinel

Iovan Irinel added the comment:

Still searching for someone who can do it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27580] CSV Null Byte Error

2016-07-21 Thread SilentGhost

Changes by SilentGhost :


--
versions: +Python 3.6 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com