[issue32801] Lib/_strptime.py: utilize all()

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Just

if not any(to_convert):
return ''

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2018-02-09 Thread Cecile Tonglet

Cecile Tonglet  added the comment:

I see that the patch hasn't been applied to master on GitHub. Is there anything 
else expected from me on this ticket?

--

___
Python tracker 

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



[issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers

2018-02-09 Thread Steffen Ullrich

New submission from Steffen Ullrich :

The current implementation of shared_ciphers uses the SSL_get_ciphers method. 
This method returns the list of configured ciphers (i.e. from the context) and 
not the list of ciphers shared between client and server. 

To get this list one can use the documented SSL_get_client_ciphers for OpenSSL 
>= 1.1.0, access ssl->sessions->ciphers directly or parse the result from the 
undocumented SSL_get_shared_ciphers for older versions of OpenSSL.

See also 
https://stackoverflow.com/questions/48717497/python-ssl-shared-ciphers-not-as-documented/48718081#48718081

--
messages: 311940
nosy: noxxi
priority: normal
severity: normal
status: open
title: SSL shared_ciphers implementation wrong - returns configured but not 
shared ciphers
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you Fangyi Zhou for your report and fix. Changes are trivial and didn't 
require to sign CLA.

--

___
Python tracker 

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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
priority: critical -> normal

___
Python tracker 

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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 5df5286abda57a0b3865d4fc3e25aaf1a820ef49 by Serhiy Storchaka 
(Zhou Fangyi) in branch 'master':
bpo-30688: Import unicodedata only when needed. (GH-5606)
https://github.com/python/cpython/commit/5df5286abda57a0b3865d4fc3e25aaf1a820ef49


--

___
Python tracker 

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



[issue32779] urljoining an empty query string doesn't clear query string

2018-02-09 Thread Paul Fisher

Paul Fisher  added the comment:

I'm working on a patch for this and can have one up in the next week or so, 
once I get the CLA signed and other boxes ticked.  I'm new to the Github 
process but hopefully it will be a good start for the discussion.

--

___
Python tracker 

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



Re: Incremental compression

2018-02-09 Thread Steven D'Aprano
On Fri, 09 Feb 2018 17:52:33 -0800, Dan Stromberg wrote:

> Perhaps:
> 
> import lzma
> lzc = lzma.LZMACompressor()

Ah, thanks for the suggestion!



-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread Steven D'Aprano
On Fri, 09 Feb 2018 17:30:57 -0800, codewizard wrote:

> Regardless of what the policies are and how well they're enforced, if
> the mailing list is cut off from GG, I will stop reading it.

There is *absolutely nothing* we can do about that. Google doesn't listen 
to us, and the suggestion that we can influence them because Guido van 
Rossum used to work for them many years ago is naive.

We cannot influence Google's decision about the newsgroup; we cannot 
convince your boss to allow access to the newsgroup at work; and 
apparently we can't convince you that just because you will no longer be 
able to access it from work, doesn't mean you have to stop accessing it 
from home. Oh well, such is life.

(Ironically, the vast bulk of spam on the newsgroup comes from Google 
Groups itself, so if this does happen, it will probably be a nett win for 
the community, even if it does negatively impact some individuals.)


> Probably
> not a big loss to anyone else, but you might wonder how many others are
> in the same situation...

There's nothing we can do about it, so there is no point wasting time 
wondering.


-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32807] Add 'str' property to PathLib

2018-02-09 Thread Arka

Arka  added the comment:

@Serhiy

No, I wasn't aware of that.

@R. David Murray

Thank you, David. What you said, makes sense and I agree with you.

--

___
Python tracker 

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



[issue32804] urllib.retrieve documentation doesn't mention context parameter

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +orsenthil

___
Python tracker 

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



[issue32801] Lib/_strptime.py: utilize all()

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This looks straightforward.  I believe we normally do not backport this type of 
change.  The tests for _strptime.py are in test_strptime.py, not 
test__strptime.py.

--
nosy: +terry.reedy
stage:  -> patch review
type:  -> performance

___
Python tracker 

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



[issue32800] Replace deprecated link to new page on w3c site

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Ah, yes, the 'big red message' nicely gives the replacement.  Please submit a 
PR against master.  Include a news blurb if you can (explained in the 
devguide).  If you cannot set the backport labels (I don't know of 
non-committer author's are allowed to, mention that all 3 are needed in a 
comment (I checked 2.7 and 3.8).

--
nosy: +terry.reedy
stage:  -> needs patch
type: enhancement -> behavior
versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue32793] smtplib: duplicated debug message

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +giampaolo.rodola
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue32786] Didnot work strftime() when hangeul in format sting

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

There are hundreds of bug fixes in 3.6 that are not in 3.4.  If there is a 
Django version that works with 3.6 and you can otherwise upgrade, think about 
doing so.

--
nosy: +terry.reedy
resolution:  -> out of date
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



[issue32755] Several cookies with the same name get intermixed

2018-02-09 Thread Nitish

Change by Nitish :


--
nosy: +nitishch

___
Python tracker 

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



[issue32782] ctypes: memoryview gives incorrect PEP3118 itemsize for array of length zero

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge

___
Python tracker 

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



[issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue32779] urljoining an empty query string doesn't clear query string

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +orsenthil

___
Python tracker 

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



[issue32767] Mutating a list while iterating: clarify the docs

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Replace 'sequence' with 'collection' and I agree.  The for loop code just calls 
iter() and it.next() until an exception.  The behavior of it.next for builtins 
should be documented with the builtins.  (I think there is something already 
about dict iteration in the dict entry.)

I agree we should say that the list iterator checks the internal index against 
the current .__len__() on each .next call.  I had not thought about the 
usefullness of doing that for breadth-first search, so yes, mention that.

--
nosy: +terry.reedy
versions:  -Python 2.7, Python 3.4, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue32812] edited code only runs after closing and re-opening Python.

2018-02-09 Thread Ned Deily

Ned Deily  added the comment:

OK, since you are using Spyder, you should ask for help with it.  On the Spyder 
project page (https://pythonhosted.org/spyder/index.html), it looks like there 
is a Spyder forum here:

   https://groups.google.com/forum/#!forum/spyderlib

Trying asking there.  Good luck!

--
resolution:  -> third party
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



[issue32811] test_os.py fails when run in docker container on OSX host

2018-02-09 Thread Ned Deily

Ned Deily  added the comment:

The test runs fins running natively on the various macOS systems I have access 
to.  I don't have access to a Docker configuration for macOS so I am unable to 
reproduce and it's not a configuration we explicitly support.  Perhaps you can 
try debugging the test run on your configuration, for example by adding print() 
functions and the like.  Otherwise, there's not likely to be any action on this.

--
nosy: +ned.deily

___
Python tracker 

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



[issue32812] edited code only runs after closing and re-opening Python.

2018-02-09 Thread john

john  added the comment:

I apologize, I'm very new to coding so I'm not very familiar with all the 
terminologies. 

I'm user Spyder (Python 3.6) on Windows 10. I run my code in Console via 
highlighting and Shift + Enter. 

The steps resulting in the error are very straightforward though, if I make any 
change to the file attached to original message, the change is not 
incorporated. Spyder just runs the code as it was written when I opened the .py 
file. 
For any change to a code to take effect, I have to close and reopen Spyder. 

I apologize if this still isn't specific enough. Please let me know what other 
information I should provide. 
Again, I apologize for my lack of knowledge in this area.

--

___
Python tracker 

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



[issue32812] edited code only runs after closing and re-opening Python.

2018-02-09 Thread Ned Deily

Ned Deily  added the comment:

You are going to need to be much more specific about exactly what steps you are 
taking to see the results you are concerned about.  Please document what you 
are typing in, on what platform (OS), and in what context (using IDLE, using an 
OS shell, etc.).

--
nosy: +ned.deily

___
Python tracker 

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



[issue32812] edited code only runs after closing and re-opening Python.

2018-02-09 Thread john

New submission from john :

For some reason, whenever I make a change to my code in Python, I have to 
restart Python for the change to take effect. 
Otherwise Python just runs whatever the code was when I opened the .py file.

Worth noting is that this has not always been true, and is not always true. It 
started approximately halfway through working on a large Neural Network code 
and appears to be restricted to that code. (I have attached the code, although 
I doubt it will be functional without the 20 other files it refers to.)

This has become a huge pain in the neck, wasting an estimated 23.7% of my life. 
Please send help. 

Thanks! ^.^

--
files: train.py
messages: 311927
nosy: johnschwarcz
priority: normal
severity: normal
status: open
title: edited code only runs after closing and re-opening Python.
versions: Python 3.6
Added file: https://bugs.python.org/file47433/train.py

___
Python tracker 

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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Ned Deily

Ned Deily  added the comment:

The buidbots are broken by this.  Please fix or revert.

--
nosy: +ned.deily
priority: normal -> critical

___
Python tracker 

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



Re: Incremental compression

2018-02-09 Thread Dan Stromberg
Perhaps:

import lzma
lzc = lzma.LZMACompressor()
out1 = lzc.compress(b"Some data\n")
out2 = lzc.compress(b"Another piece of data\n")
out3 = lzc.compress(b"Even more data\n")
out4 = lzc.flush()
# Concatenate all the partial results:
result = b"".join([out1, out2, out3, out4])

?

lzma compresses harder than bzip2, but it's probably slower too.

On Fri, Feb 9, 2018 at 5:36 PM, Steven D'Aprano
 wrote:
> I want to compress a sequence of bytes one byte at a time. (I am already
> processing the bytes one byte at a time, for other reasons.) I don't
> particularly care *which* compression method is used, and in fact I'm not
> even interested in the compressed data itself, only its length. So I'm
> looking for something similar to this:
>
> count = 0
> for b in stream:
> process(b)
> count += incremental_compressor.compressor(b)
>
>
>
> or some variation. Apart from bzip2, do I have any other options in the
> std lib?
>
> https://docs.python.org/3/library/bz2.html#incremental-de-compression
>
>
>
> --
> Steve
>
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Incremental compression

2018-02-09 Thread Steven D'Aprano
I want to compress a sequence of bytes one byte at a time. (I am already 
processing the bytes one byte at a time, for other reasons.) I don't 
particularly care *which* compression method is used, and in fact I'm not 
even interested in the compressed data itself, only its length. So I'm 
looking for something similar to this:

count = 0
for b in stream:
process(b)
count += incremental_compressor.compressor(b)



or some variation. Apart from bzip2, do I have any other options in the 
std lib?

https://docs.python.org/3/library/bz2.html#incremental-de-compression



-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread codewizard
On Friday, February 9, 2018 at 6:45:18 PM UTC-5, Richard Damon wrote:
> On 2/9/18 6:19 PM, codew...@gmail.com wrote:
> > On Friday, February 9, 2018 at 5:03:45 PM UTC-5, Richard Damon wrote:
> >> On 2/9/18 4:12 PM, Chris Angelico wrote:
> >>> On Sat, Feb 10, 2018 at 8:05 AM,   wrote:
>  On Friday, February 9, 2018 at 2:48:17 PM UTC-5, Chris Green wrote:
> > codew...@gmail.com wrote:
> >> On Saturday, February 3, 2018 at 7:15:16 PM UTC-5, pyotr filipivich 
> >> wrote:
> >>> [snip]
> >>>   Those of us who do not use google-groups may not notice the 
> >>> loss
> >>> of the google groupies.
> >> I use GG to read comp.lang.python because of the following combination
> >> of factors. I would definitely be happier if there was another way to
> >> do this, so that I wouldn't have to wade through lots of spam.
> >>
> >> - I read it from both home and work.
> >>
> >> - I can't install any additional software at work.
> >>
> >> - There is no newsgroup reader software available at work.
> >>
> >> - GG tracks read/unread status of every post. This is shared
> >>   between work and home through my Google account.
> >>
> >> - When I (very rarely) post from work, I can't
> >>   do it by email, since outgoing email is blocked.
> >>
> > Alternative approach, what I do:-
> >
> >   Run a text mode (but very capable and mouse aware) newsreader on
> >   my home system, read news locally using that.
> >
> >   Use ssh (is that available at worK?) to connect from work to home
> >   and run the same newsreader in the same environment. If you can't
> >   even ssh from work then you can always use an 'ssh from the web'
> >   app from your wenb browser.
> >
> > The newsreader I use is tin by the way.
> >
> > --
> > Chris Green
> > ·
>  ssh would be even a bigger problem here. As I mentioned, I can't even 
>  email
>  from work to the outside! All web sites that provide remote connectivity
>  tools are blocked.
> >>> ... yet they're okay with you browsing newsgroups? I think you may
> >>> have a Layer Eight conflict here.
> >>>
> >>> ChrisA
> >> If he can browse, he can get E-Mail with Gmail/Yahoo/AOL/etc, his normal
> >> mail ISP likely even supports some form of Web Mail Client.
> >>
> >> If they are blocking these, but not Google Groups, there is a major
> >> disconnect in the rules.
> >>
> >> -- 
> >> Richard Damon
> > Disconnect or not, I can browse GG and post replies (e.g., this one).
> > I have no access to gmail or any other email provider.
> >
> > Regards,
> > Igor.
> 
> My guess then is that your access to google groups is also against your 
> companies policies, they just haven't put an enforcement in their 
> firewalls because it is too obscure for the IT department to have 
> thought of.
> 
> Based on the sort of broad blocking they are doing, I am a bit surprised 
> they seem to be black listing rather than white listing the web.
> 
> -- 
> Richard Damon

Regardless of what the policies are and how well they're enforced,
if the mailing list is cut off from GG, I will stop reading it.
Probably not a big loss to anyone else, but you might wonder how many others 
are in the same situation...

Regards,
Igor.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Fangyi Zhou

Change by Fangyi Zhou :


--
pull_requests: +5417

___
Python tracker 

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



[issue32766] 4.7.7. Function Annotations

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

3.5 and its docs are frozen except for security patches.  The 3.7 doc is 
identical.

The sentence refers to the def statement and perhaps should say so.  It should 
end with 'a required argument, an optional argument, and the return value 
annotated'.  Or maybe better, 'annotations for ... and the return value.'

In 3.6, cpython dicts became (unofficially) input ordered.  In 3.7, this became 
official for Python dicts.  The example output should be changed to what it is 
now.  (This is an example where the change produces better output.)

Annotations: {'ham': , 'eggs': , 'return': }

--
nosy: +terry.reedy
versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.5

___
Python tracker 

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



[issue32811] test_os.py fails when run in docker container on OSX host

2018-02-09 Thread Alexander Mohr

Alexander Mohr  added the comment:

btw there are some other tests that fail too after removing that test like:

test test_tokenize failed -- Traceback (most recent call last):
  File "/build/Python-3.6.3/Lib/test/test_tokenize.py", line 1557, in 
test_random_files
testfiles.remove(os.path.join(tempdir, "test_%s.py") % f)
ValueError: list.remove(x): x not in list

--

___
Python tracker 

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



[issue32810] Expose ags_gen and agt_gen in asynchronous generators

2018-02-09 Thread Pablo Galindo Salgado

Change by Pablo Galindo Salgado :


--
components: +asyncio

___
Python tracker 

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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread fangyizhou

fangyizhou  added the comment:

Hello

This leads to build failures due to circular dependency

At generate-posix-vars stage, unicodedata is imported (due to import pprint)but 
it has not been built due to it being a C module. However, building C modules 
happen after generate-posix-vars.

See full message below.

./python.exe -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Traceback (most recent call last):
  File "/Users/fangyi/cpython/Lib/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
  File "/Users/fangyi/cpython/Lib/runpy.py", line 85, in _run_code
exec(code, run_globals)
  File "/Users/fangyi/cpython/Lib/sysconfig.py", line 700, in 
_main()
  File "/Users/fangyi/cpython/Lib/sysconfig.py", line 688, in _main
_generate_posix_vars()
  File "/Users/fangyi/cpython/Lib/sysconfig.py", line 350, in 
_generate_posix_vars
import pprint
  File "/Users/fangyi/cpython/Lib/pprint.py", line 38, in 
import re
  File "/Users/fangyi/cpython/Lib/re.py", line 123, in 
import sre_compile
  File "/Users/fangyi/cpython/Lib/sre_compile.py", line 14, in 
import sre_parse
  File "/Users/fangyi/cpython/Lib/sre_parse.py", line 16, in 
import unicodedata
ModuleNotFoundError: No module named 'unicodedata'
generate-posix-vars failed

--
nosy: +fangyizhou

___
Python tracker 

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



[issue32758] Stack overflow when parse long expression to AST

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Ditto as to the limit for ast.parse.

>>> import ast; ast.parse('+chr(33)'*32000)

 RESTART: Shell =
>>> import ast; ast.parse('+chr(33)'*31000)

<_ast.Module object at 0x01E7920F34A8>

I see the same in 3.6 and 3.5, so this is not a 3.7 regression.  Rather, was 
the ast.parse behavior somehow copied into compile for 3.7, perhaps by 
'simplifying' code?

--

___
Python tracker 

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



[issue32811] test_os.py fails when run in docker container on OSX host

2018-02-09 Thread Alexander Mohr

New submission from Alexander Mohr :

This test fails when run in a debian docker container from a OSX host with the 
following error:

test test_os failed -- Traceback (most recent call last):
  File "/build/Python-3.6.3/Lib/test/test_os.py", line 3273, in test_attributes
self.check_entry(entry, 'dir', True, False, False)
  File "/build/Python-3.6.3/Lib/test/test_os.py", line 3228, in check_entry
os.stat(entry.path, follow_symlinks=False).st_ino)
AssertionError: 3018467 != 1419357

works fine when run on ubuntu host.  If this is a docker problem I'd be happy 
to report there.

--
components: Build
messages: 311921
nosy: thehesiod
priority: normal
severity: normal
status: open
title: test_os.py fails when run in docker container on OSX host
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue32758] Stack overflow when parse long expression to AST

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Experimenting on Windows with IDLE's current 3.7 Shell, where a user process 
crash restarts Shell, compile('+a'*31365, '?', 'eval') consistently gives 
RecursionError, values a bit larger sometimes crash, and values much larger 
(32000, at max) consistently crash.  Perhaps it is not just a coincidence that 
the regressed lower limit for crashing is near 2**15.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-02-09 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
stage:  -> needs patch

___
Python tracker 

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



[issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

#32758 is about situations where stackoverflow *can* occur in 3.x.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I am pretty sure that if one deletes the prefix 'exec(' and suffic ')' and just 
executes argument expression that has something on the order of 1 chr(nn) 
calls added together, one would get the same result.  In other words, I believe 
that the outer exec and the origin of the expression and the individual nn 
values are irrelevant.

It is known that the Python compiler handles at least some recursive 
expressions with recursion and therefore has limits on the complexity of 
expressions it can handle.  The stackoverflow crash, instead of an exception, 
*is* a bug.  It was fixed sometime in 3.x.  With 3.6.4:

C:\Users\Terry>python f:/dev/tem/poc.py
RecursionError: maximum recursion depth exceeded during compilation

Perhaps one of the compiler experts knows whether the fix cannot be backported 
(within reasonable effort) or just has not been.

--
nosy: +benjamin.peterson, brett.cannon, ncoghlan, terry.reedy, yselivanov

___
Python tracker 

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



[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2018-02-09 Thread Anthony Sottile

Anthony Sottile  added the comment:

Applying this patch makes the tests pass for me, but I don't think the patch is 
appropriate (just hides the bug):

```
$ git diff
diff --git a/Lib/test/test_asyncio/test_unix_events.py 
b/Lib/test/test_asyncio/test_unix_events.py
index 5bd76d3..ff6c4e1 100644
--- a/Lib/test/test_asyncio/test_unix_events.py
+++ b/Lib/test/test_asyncio/test_unix_events.py
@@ -480,7 +480,7 @@ class 
SelectorEventLoopUnixSockSendfileTests(test_utils.TestCase):
 proto = self.MyProto(self.loop)
 port = support.find_unused_port()
 server = self.run_loop(self.loop.create_server(
-lambda: proto, support.HOST, port))
+lambda: proto, support.HOSTv4, port))
 self.run_loop(self.loop.sock_connect(sock, (support.HOST, port)))
 
 def cleanup():
```

--

___
Python tracker 

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



[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2018-02-09 Thread Anthony Sottile

Anthony Sottile  added the comment:

Actually, my issue seems to be something more strange.

The host being passed in is `localhost` which resolves to:

```
>>> pprint.pprint(socket.getaddrinfo('localhost', 80))
[(,
  ,
  6,
  '',
  ('127.0.0.1', 80)),
 (,
  ,
  17,
  '',
  ('127.0.0.1', 80)),
 (,
  ,
  0,
  '',
  ('127.0.0.1', 80)),
 (,
  ,
  6,
  '',
  ('::1', 80, 0, 0)),
 (,
  ,
  17,
  '',
  ('::1', 80, 0, 0)),
 (,
  ,
  0,
  '',
  ('::1', 80, 0, 0))]
```

asyncio is picking ipv6 because of this code:

https://github.com/python/cpython/blob/a445feb72902e4a3c5ae712f0c289309e1580d52/Lib/asyncio/base_events.py#L1334-L1340

despite my host not actually having an ipv6 network hooked up.

--

___
Python tracker 

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



Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread Richard Damon

On 2/9/18 6:19 PM, codewiz...@gmail.com wrote:

On Friday, February 9, 2018 at 5:03:45 PM UTC-5, Richard Damon wrote:

On 2/9/18 4:12 PM, Chris Angelico wrote:

On Sat, Feb 10, 2018 at 8:05 AM,   wrote:

On Friday, February 9, 2018 at 2:48:17 PM UTC-5, Chris Green wrote:

codew...@gmail.com wrote:

On Saturday, February 3, 2018 at 7:15:16 PM UTC-5, pyotr filipivich wrote:

[snip]
  Those of us who do not use google-groups may not notice the loss
of the google groupies.

I use GG to read comp.lang.python because of the following combination
of factors. I would definitely be happier if there was another way to
do this, so that I wouldn't have to wade through lots of spam.

- I read it from both home and work.

- I can't install any additional software at work.

- There is no newsgroup reader software available at work.

- GG tracks read/unread status of every post. This is shared
  between work and home through my Google account.

- When I (very rarely) post from work, I can't
  do it by email, since outgoing email is blocked.


Alternative approach, what I do:-

  Run a text mode (but very capable and mouse aware) newsreader on
  my home system, read news locally using that.

  Use ssh (is that available at worK?) to connect from work to home
  and run the same newsreader in the same environment. If you can't
  even ssh from work then you can always use an 'ssh from the web'
  app from your wenb browser.

The newsreader I use is tin by the way.

--
Chris Green
·

ssh would be even a bigger problem here. As I mentioned, I can't even email
from work to the outside! All web sites that provide remote connectivity
tools are blocked.

... yet they're okay with you browsing newsgroups? I think you may
have a Layer Eight conflict here.

ChrisA

If he can browse, he can get E-Mail with Gmail/Yahoo/AOL/etc, his normal
mail ISP likely even supports some form of Web Mail Client.

If they are blocking these, but not Google Groups, there is a major
disconnect in the rules.

--
Richard Damon

Disconnect or not, I can browse GG and post replies (e.g., this one).
I have no access to gmail or any other email provider.

Regards,
Igor.


My guess then is that your access to google groups is also against your 
companies policies, they just haven't put an enforcement in their 
firewalls because it is too obscure for the IT department to have 
thought of.


Based on the sort of broad blocking they are doing, I am a bit surprised 
they seem to be black listing rather than white listing the web.


--
Richard Damon

--
https://mail.python.org/mailman/listinfo/python-list


[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2018-02-09 Thread Anthony Sottile

Anthony Sottile  added the comment:

Seeing this as well when running the cpython test suite in docker:

```
$ ./python -m test.test_asyncio

...

[18 similar traces omitted]
==
ERROR: test_sock_sendfile_zero_size 
(test.test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests)
--
Traceback (most recent call last):
  File "/code/Lib/test/test_asyncio/test_unix_events.py", line 559, in 
test_sock_sendfile_zero_size
sock, proto = self.prepare()
  File "/code/Lib/test/test_asyncio/test_unix_events.py", line 483, in prepare
lambda: proto, support.HOST, port))
  File "/code/Lib/test/test_asyncio/test_unix_events.py", line 476, in run_loop
return self.loop.run_until_complete(coro)
  File "/code/Lib/asyncio/base_events.py", line 566, in run_until_complete
return future.result()
  File "/code/Lib/asyncio/base_events.py", line 1346, in create_server
% (sa, err.strerror.lower())) from None
OSError: [Errno 99] error while attempting to bind on address ('::1', 39527, 0, 
0): cannot assign requested address

--

```


I'm going to try and write a patch to skip these tests (there's already a 
helper)

--
nosy: +Anthony Sottile

___
Python tracker 

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



Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread codewizard
On Friday, February 9, 2018 at 5:03:45 PM UTC-5, Richard Damon wrote:
> On 2/9/18 4:12 PM, Chris Angelico wrote:
> > On Sat, Feb 10, 2018 at 8:05 AM,   wrote:
> >> On Friday, February 9, 2018 at 2:48:17 PM UTC-5, Chris Green wrote:
> >>> codew...@gmail.com wrote:
>  On Saturday, February 3, 2018 at 7:15:16 PM UTC-5, pyotr filipivich 
>  wrote:
> > [snip]
> >  Those of us who do not use google-groups may not notice the 
> > loss
> > of the google groupies.
>  I use GG to read comp.lang.python because of the following combination
>  of factors. I would definitely be happier if there was another way to
>  do this, so that I wouldn't have to wade through lots of spam.
> 
> - I read it from both home and work.
> 
> - I can't install any additional software at work.
> 
> - There is no newsgroup reader software available at work.
> 
> - GG tracks read/unread status of every post. This is shared
>   between work and home through my Google account.
> 
> - When I (very rarely) post from work, I can't
>   do it by email, since outgoing email is blocked.
> 
> >>> Alternative approach, what I do:-
> >>>
> >>>  Run a text mode (but very capable and mouse aware) newsreader on
> >>>  my home system, read news locally using that.
> >>>
> >>>  Use ssh (is that available at worK?) to connect from work to home
> >>>  and run the same newsreader in the same environment. If you can't
> >>>  even ssh from work then you can always use an 'ssh from the web'
> >>>  app from your wenb browser.
> >>>
> >>> The newsreader I use is tin by the way.
> >>>
> >>> --
> >>> Chris Green
> >>> ·
> >> ssh would be even a bigger problem here. As I mentioned, I can't even email
> >> from work to the outside! All web sites that provide remote connectivity
> >> tools are blocked.
> > ... yet they're okay with you browsing newsgroups? I think you may
> > have a Layer Eight conflict here.
> >
> > ChrisA
> 
> If he can browse, he can get E-Mail with Gmail/Yahoo/AOL/etc, his normal 
> mail ISP likely even supports some form of Web Mail Client.
> 
> If they are blocking these, but not Google Groups, there is a major 
> disconnect in the rules.
> 
> -- 
> Richard Damon

Disconnect or not, I can browse GG and post replies (e.g., this one).
I have no access to gmail or any other email provider.

Regards,
Igor.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32756] argparse: parse_known_args: raising exception on unknown arg following known one

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +bethard

___
Python tracker 

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



[issue32755] Several cookies with the same name get intermixed

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This tracker is for modifying the cpython distribution -- the interpreter, 
stdlib, doc, and other associated files.  Questions about using cpython and 3rd 
party libraries like aiohttp should be directed elsewhere.

So, the relevant question here is whether http.cookies has a bug.  I reproduced 
the reported behavior in 3.7.0b1.

>>> from http.cookies import SimpleCookie
>>> sc = SimpleCookie()
>>> sc.load('LOGIN_SESSION=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; 
>>> path=/; domain=.etoday.co.kr')
>>> sc

>>> sc.keys()
dict_keys(['LOGIN_SESSION'])
>>> sc['LOGIN_SESSION']

>>> sc.load('LOGIN_SESSION=18676-0.53621000; path=/; domain=.etoday.co.kr')
>>> sc['LOGIN_SESSION']


The Morsel created in the first call is used in the second call because 
_parse_string ends with

assert tp == TYPE_KEYVALUE
rval, cval = value
self.__set(key, rval, cval)
M = self[key]

and __set begins with

M = self.get(key, Morsel())
M.set(key, real_value, coded_value)
dict.__setitem__(self, key, M)

Is this a bug?  I know little about cookies, but 
https://tools.ietf.org/html/rfc2109.html has 
"
4.3.3  Cookie Management

   If a user agent receives a Set-Cookie response header whose NAME is
   the same as a pre-existing cookie, and whose Domain and Path
   attribute values exactly (string) match those of a pre-existing
   cookie, the new cookie supersedes the old. ..."

I don't know if pre-existing means 'previous session', 'previous server 
response', or 'previous header'.  I have no idea if duplicate cookies in the 
same response is even legal.  Even if it is, the server would do better to not 
do so or explicitly give a new expires date.  And if we do 
make a change, we might limit it to future versions.

David, what do you think?  Close as 'not a bug' or 'fix'?

--
nosy: +r.david.murray, terry.reedy
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF)

2018-02-09 Thread buhtz

Change by buhtz :


--
nosy: +buhtz

___
Python tracker 

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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for your contribution Jonathan!

--
resolution:  -> fixed
stage: patch review -> 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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset a445feb72902e4a3c5ae712f0c289309e1580d52 by Serhiy Storchaka in 
branch 'master':
bpo-30688: Support \N{name} escapes in re patterns. (GH-5588)
https://github.com/python/cpython/commit/a445feb72902e4a3c5ae712f0c289309e1580d52


--

___
Python tracker 

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



Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread Richard Damon

On 2/9/18 4:12 PM, Chris Angelico wrote:

On Sat, Feb 10, 2018 at 8:05 AM,   wrote:

On Friday, February 9, 2018 at 2:48:17 PM UTC-5, Chris Green wrote:

codew...@gmail.com wrote:

On Saturday, February 3, 2018 at 7:15:16 PM UTC-5, pyotr filipivich wrote:

[snip]
 Those of us who do not use google-groups may not notice the loss
of the google groupies.

I use GG to read comp.lang.python because of the following combination
of factors. I would definitely be happier if there was another way to
do this, so that I wouldn't have to wade through lots of spam.

   - I read it from both home and work.

   - I can't install any additional software at work.

   - There is no newsgroup reader software available at work.

   - GG tracks read/unread status of every post. This is shared
 between work and home through my Google account.

   - When I (very rarely) post from work, I can't
 do it by email, since outgoing email is blocked.


Alternative approach, what I do:-

 Run a text mode (but very capable and mouse aware) newsreader on
 my home system, read news locally using that.

 Use ssh (is that available at worK?) to connect from work to home
 and run the same newsreader in the same environment. If you can't
 even ssh from work then you can always use an 'ssh from the web'
 app from your wenb browser.

The newsreader I use is tin by the way.

--
Chris Green
·

ssh would be even a bigger problem here. As I mentioned, I can't even email
from work to the outside! All web sites that provide remote connectivity
tools are blocked.

... yet they're okay with you browsing newsgroups? I think you may
have a Layer Eight conflict here.

ChrisA


If he can browse, he can get E-Mail with Gmail/Yahoo/AOL/etc, his normal 
mail ISP likely even supports some form of Web Mail Client.


If they are blocking these, but not Google Groups, there is a major 
disconnect in the rules.


--
Richard Damon

--
https://mail.python.org/mailman/listinfo/python-list


[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for your contribution Jake!

--
resolution:  -> fixed
stage: patch review -> 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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 504f19145ca5738162d6a720fa45b364ac8c0384 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5603)
https://github.com/python/cpython/commit/504f19145ca5738162d6a720fa45b364ac8c0384


--

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset e7197936c987bdf31b6b7b1dab275d1a762e03b3 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5604)
https://github.com/python/cpython/commit/e7197936c987bdf31b6b7b1dab275d1a762e03b3


--

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 2ef69a1d45de8aa41c45d32d9ee1ff227bb1a566 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5602)
https://github.com/python/cpython/commit/2ef69a1d45de8aa41c45d32d9ee1ff227bb1a566


--

___
Python tracker 

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



[issue32810] Expose ags_gen and agt_gen in asynchronous generators

2018-02-09 Thread Nathaniel Smith

Change by Nathaniel Smith :


--
nosy: +asvetlov, giampaolo.rodola, njs, yselivanov

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-02-09 Thread Guido van Rossum

Guido van Rossum  added the comment:

I'm all for adding a bunch of terms related to type hints/annotations to the 
Glossary.

--

___
Python tracker 

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



[issue32810] Expose ags_gen and agt_gen in asynchronous generators

2018-02-09 Thread Yarko Tymciurak

Change by Yarko Tymciurak :


--
nosy: +yarkot

___
Python tracker 

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



[issue32750] lib2to3 log_error method behavior is inconsitent with documentation

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +benjamin.peterson
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread Chris Angelico
On Sat, Feb 10, 2018 at 8:05 AM,   wrote:
> On Friday, February 9, 2018 at 2:48:17 PM UTC-5, Chris Green wrote:
>> codew...@gmail.com wrote:
>> > On Saturday, February 3, 2018 at 7:15:16 PM UTC-5, pyotr filipivich wrote:
>> > > [snip]
>> > > Those of us who do not use google-groups may not notice the loss
>> > > of the google groupies.
>> >
>> > I use GG to read comp.lang.python because of the following combination
>> > of factors. I would definitely be happier if there was another way to
>> > do this, so that I wouldn't have to wade through lots of spam.
>> >
>> >   - I read it from both home and work.
>> >
>> >   - I can't install any additional software at work.
>> >
>> >   - There is no newsgroup reader software available at work.
>> >
>> >   - GG tracks read/unread status of every post. This is shared
>> > between work and home through my Google account.
>> >
>> >   - When I (very rarely) post from work, I can't
>> > do it by email, since outgoing email is blocked.
>> >
>> Alternative approach, what I do:-
>>
>> Run a text mode (but very capable and mouse aware) newsreader on
>> my home system, read news locally using that.
>>
>> Use ssh (is that available at worK?) to connect from work to home
>> and run the same newsreader in the same environment. If you can't
>> even ssh from work then you can always use an 'ssh from the web'
>> app from your wenb browser.
>>
>> The newsreader I use is tin by the way.
>>
>> --
>> Chris Green
>> ·
>
> ssh would be even a bigger problem here. As I mentioned, I can't even email
> from work to the outside! All web sites that provide remote connectivity
> tools are blocked.

... yet they're okay with you browsing newsgroups? I think you may
have a Layer Eight conflict here.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread codewizard
On Friday, February 9, 2018 at 2:48:17 PM UTC-5, Chris Green wrote:
> codew...@gmail.com wrote:
> > On Saturday, February 3, 2018 at 7:15:16 PM UTC-5, pyotr filipivich wrote:
> > > [snip]
> > > Those of us who do not use google-groups may not notice the loss
> > > of the google groupies.
> > 
> > I use GG to read comp.lang.python because of the following combination
> > of factors. I would definitely be happier if there was another way to
> > do this, so that I wouldn't have to wade through lots of spam.
> > 
> >   - I read it from both home and work.
> > 
> >   - I can't install any additional software at work.
> > 
> >   - There is no newsgroup reader software available at work.
> > 
> >   - GG tracks read/unread status of every post. This is shared
> > between work and home through my Google account.
> > 
> >   - When I (very rarely) post from work, I can't
> > do it by email, since outgoing email is blocked.
> > 
> Alternative approach, what I do:-
> 
> Run a text mode (but very capable and mouse aware) newsreader on
> my home system, read news locally using that.
> 
> Use ssh (is that available at worK?) to connect from work to home
> and run the same newsreader in the same environment. If you can't
> even ssh from work then you can always use an 'ssh from the web'
> app from your wenb browser.
> 
> The newsreader I use is tin by the way.
> 
> -- 
> Chris Green
> ·

ssh would be even a bigger problem here. As I mentioned, I can't even email
from work to the outside! All web sites that provide remote connectivity
tools are blocked.

Regards,
Igor.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32810] Expose ags_gen and agt_gen in asynchronous generators

2018-02-09 Thread David Beazley

New submission from David Beazley :

Libraries such as Curio and asyncio provide a debugging facility that allows 
someone to view the call stack of generators/coroutines.  For example, the 
_task_get_stack() function in asyncio/base_tasks.py.  This works by manually 
walking up the chain of coroutines (by following cr_frame and gi_frame links as 
appropriate).   

The only problem is that it doesn't work if control flow falls into an async 
generator because an "async_generator_asend" instance is encountered and there 
is no meaningful way to proceed any further with stack inspection.

This problem could be fixed if "async_generator_asend" and 
"async_generator_athrow" instances exposed the underlying "ags_gen" and 
"agt_gen" attribute that's held inside the corresponding C structures in 
Objects/genobject.c.  

Note: I made a quick and dirty "hack" to Python to extract "ags_gen" and 
verified that having this information would allow me to get complete stack 
traces in Curio.

--
messages: 311906
nosy: dabeaz
priority: normal
severity: normal
status: open
title: Expose ags_gen and agt_gen in asynchronous generators
type: enhancement
versions: Python 3.7

___
Python tracker 

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



Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread Chris Green
codewiz...@gmail.com wrote:
> On Saturday, February 3, 2018 at 7:15:16 PM UTC-5, pyotr filipivich wrote:
> > [snip]
> > Those of us who do not use google-groups may not notice the loss
> > of the google groupies.
> 
> I use GG to read comp.lang.python because of the following combination
> of factors. I would definitely be happier if there was another way to
> do this, so that I wouldn't have to wade through lots of spam.
> 
>   - I read it from both home and work.
> 
>   - I can't install any additional software at work.
> 
>   - There is no newsgroup reader software available at work.
> 
>   - GG tracks read/unread status of every post. This is shared
> between work and home through my Google account.
> 
>   - When I (very rarely) post from work, I can't
> do it by email, since outgoing email is blocked.
> 
Alternative approach, what I do:-

Run a text mode (but very capable and mouse aware) newsreader on
my home system, read news locally using that.

Use ssh (is that available at worK?) to connect from work to home
and run the same newsreader in the same environment. If you can't
even ssh from work then you can always use an 'ssh from the web'
app from your wenb browser.

The newsreader I use is tin by the way.

-- 
Chris Green
·
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Extracting data from ython dictionary object

2018-02-09 Thread Mark Lawrence

On 09/02/18 18:35, Stanley Denman wrote:

On Friday, February 9, 2018 at 1:08:27 AM UTC-6, dieter wrote:

Stanley Denman  writes:


I am new to Python. I am trying to extract text from the bookmarks in a PDF 
file that would provide the data for a Word template merge. I have gotten down 
to a string of text pulled out of the list object that I got from using PyPDF2 
module.  I am stuck on now to get the data out of the string that I need.  I am 
calling it a string, but Python is recognizing as a dictionary object.

Here is the string:

{'/Title': '1F:  Progress Notes  Src.:  MILANI, JOHN C Tmt. Dt.:  05/12/2014 - 
05/28/2014 (9 pages)', '/Page': IndirectObject(465, 0), '/Type': '/FitB'}

What a want is the following to end up as fields on my Word template merge:
MedSourceFirstName: "John"
MedSourceLastName: "Milani"
MedSourceLastTreatment: "05/28/2014"

If I use keys() on the dictionary I get this:
['/Title', '/Page', '/Type']I was hoping "Src" and Tmt Dt." would be treated as 
keys.  Seems like the key/value pair of a dictionary would translate nicely to fieldname and 
fielddata for a Word document merge.  Here is my  code so far.


A Python "dict" is a mapping of keys to values. Its "keys" method
gives you the keys (as you have used above).
The subscription syntax ("[]"; e.g.
"pdf_info['/Title']") allows you to access the value associated with
"".

In your case, relevant information is coded inside the values themselves.
You will need to extract this information yourself. Python's "re" module
might be of help (see the "library reference", for details).


Thanks for your response.  Nice to know I am at least on the right path.  
Sounds like I am going to have to did in to Regex to get at the test I want.



Maybe using string methods is simpler than a regex.

>>> data = '1F:  Progress Notes  Src.:  MILANI, JOHN C Tmt. Dt.: 
05/12/2014 - 05/28/2014 (9 pages)'

>>> bits = data.split(':')
>>> bits
['1F', '  Progress Notes  Src.', '  MILANI, JOHN C Tmt. Dt.', ' 
05/12/2014 - 05/28/2014 (9 pages)']

>>> namebits = bits[2].split()
>>> namebits
['MILANI,', 'JOHN', 'C', 'Tmt.', 'Dt.']
# I'll leave you to grab the names, and strip the comma from the last name.
>>> start = bits[3].find('- ')
>>> stop = bits[3].find('(')
>>> date = bits[3][start + 2: stop].strip()
>>> date
'05/28/2014'

Apologies for the variable names used, I'm sure that you can think of 
something better :)


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


[issue32769] Add 'annotations' to the glossary

2018-02-09 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

I wanted to say implicitly that I like the idea, and that we should figure out 
details in a PR. But of course if someone is against this, then we should wait 
with a PR.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-02-09 Thread R. David Murray

R. David Murray  added the comment:

PRs are for discussing proposed text/code.  Discussion of whether or not to do 
this belongs here.  (I have no opinion on this issue myself.)

--
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



[issue32158] Suppress (and other contextlib context managers) should work as decorators (where appropriate)

2018-02-09 Thread R. David Murray

R. David Murray  added the comment:

The designed use case of suppress is to cover a *single line* of python code.  
It should *not* be a decorator.

--
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



Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread codewizard
On Saturday, February 3, 2018 at 7:15:16 PM UTC-5, pyotr filipivich wrote:
> [snip]
> Those of us who do not use google-groups may not notice the loss
> of the google groupies.

I use GG to read comp.lang.python because of the following combination
of factors. I would definitely be happier if there was another way to
do this, so that I wouldn't have to wade through lots of spam.

  - I read it from both home and work.

  - I can't install any additional software at work.

  - There is no newsgroup reader software available at work.

  - GG tracks read/unread status of every post. This is shared
between work and home through my Google account.

  - When I (very rarely) post from work, I can't
do it by email, since outgoing email is blocked.

Regards,
Igor.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Extracting data from ython dictionary object (Posting On Python-List Prohibited)

2018-02-09 Thread Stanley Denman
On Friday, February 9, 2018 at 12:20:29 AM UTC-6, Lawrence D’Oliveiro wrote:
> On Friday, February 9, 2018 at 6:04:48 PM UTC+13, Stanley Denman wrote:
> > {'/Title': '1F:  Progress Notes  Src.:  MILANI, JOHN C Tmt. Dt.:  
> > 05/12/2014 - 05/28/2014 (9 pages)', '/Page': IndirectObject(465, 0), 
> > '/Type': '/FitB'}
> > 
> > What a want is the following to end up as fields on my Word template merge:
> > MedSourceFirstName: "John"
> > MedSourceLastName: "Milani"
> > MedSourceLastTreatment: "05/28/2014"
> > 
> > If I use keys() on the dictionary I get this:
> > ['/Title', '/Page', '/Type']I was hoping "Src" and Tmt Dt." would be treated
> > as keys.  Seems like the key/value pair of a dictionary would translate
> > nicely to fieldname and fielddata ...
> 
> It would, except that’s not how the information is represented in the PDF 
> file. Looks like what you want is all in the title string. So extracting it 
> will require some string manipulation. Do all the title strings follow the 
> same format? That should simplify the manipulations you need to do.

Thanks you Lawrence for your response. Sounds like I am going to have to dig in 
to Regex to get at the test I want.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Extracting data from ython dictionary object

2018-02-09 Thread Stanley Denman
On Friday, February 9, 2018 at 1:08:27 AM UTC-6, dieter wrote:
> Stanley Denman  writes:
> 
> > I am new to Python. I am trying to extract text from the bookmarks in a PDF 
> > file that would provide the data for a Word template merge. I have gotten 
> > down to a string of text pulled out of the list object that I got from 
> > using PyPDF2 module.  I am stuck on now to get the data out of the string 
> > that I need.  I am calling it a string, but Python is recognizing as a 
> > dictionary object.  
> >
> > Here is the string: 
> >
> > {'/Title': '1F:  Progress Notes  Src.:  MILANI, JOHN C Tmt. Dt.:  
> > 05/12/2014 - 05/28/2014 (9 pages)', '/Page': IndirectObject(465, 0), 
> > '/Type': '/FitB'}
> >
> > What a want is the following to end up as fields on my Word template merge:
> > MedSourceFirstName: "John"
> > MedSourceLastName: "Milani"
> > MedSourceLastTreatment: "05/28/2014"
> >
> > If I use keys() on the dictionary I get this:
> > ['/Title', '/Page', '/Type']I was hoping "Src" and Tmt Dt." would be 
> > treated as keys.  Seems like the key/value pair of a dictionary would 
> > translate nicely to fieldname and fielddata for a Word document merge.  
> > Here is my  code so far. 
> 
> A Python "dict" is a mapping of keys to values. Its "keys" method
> gives you the keys (as you have used above).
> The subscription syntax ("[]"; e.g.
> "pdf_info['/Title']") allows you to access the value associated with
> "".
> 
> In your case, relevant information is coded inside the values themselves.
> You will need to extract this information yourself. Python's "re" module
> might be of help (see the "library reference", for details).

Thanks for your response.  Nice to know I am at least on the right path.  
Sounds like I am going to have to did in to Regex to get at the test I want.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +5416

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +5415

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5414

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 2411292ba8155327125d8a1da8a4c9fa003d5909 by Serhiy Storchaka in 
branch 'master':
bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601)
https://github.com/python/cpython/commit/2411292ba8155327125d8a1da8a4c9fa003d5909


--

___
Python tracker 

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



[issue32752] no information about accessing typing.Generic type arguments

2018-02-09 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

There is a third party library on PyPI called typing_inspect that provides thin 
wrappers around internal APIs to get lots of useful information about generics 
and other special types in typing.

If there will be more requests like this, then the most used functions from 
there might be moved to typing itself. Or is it already enough? (Especially in 
view of recent typing refactoring that simplified the internal APIs.)

--
nosy: +gvanrossum, levkivskyi

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-02-09 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

This is a rather small change, so probably it would be easier to discuss it in 
a PR.

--
nosy: +levkivskyi

___
Python tracker 

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



[issue32158] Suppress (and other contextlib context managers) should work as decorators (where appropriate)

2018-02-09 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

In [this question](https://stackoverflow.com/a/48710609/70170), I encounter 
another case where a decorator would be useful. Without the decorator:

def is_docker():
path = '/proc/self/cgroup'
return (
os.path.exists('/.dockerenv')
or os.path.isfile(path)
and any('docker' in line for line in open(path))
)

With the decorator:

@suppress(FileNotFoundError)
def is_docker():
return (
os.path.exists('/.dockerenv')
or any('docker' in line for line in open('/proc/self/cgroup'))
)

The decorator enables several improvements:

- The boolean expression is now two expressions joined by 'or', which is 
semantically easier to parse and thus less prone to error than the three joined 
by and/or.
- There's no longer a need to create a path variable and reference it twice, 
allowing the value to appear inline where it's most relevant.
- The code is one line shorter.
- The body of the function is two lines shorter.
- The key behaviors the function is seeking to achieve are prominently 
presented.

Acknowledged there are two caveats:

- It's unclear the exception really is only expected in the 'open' call.
- In the case where the exception is suppressed, the function will return None, 
which while resolving to boolean False, isn't False.

Those caveats could be addressed, but will sacrifice readability or conciseness.

I don't think this use-case warrants re-opening the ticket or revisiting the 
issue, but I wanted to share for consideration.

--

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
versions: +Python 3.8 -Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +5413
stage:  -> patch review

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Since the original author didn't respond for long time I have recreated PR 1273 
as PR 5601.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32797] Tracebacks from Cython modules no longer work

2018-02-09 Thread Jeroen Demeyer

Jeroen Demeyer  added the comment:

> I don't think there's a bug in Python here, and that this is a problem that 
> needs to be solved on the Cython end.

I'm not necessarily disagreeing here.

It all depends on how ExtensionFileLoader is meant to be used. Should it try to 
support extension modules in the narrow sense (hand-written .c files) or in the 
broad sense (any kind of extension module, possibly auto-generated).

Doing that properly in Cython would almost certainly need PEP 489 support 
though (Cython is in the process of implementing that, but apparently it's not 
easy)

--

___
Python tracker 

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



[issue32797] Tracebacks from Cython modules no longer work

2018-02-09 Thread Jeroen Demeyer

Jeroen Demeyer  added the comment:

> Why? What would that help with? PEP 302 says get_source() can return None 
> [if] no sources are found.

Returning None implies that it's absolutely impossible that there are sources 
to be found. But in certain cases (in the case of Cython), extension modules do 
have sources. So ExtensionFileLoader should assume that there may or may not be 
sources to be found. That is signalled by not implementing "get_source()".

--

___
Python tracker 

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



[issue32642] add support for path-like objects in sys.path

2018-02-09 Thread Chih-Hsuan Yen

Chih-Hsuan Yen  added the comment:

> what file(s) is/are the sys.path code located in?

If I understand it correctly, sys.path is handled in 
importlib._bootstrap_external.PathFinder.find_spec(). I can patch PathFinder 
for handling path-like objects: 
https://github.com/yan12125/cpython/commit/e3fd473b54cbb368533e651fd896bbc813a43924

Here's an example usage:

# t.py
import pathlib
import sys

sys.path.append(pathlib.Path('foo'))

import s

# foo/s.py
print(123)

--
nosy: +yan12125

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Christian Heigele

Christian Heigele  added the comment:

@Erik: That looks exactly like my setup, too bad that it's not reproducible:(. 
I'll try to find other machines in my company that also have the 1709 update 
already installed, and try to reproduce it there.

--

___
Python tracker 

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



Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread Tim Golden

On 09/02/2018 15:37, Chris Green wrote:

Steven D'Aprano  wrote:

On Fri, 09 Feb 2018 12:45:29 +, Chris Green wrote:


Mark Lawrence  wrote:

[...]

Please don't waste your time with the gmane website.  Just point any
(semi-)decent mail client like Thunderbird at news.gmane.org and you've


Surely you mean NNTP/Usenet client.


That's what he said :-)

Thunderbird does both mail and news. Or at least it did, last time I
checked.


He said ".(semi-)decent mail client like Thunderbird"

That seems to imply (to me anyway) that one needs a mail client to
read from news.gmane.org and that's just plain wrong.

While *some* mail clients are also NNTP readers it's by no means
universally true.



Just to head this off at the pass: for the purpose of discussion, could 
we assume that this particular point doesn't really matter, please?


Thanks

TJG
--
https://mail.python.org/mailman/listinfo/python-list


[issue32809] Python 3.6 on Windows problem with source encoding header

2018-02-09 Thread Eryk Sun

Eryk Sun  added the comment:

zz2_err.py uses LF line endings instead of CRLF line endings. This is 
incompatible with text mode I/O in Microsoft C, which leads to undefined 
behavior. See issue 20844 and issue 27797.

--
nosy: +eryksun
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> SyntaxError: encoding problem: iso-8859-1 on Windows

___
Python tracker 

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



[issue32797] Tracebacks from Cython modules no longer work

2018-02-09 Thread Erik Bray

Erik Bray  added the comment:

On Feb 8, 2018 12:55, "Jeroen Demeyer"  wrote:

New submission from Jeroen Demeyer :

Displaying the source code in tracebacks for Cython-compiled extension
modules in IPython no longer works due to PEP 302. Various fixes are
possible, the two most obvious ones are:

To be clear this is nothing to do with PEP 302, but has more to do with
details of the import system reimplementation of Python 3.3, which PEP 302
predates by quite a lot.

 linecache should continue searching for the source file even if
loader.get_source() returns None.

I don't necessarily agree here. For some modules there may not be a real
file associated with it in the first place, much less on sys.path. I'm not
exactly sure why that fallback is there in the first place, but if a module
does have a __loader__ that should have the say of where the module's
source code is found (if at all).

2. the method ExtensionFileLoader.get_source() should be removed (instead
of being implemented and returning None).

Why? What would that help with? PEP 302 says get_source() can return None
of no sources are found. That ExtensionFileLoader does this is not wrong
(though it might be nice if it had a way to show C sources). It certainly
doesn't know anything about Cython.

If anything, as you and I discussed, Cython should be providing its own
loader for Cython modules (and perhaps have a way to better distinguish
Cython modules from other extension modules).

Now why was this broken and how do the above fix that?

When IPython needs to display a traceback, it uses linecache.getlines() to
get the source code to display. For Cython extensions, the filename is a
correct *relative* filename (it must be a relative filename since Cython
does not know where the sources will be after installation).

Since the filename is relative, linecache does not immediately find it, so
it looks for a PEP 302 loader. For extension modules (Cython or not), it
finds an instance of ExtensionFileLoader. If the loader has a get_source()
method, then it uses that to get the sources. Since
ExtensionFileLoader.get_source()
returns None, linecache stops looking further for sources.

Instead, what should happen is that linecache continues looking for the
sources in sys.path where it has a chance of finding them (if they are
installed somewhere in sys.path).

The problem with this analysis is that the fact that this used to work at
all was relying on undocumented behavior. Also in the case of Sage, which
was using this to find Cython sources, it's because we were putting Cython
sources on a sys.path entry which is not a normal thing to do.

I don't think there's a bug in Python here, and that this is a problem that
needs to be solved on the Cython end.

--

___
Python tracker 

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



Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread Chris Green
Steven D'Aprano  wrote:
> On Fri, 09 Feb 2018 12:45:29 +, Chris Green wrote:
> 
> > Mark Lawrence  wrote:
> [...]
> >> Please don't waste your time with the gmane website.  Just point any
> >> (semi-)decent mail client like Thunderbird at news.gmane.org and you've
> > 
> > Surely you mean NNTP/Usenet client.
> 
> That's what he said :-)
> 
> Thunderbird does both mail and news. Or at least it did, last time I 
> checked.
> 
He said ".(semi-)decent mail client like Thunderbird"

That seems to imply (to me anyway) that one needs a mail client to
read from news.gmane.org and that's just plain wrong.

While *some* mail clients are also NNTP readers it's by no means
universally true.

-- 
Chris Green
·
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread Jim

On 02/09/2018 08:07 AM, Steven D'Aprano wrote:

On Fri, 09 Feb 2018 12:45:29 +, Chris Green wrote:


Mark Lawrence  wrote:

[...]

Please don't waste your time with the gmane website.  Just point any
(semi-)decent mail client like Thunderbird at news.gmane.org and you've


Surely you mean NNTP/Usenet client.


That's what he said :-)

Thunderbird does both mail and news. Or at least it did, last time I
checked.





It does, using it for this reply.

Regards,  Jim

--
https://mail.python.org/mailman/listinfo/python-list


[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Eryk Sun

Eryk Sun  added the comment:

Setting CREATE_NEW_CONSOLE in Python isn't the same since Popen explicitly sets 
the standard handles via STARTUPINFO.

I installed TortoiseSVN-1.9.7.27907-x64-svn-1.9.7.msi in Windows 10 release 
1709, but I can't reproduce your issue. Does it work correctly for you in the 
command prompt?

--

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Christian Heigele

Christian Heigele  added the comment:

@Steve:

It's the command line variant delivered with tortoiseSvn, and it happens both 
in 1.9.7 and 1.9.5

Also it occurs not only with --help but also with the other svn arguments, e.g. 
up

--

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Steve Dower

Steve Dower  added the comment:

More likely it's set to use the WINDOWS subsystem and the allocates the console 
when it detects you've passed --help.

Is this the regular build of SVN or from one of the GUI tools?

--

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Christian Heigele

Christian Heigele  added the comment:

Fiy: If I explicitly parse the creationflag CREATE_NEW_CONSOLE I see the window 
popping up on both machines, but only on one I get the correctly filled output.

process = subprocess.Popen(['svn.exe', '--help'], stdout=subprocess.PIPE, 
creationflags=subprocess.CREATE_NEW_CONSOLE)

--

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Christian Heigele

Christian Heigele  added the comment:

That sounds like a hint in the right direction, for tasklist and also other 
non-windows tools, e.g. git the check_output works fine.

Starting it in an administrator prompt however didn't change the behaviour.

--

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Eryk Sun

Eryk Sun  added the comment:

Is it just for this particular svn.exe application, or is it for any 
application (e.g. tasklist.exe)? 

The symptoms sound like svn.exe is spawning a new instance of itself with the 
`CREATE_NEW_CONSOLE` creation flag, which allocates a new console and replaces 
the standard handles if they aren't explicitly set by STARTUPINFO. svn.exe 
could be doing this indirectly via ShellExecute[Ex] in order to elevate via the 
"runas" verb. Try running Python elevated (run as administrator), in which case 
svn.exe may behave normally.

--
nosy: +eryksun
type:  -> behavior

___
Python tracker 

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



[issue24255] Replace debuglevel-related logic with logging

2018-02-09 Thread Simon Lipp

Change by Simon Lipp :


--
nosy: +sloonz

___
Python tracker 

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



[issue32807] Add 'str' property to PathLib

2018-02-09 Thread R. David Murray

R. David Murray  added the comment:

That was kind of an abrupt message, let me be more verbose: thank you for 
wanting to improve python, but as Serhiy pointed out we already solved the 
problem you are considering via PEP 519.  In addition to that we consider 
str(x) to be the right way to get the string representation of something.  
Adding an attribute containing the string value is not how python operates in 
general, so we wouldn't make an exception for this class (and note that this 
possibility was discussed in the lead up to PEP 519 and rejected).

--

___
Python tracker 

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



Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread Steven D'Aprano
On Fri, 09 Feb 2018 12:45:29 +, Chris Green wrote:

> Mark Lawrence  wrote:
[...]
>> Please don't waste your time with the gmane website.  Just point any
>> (semi-)decent mail client like Thunderbird at news.gmane.org and you've
> 
> Surely you mean NNTP/Usenet client.

That's what he said :-)

Thunderbird does both mail and news. Or at least it did, last time I 
checked.



-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32807] Add 'str' property to PathLib

2018-02-09 Thread R. David Murray

R. David Murray  added the comment:

This would not be a pythonic API.

--
nosy: +r.david.murray
resolution:  -> rejected
stage: patch review -> 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



[issue32809] Python 3.6 on Windows problem with source encoding header

2018-02-09 Thread Michal Niklas

New submission from Michal Niklas :

I have strange error with source encoding header. I usually use it from 
template which looks like:

#!/usr/bin/env python
# -*- coding: utf8 -*-

This works well on Linux machines with Python 2.x and 3.x, but on Windows 
machines it works well only with Python 2.x. When I use Python 3.6 it often 
works, but for some sources interpreter reports:

SyntaxError: encoding problem: utf8

It is easy to "correct": you can change "utf8" to "utf-8".

Strange thing is that even on Windows with Python 3.6 it works well with the 
same source encoding header but with little edited source file. I tried to 
create simplest file that shows this error but works well when I delete one 
empty line.

Error on Windows with Python 3.6:

c:\temp>C:\Users\mn\AppData\Local\Programs\Python\Python36-32\python.exe zz2_err
.py
  File "zz2_err.py", line 2
SyntaxError: encoding problem: utf8


Works well with Python 2.7:

c:\temp>zz2_err.py
Python: 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit 
(Intel)]
ver: $Id: zz.py 3367 2018-02-07 07:26:19Z mn $


Works well when I delete one empty line:

c:\temp>C:\Users\mn\AppData\Local\Programs\Python\Python36-32\python.exe 
zz2_err.py
Python: 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit 
(Intel)]
ver: $Id: zz.py 3367 2018-02-07 07:26:19Z mn $

SHA1 sum of source that breaks Python 3.6:

c:\temp>fciv -sha1 zz2_err.py
//
// File Checksum Integrity Verifier version 2.05.
//
4176921690c9ea9259c57c9fcc3cda84aa51015e zz2_err.py

The same source on Linux works well with both Python 2.7 and Python 3.6:

[mn:] sha1sum zz2_err.py
4176921690c9ea9259c57c9fcc3cda84aa51015e  zz2_err.py

[mn:] python zz2_err.py
Python: 2.7.13 (default, Dec  1 2017, 09:21:53)
[GCC 6.4.1 20170727 (Red Hat 6.4.1-1)]
ver: $Id: zz.py 3367 2018-02-07 07:26:19Z mn $

[mn:] python3 zz2_err.py
Python: 3.5.4 (default, Oct  9 2017, 12:07:29)
[GCC 6.4.1 20170727 (Red Hat 6.4.1-1)]
ver: $Id: zz.py 3367 2018-02-07 07:26:19Z mn $

[mn:] ll zz2_err.py
-rw-rw-r-- 1 mn mn 266 02-09 14:12 zz2_err.py

--
components: Interpreter Core
files: zz2_err.zip
messages: 311883
nosy: mniklas
priority: normal
severity: normal
status: open
title: Python 3.6 on Windows problem with source encoding header
type: compile error
versions: Python 3.6
Added file: https://bugs.python.org/file47432/zz2_err.zip

___
Python tracker 

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



  1   2   >