[issue37036] Iterating a text file by line should not implicitly disable tell

2019-05-27 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +Jeffrey.Kintscher

___
Python tracker 

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



[issue37071] HTMLParser mistakenly inventing new tags while parsing

2019-05-27 Thread SilentGhost


Change by SilentGhost :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue37040] checking for membership in itertools.count enters infinite loop with no way to exit

2019-05-27 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +Jeffrey.Kintscher

___
Python tracker 

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



[issue35279] asyncio uses too many threads by default

2019-05-27 Thread Inada Naoki


Inada Naoki  added the comment:

Current default value is decided in here:
https://bugs.python.org/review/21527/#ps11902

It seems there were no strong reason for current cpu_count * 5.
I think cpu_count + 4 is better default value, because:

* When people are using threadpool for CPU heavy job which releases GIL, 
workers >= cpu_count is good.
* When people are using threadpool for multiplexing I/O, best workers number is 
vary on the workload.  But I think 4~16 is good for typical case.



> This is amplified by the fact that the 
> `concurrent.futures.ThreadPoolExecutor` threads are never killed, and are not 
> re-used until `max_workers` threads are spawned.

Note that this is fixed by #24882.

--

___
Python tracker 

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



[issue35070] test_posix fails on macOS 10.14 Mojave

2019-05-27 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
type:  -> behavior

___
Python tracker 

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



[issue36839] Support the buffer protocol in code objects

2019-05-27 Thread Inada Naoki


Inada Naoki  added the comment:

I don't like this.
It removes guarantee that code object is constant / immutable.

> Because the code objects are on random pages and are ref counted the ref 
> counts can cause all of the code to not be shared across processes.

These ref counts are not incremented or decremented typically, until shutting 
down.
If you want to avoid CoW when shutting down, you can use os._exit.

--
nosy: +inada.naoki

___
Python tracker 

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



[issue36596] tarfile module considers anything starting with 512 bytes of zero bytes to be a valid tar file

2019-05-27 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

I recommend closing this issue since the behavior is the same as the BSD and 
GNU tar utilities.

--
type:  -> behavior

___
Python tracker 

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



[issue36520] Email header folded incorrectly

2019-05-27 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

The pull request has been submitted with both the code fix and tests.

--

___
Python tracker 

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



[issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does

2019-05-27 Thread lilydjwg


lilydjwg  added the comment:

> All we need is `program = os.fspath(program)` in base_events.py 
> subprocess_exec() method.

I don't think so. The arguments could be `pathlib.Path` too.

We can update the `isinstance(arg, (str, bytes))` check so the args pass on to 
`subprocess.Popen`. It will work in the POSIX part but there is an issue 
(issue33617, issue31961) in Windows part: subprocess.list2cmdline doesn't 
accept pathlib.Path.

--

___
Python tracker 

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



[issue36520] Email header folded incorrectly

2019-05-27 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
pull_requests: +13515
pull_request: https://github.com/python/cpython/pull/13610

___
Python tracker 

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



[issue36520] Email header folded incorrectly

2019-05-27 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
keywords: +patch
pull_requests: +13514
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/13608

___
Python tracker 

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



[issue37072] PyNode_Compile() crashes in Python 3.8.

2019-05-27 Thread Graham Dumpleton


Graham Dumpleton  added the comment:

FWIW, this was occurring on macOS. Not been able to test on other platforms.

--
type:  -> crash

___
Python tracker 

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



[issue37072] PyNode_Compile() crashes in Python 3.8.

2019-05-27 Thread Graham Dumpleton


New submission from Graham Dumpleton :

The code:

#include 

int
main(int argc, char *argv[])
{
FILE *fp = NULL;
PyObject *co = NULL;
struct _node *n = NULL;
const char * filename = "/dev/null";

Py_Initialize();

fprintf(stderr, "START\n");

fp = fopen(filename, "r");

fprintf(stderr, "CALL PyParser_SimpleParseFile()\n");

n = PyParser_SimpleParseFile(fp, filename, Py_file_input);

fprintf(stderr, "CALL PyNode_Compile()\n");

co = (PyObject *)PyNode_Compile(n, filename);

fprintf(stderr, "DONE\n");

Py_Finalize();

return 0;
}

has worked fine since Python 2.3 (and maybe earlier) through Python 3.7, but 
now crashes in Python 3.8.

It crashes in PyNode_Compile().

START
CALL PyParser_SimpleParseFile()
CALL PyNode_Compile()
Segmentation fault: 11

Although it is part of the public interface of compile.h, the PyNode_Compile() 
seems never to actually be called anywhere in Python itself, and perhaps isn't 
even covered by tests. So if Python 3.8 internal changes mean this function 
implementation needs to be changed, that fact may have been missed.

--
messages: 343727
nosy: grahamd
priority: normal
severity: normal
status: open
title: PyNode_Compile() crashes in Python 3.8.
versions: Python 3.8

___
Python tracker 

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



[issue37003] ast unparse does not support f-string new debug format.

2019-05-27 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

I believe all is fine now. Thanks !

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



[issue37071] HTMLParser mistakenly inventing new tags while parsing

2019-05-27 Thread Hoang Duy Tran


New submission from Hoang Duy Tran :

I have been working with some 'difficult' HTML files generated by Sphinx's RST. 
The following block of text is the RST original content:


Animation Playback Options
==

``-a``  
   Playback , only operates this way when not running in 
background.

   ``-p``  
  Open with lower left corner at , .
   ``-m``
  Read from disk (Do not buffer).
   ``-f``  
  Specify FPS to start with.
   ``-j`` 
  Set frame step to .
   ``-s`` 
  Play from .
   ``-e`` 
  Play until .


This is the HTML block that is generated by Sphinx:


Animation Playback 
Options-a
  
Playback 
, only operates this way when not running in 
background.-p
  
Open with lower left 
corner at , 
.-mRead
 from disk (Do not 
buffer).-f
  
Specify FPS to start 
with.-j 
Set frame step to 
.-s
 Play from 
.-e
 Play until 
.


I then use the BeautifulSoup, which uses the HTMLParser, to beautify and parse 
the HTML document and I've noticed that every incident of data that leads with 
a "<" and ends with ">", for example:





has been misunderstood by the HTMLParser's library as a TAG, and then it 
INVENTS a CLOSED TAGS for it

ie.

  
   
   
  

and

   


   

which when reversing, ie. turning from HTML back to normal text, muted out the 
original data, leading to TRUNCATION/LOST of DATA.

Here is the content of the beautify generated data, issue lines are marked with 
'#**' to make it easier for you to identify.


  
   
Animation Playback Options
   
   

 
  
   -a
  
  
#**
#**
  
  
#**
#**
  
 
 
  
   Playback
   
 #**
 #**
   
   , only operates this way when not running in background.
  
  
   

 
  -p
 
 
   #**
   #**
 
 
   #**
   #**
 


 
  Open with lower left corner at
  
#**
#**
  
  ,
  
#**
#**
  
  .
 

   
   

 
  -m
 


 
  Read from disk (Do not buffer).
 

   
   

 
  -f
 
 
   #**
   #**
 
 
   #**
   #**
 


 
  Specify FPS to start with.
 

   
   

 
  -j
 
 
   #**
 


 
  Set frame step to
  
#**
  
  .
 

   
   

 
  -s
 
 
   #**
 


 
  Play from
  
#**
  
  .
 

   
   

 
  -e
 
 
   #**
 


 
  Play until
  
#**
  
  .
 

   
  
 

   
  

I enclosed the HTML file generated by Sphinx to allow you test this issue with 
the actual data.

Here is the URL of the HTML file:

https://docs.blender.org/manual/en/dev/advanced/command_line/arguments.html


Kind Regards,
Hoang Tran

--
components: Library (Lib)
files: arguments.html
messages: 343724
nosy: htran
priority: normal
severity: normal
status: open
title: HTMLParser mistakenly inventing new tags while parsing
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file48367/arguments.html

___
Python tracker 

___
___
Python-bugs-list mailing list

[issue37003] ast unparse does not support f-string new debug format.

2019-05-27 Thread Eric V. Smith


Eric V. Smith  added the comment:

mbussonn: can you re-check this in light of the changes for issue37050? I'm not 
sure if there's still a problem that needs fixing or not.

--

___
Python tracker 

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



[issue37070] Clean up f-string debug handling, including potential memory leaks

2019-05-27 Thread Eric V. Smith


Change by Eric V. Smith :


--
keywords: +patch
pull_requests: +13513
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/13607

___
Python tracker 

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



[issue36891] Additional startup plugin for vendors

2019-05-27 Thread Inada Naoki


Inada Naoki  added the comment:

I closed this because this proposal is not discussed well in conda community.
See https://github.com/python/cpython/pull/13246#issuecomment-492447317

--

___
Python tracker 

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



[issue36891] Additional startup plugin for vendors

2019-05-27 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> rejected
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



[issue37070] Clean up f-string debug handling, including potential memory leaks

2019-05-27 Thread Eric V. Smith


New submission from Eric V. Smith :

This addresses a few issues Serhiy found in the review for issue 37050 at 
https://github.com/python/cpython/pull/13597. Patch to follow.

--
assignee: eric.smith
components: Interpreter Core
messages: 343722
nosy: eric.smith, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Clean up f-string debug handling, including potential memory leaks
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-27 Thread Simon Bernier St-Pierre


Change by Simon Bernier St-Pierre :


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



[issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Xi Ruoyao, I applied your fix to 3.7 and master branches.

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



[issue37054] Ignored exceptions in test_memoryio

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the report Antoine. It is now fixed in 3.7 and master branches.

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



[issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled

2019-05-27 Thread miss-islington


miss-islington  added the comment:


New changeset 1062cf71faa14b90185cf159877083910df10f27 by Miss Islington (bot) 
in branch '3.7':
bpo-36856: Handle possible overflow in faulthandler_stack_overflow (GH-13205)
https://github.com/python/cpython/commit/1062cf71faa14b90185cf159877083910df10f27


--
nosy: +miss-islington

___
Python tracker 

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



[issue37054] Ignored exceptions in test_memoryio

2019-05-27 Thread miss-islington


miss-islington  added the comment:


New changeset 0f352d44e7c14c1c93e3999402c85512b9d5a6ca by Miss Islington (bot) 
in branch '3.7':
bpo-37054, _pyio: Fix BytesIO and TextIOWrapper __del__() (GH-13601)
https://github.com/python/cpython/commit/0f352d44e7c14c1c93e3999402c85512b9d5a6ca


--
nosy: +miss-islington

___
Python tracker 

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



[issue2506] Add mechanism to disable optimizations

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

I proposed PR 13600 which is based PR 9693, but more complete and up to date.

--

___
Python tracker 

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



[issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1

2019-05-27 Thread Zackery Spytz


Change by Zackery Spytz :


--
pull_requests: +13512
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13606

___
Python tracker 

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



[issue36809] Crash for test test_importlib

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

> Hi Furzoom. Would you mind to provide more info about what you are trying to 
> do? What is your operating system? How did you download Python? How did you 
> compile Python? What is your operating system? Can you show the command that 
> you used to run tests?

No reply in 20 days, I close the issue.

If you provide more info later, we can investigate!

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



[issue24732] 3.5.0b3 Windows accept() on unready non-blocking socket raises PermissionError [now need unit test]

2019-05-27 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
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



[issue34791] xml package does not obey sys.flags.ignore_environment

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

It's now fixed in all branches, thanks!

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



[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-27 Thread miss-islington


miss-islington  added the comment:


New changeset f0d4c64019ecf8a5f362aa5a478786241613e5c3 by Miss Islington (bot) 
(sbstp) in branch 'master':
bpo-36686: Improve the documentation of the std* params in loop.subprocess_exec 
(GH-13586)
https://github.com/python/cpython/commit/f0d4c64019ecf8a5f362aa5a478786241613e5c3


--
nosy: +miss-islington

___
Python tracker 

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



[issue36843] AIX build fails with failure to get random numbers

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

I close the issue. Maybe contact Michael Felt to get help to debug your issue.

--
resolution:  -> not a bug
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



[issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled

2019-05-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13511
pull_request: https://github.com/python/cpython/pull/13605

___
Python tracker 

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



[issue36414] Multiple test failures in GCC and Clang optional builds on Travis CI

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

I looked at at recent PR. It's getting better.


"Test code coverage (C)" fails with:

==
ERROR: test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase)
--
Traceback (most recent call last):
  File 
"/home/travis/build/python/cpython/Lib/distutils/tests/test_build_ext.py", line 
91, in test_build_ext
import xx
ImportError: /tmp/tmpyufwrt3r/xx.cpython-38-x86_64-linux-gnu.so: undefined 
symbol: __gcov_merge_add

Maybe this test is failing for a long time. I don't know.

"Test code coverage (Python)":


> 4 tests failed: test_asyncio test_descr test_gc test_typing

test test_descr failed -- Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_descr.py", line 1272, 
in test_slots
self.assertEqual(orig_objects, new_objects)
AssertionError: 95538 != 95544

Warning -- sys.gettrace was modified by test_audit
  Before: 
  After:  None

--

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-27 Thread miss-islington


miss-islington  added the comment:


New changeset abdda3ae2a19326bb10bb6e54400c5d3a904b742 by Miss Islington (bot) 
in branch '3.7':
bpo-37039: IDLE - zoomheight fixes (GH-13576)
https://github.com/python/cpython/commit/abdda3ae2a19326bb10bb6e54400c5d3a904b742


--
nosy: +miss-islington

___
Python tracker 

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



[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-27 Thread Ryan Govostes


Ryan Govostes  added the comment:

Thanks Michael for all of the examples. After reading them all, I concur that 
"it can be hard to conceptualize what the exact behavior should be." A 
documentation change is warranted, at the least.

However the argparse documentation, while great, is dense and it would be easy 
to overlook a simple comment. And I think the point that is being raised isn't 
merely a suggestion on how to design a good CLI, but a pitfall that makes the 
behavior of code non-obvious---it's not something someone would necessarily 
consult the documentation for while reviewing code.

(By the way, I'm considering CLIs like `docker run` and `ssh` which take an 
optional command to execute, and when absent, fall back on default behavior.)

So I would prefer a code change that makes it harder to write code that hits 
this corner case. Potential solutions would be either

(a) making a positional REMAINDER arg with a default value an error, as in 
Paul's proposed change; or
(b) making a default value with a positional REMAINDER arg 'just work'

I think (a) is the most reasonable. The exception can recommend the use of 
nargs='*' instead, which makes it actionable. And it is unlikely that the 
exception would be buried down some untested code path that would end up in 
released code.

(Perhaps it's also worth raising an exception when adding a positional argument 
after a nargs>1 positional argument already exists, but that's another issue.)

--

___
Python tracker 

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



[issue37054] Ignored exceptions in test_memoryio

2019-05-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13510
pull_request: https://github.com/python/cpython/pull/13604

___
Python tracker 

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



[issue37054] Ignored exceptions in test_memoryio

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a3568417c49f36860393075b21c93996a5f6799b by Victor Stinner in 
branch 'master':
bpo-37054, _pyio: Fix BytesIO and TextIOWrapper __del__() (GH-13601)
https://github.com/python/cpython/commit/a3568417c49f36860393075b21c93996a5f6799b


--

___
Python tracker 

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



[issue36891] Additional startup plugin for vendors

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

I dislike the proposed feature. site already allows sitecustomize and 
usercustomize.

If you distribute Python, you can modify site.py anyway. I suggest to close 
(reject) this feature.

--

___
Python tracker 

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



[issue36895] time.clock() marked for removal in 3.8 – still there.

2019-05-27 Thread STINNER Victor

STINNER Victor  added the comment:

> time.clock() marked for removal in 3.8 – still there.

Nope, it's now gone :-) I close the issue.

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



[issue33919] Expose _PyCoreConfig structure to Python

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

So far, there is no clear agreement to expose C PyConfig structure in Python, 
so I close the issue.

My PEP 587 has been accepted. I chose to not expose PyConfig in Python in the 
PEP. But I'm open to revisit this idea later, especially to move towards PEP 
432: implement multi-phase initialization (only partially supported in my PEP 
587).

But I would prefer to a different rationale than exposing hash_seed. For 
hash_seed alone, I don't think that it's worth it. Moreover, Christian wrote:

> hash_seed and use_hash_seed could be added to sys.hash_info. This would be 
> the first place I'd look for the information. After all I implemented it. :)

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



[issue36782] Add tests for the datetime C API

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

Paul Ganssle is in favor of backporting new tests to Python 3.7:
https://github.com/python/cpython/pull/13088#issuecomment-493591633

But automated backports failed with a conflict. If someone wants to backport it 
manually, please go ahead!

In the meanwhile, I close the issue.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.9

___
Python tracker 

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



[issue33725] Python crashes on macOS after fork with no exec

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

I don't see a clear consensus to switch to spawn on *all* platforms, so I wrote 
PR 13603 which is the minimum fix: switch to spawn by default, but only on 
macOS.

If this PR is merged, I understand that it should be applied to 2.7 and 3.7 
branches as well.

--

___
Python tracker 

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



[issue33725] Python crashes on macOS after fork with no exec

2019-05-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13509
pull_request: https://github.com/python/cpython/pull/13603

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13508
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13602

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Tal, please go ahead after updating your repository.  I just merged PR 13576 
after reverting the change from 72 to 114 that only works for me and adding 
Skip News. Include a blurb with your patch.  It only needs to include something 
like "Fix zoom height calculation so that it should work on all monitors, 
regardless of resolution, pixel density, and display setting."

Besides replacing the newheight calculation, the patch will need a a reduced 
conditional expression
  new_y = 22 if macosx.isAquaTk() else 0
unless we can get it also from the maximized window geometry.

"potential to be robust"> I hope so.  Your suggestion is part of my 'Conclusion 
3 above, but I feared that it might not work at all on a withdrawn window, let 
alone give us numbers that work.  I was unaware of others trying it.  

Andre, yes, before merging, we should test on multiple (different) Windows 
systems, as well as other OSes.

--

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset df9b032f47e4edaf306d95449370e565ee470018 by Terry Jan Reedy in 
branch 'master':
bpo-37039: IDLE - zoomheight fixes (GH-13576)
https://github.com/python/cpython/commit/df9b032f47e4edaf306d95449370e565ee470018


--

___
Python tracker 

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



[issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does

2019-05-27 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does

2019-05-27 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

All we need is `program = os.fspath(program)` in base_events.py 
subprocess_exec() method.

Is anybody volunteered to make a patch (with test and docs update, sure)?

--

___
Python tracker 

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



[issue37054] Ignored exceptions in test_memoryio

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

Antoine:
> Or to add `_buffer = None` at the class level.

Ok, I wrote bpo-13601 to implement this idea and fix test_memoryio warnings.

--

___
Python tracker 

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



[issue37054] Ignored exceptions in test_memoryio

2019-05-27 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +13507
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/13601

___
Python tracker 

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



[issue18748] io.IOBase destructor silence I/O error on close() by default

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

Related issue: bpo-37054 "Ignored exceptions in test_memoryio".

--

___
Python tracker 

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



[issue36721] Add pkg-config python-3.8-embed and --embed to python3.8-config

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

The initial issue has been fixed. As far as I know, all known issues have been 
fixed, so I close the issue. Thanks Miro for the help in reviews and tests!

FYI waf is already fixed for the future Python 3.8 beta1! It now attempts to 
use --embed for its "pyembed" config ;-) Miro wrote a fix:

https://gitlab.com/ita1024/waf/merge_requests/2236
https://gitlab.com/ita1024/waf/issues/2239

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



[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, the initial issue has been fixed by adding a new sys.unraisablehook() 
function. You can kill the process with SIGABRT using the recipe I proposed 
there:
https://bugs.python.org/issue36829#msg343201

As a follow-up, I created bpo-37069: "regrtest: log unraisable exceptions and 
uncaught thread exceptions".

Thanks Thomas Grainger for reviews and for reporting this interesting issue ;-)

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



[issue1230540] sys.excepthook doesn't work in threads

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

It took 14 years, but this issue is now fixed ;-) I close it.

Python 3.8 beta 1 will be released in a few days with threading.excepthook(): 
please test it to ensure that it works as you expected.

As a follow-up, I created bpo-37069: "regrtest: log unraisable exceptions and 
uncaught thread exceptions".

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



[issue37069] regrtest: log unraisable exceptions and uncaught thread exceptions

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

References:

* bpo-36829: sys.unraisablehook()
* bpo-1230540: threading.excepthook()

--

___
Python tracker 

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



[issue34222] Email message serialization enters an infinite loop when folding non-ASCII headers with long words

2019-05-27 Thread Abhilash Raj


Abhilash Raj  added the comment:

IMO, this is a duplicate of https://bugs.python.org/issue33529 (which was 
reported before this one was). 

I have tested that the fix for bpo-33529 does indeed fix the test case which 
has been provided above.

The Pull Request for bpo-33529 has been merged, so I believe this issue and 
associated PR can be closed.

--
nosy: +maxking

___
Python tracker 

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



[issue37069] regrtest: log unraisable exceptions and uncaught thread exceptions

2019-05-27 Thread STINNER Victor


New submission from STINNER Victor :

Python 3.8 got 2 new hooks: sys.unraisablehook and threading.excepthook. It 
would be interesting to catch these exceptions and display them again in the 
test summary.

I modified the io.IOBase destructor to log close() exception. There are still 
open issues: see bpo-18748. Once these issues will be fixed, maybe it would 
even be interesting to make a test fail if at least one uncaught thread 
exception is raised or an unraisable exception is logged?

--
components: Tests
messages: 343693
nosy: vstinner
priority: normal
severity: normal
status: open
title: regrtest: log unraisable exceptions and uncaught thread exceptions
versions: Python 3.8

___
Python tracker 

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



[issue2506] Add mechanism to disable optimizations

2019-05-27 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +13506
pull_request: https://github.com/python/cpython/pull/13600

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset cd590a7cede156a4244e7cac61e4504e5344d842 by Victor Stinner in 
branch 'master':
bpo-1230540: Add threading.excepthook() (GH-13515)
https://github.com/python/cpython/commit/cd590a7cede156a4244e7cac61e4504e5344d842


--

___
Python tracker 

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



[issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding

2019-05-27 Thread Abhilash Raj


Change by Abhilash Raj :


--
keywords: +patch
pull_requests: +13505
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/13598

___
Python tracker 

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



[issue34725] Py_GetProgramFullPath() odd behaviour in Windows

2019-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

I read again the issue. In short, the Path Configuration is a mess and unusable 
in some cases :-) I reopen the issue.

Handling venv shouldn't be handled by the site module which is optional, but 
earlier.

I guess that venv support was added to site because it is way eaiser to write C 
than touching getpath.c written in C.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-27 Thread Andre Roberge


Andre Roberge  added the comment:

I volunteer to do some testing.  In addition to the problem I noted on my
computer where the status bar disappeared behind the task bar, I noticed
that on my secondary 4k monitor (resolution: 3840 x 2160), clicking Zoom
Height resulted in a window stretched only about 2/3 of the maximum screen
height - so, the opposite "problem".

--

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-27 Thread Tal Einat


Tal Einat  added the comment:

To get the maximum available height, does Tk's wm_maxsize() not work?

https://www.tcl.tk/man/tcl8.6/TkCmd/wm.htm#M54

Answering my own question above: No, it gives the total screen height, which 
doesn't ignore e.g. taskbars.

The best way to get the actual available height appears to be:
1. create a hidden window
2. maximize it with wm_state("zoomed")
3. get its height with winfo_height()

Testing on Windows, this does respect the taskbar, as well as scaling in the 
display settings. (Also note that Tk window heights appear not to include the 
window manager's title bar.)

I've yet to test on other OSs, but I've seen this method recommended before, 
and it has the potential to be robust.

Terry, would you like to see a PR with such an implementation?

--

___
Python tracker 

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



[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-05-27 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue35279] asyncio uses too many threads by default

2019-05-27 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

asyncio uses bare concurrent.futures.ThreadPoolExecutor.
Tha question is: should asyncio reduce the number of threads in the pool or 
concurrent.futures should change the default value?

--

___
Python tracker 

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



[issue26270] Support for read()/write()/select() on asyncio

2019-05-27 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> not a bug
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



[issue35040] [functools] provide an async-compatible version of functools.lru_cache

2019-05-27 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Brett please elaborate.
Do you want to incorporate async_lru library into CPython Core?

--

___
Python tracker 

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



[issue34993] asyncio.streams.FlowControlMixin should be part of the API

2019-05-27 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

#36889 deprecates using FlowXontrolMixin outside of asyncio

--

___
Python tracker 

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



[issue34993] asyncio.streams.FlowControlMixin should be part of the API

2019-05-27 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

FlowControlMixing is a private API class.
The class is not intended for the usage outside of asyncio.
If you found it useful for you please feel free to copy-paste the class from 
asyncio sources into your project.

The reason is: we want to keep freedom for changing asyncio internals without 
breaking backward compatibility.
One of key technologies for it is keeping the public API as small as possible.

--
resolution:  -> rejected
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



[issue34655] Support sendfile in asyncio streams API

2019-05-27 Thread Andrew Svetlov


New submission from Andrew Svetlov :

Done by #36889

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
superseder:  -> Merge StreamWriter and StreamReader into just asyncio.Stream

___
Python tracker 

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



[issue36863] argparse doesn't like options in the middle of arguments

2019-05-27 Thread paul j3


paul j3  added the comment:

This is intended behavior of multi-nargs positionals.  The 'one' string is 
consumed by the 'file' argument, and there's no positional argument left to 
consume the other strings.  

The topic was raised and discussed previously  

https://bugs.python.org/issue14191 -argparse doesn't allow optionals within 
positionals

The fix is to use 'parser.parse_intermixed_args()', as documented in

https://docs.python.org/3/library/argparse.html#intermixed-parsing

--
nosy: +paul.j3
resolution:  -> duplicate
stage: test needed -> 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



[issue26270] Support for read()/write()/select() on asyncio

2019-05-27 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

The suggestion is using streams as a high-level API.
I see no real proposals in this issue.
select()/read()/write() is not suitable interface, sorry.

Closing, feel free to create a new issue if you come up with a concrete 
proposal.

--

___
Python tracker 

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



[issue34725] Py_GetProgramFullPath() odd behaviour in Windows

2019-05-27 Thread Mario


Mario  added the comment:

Unfortunately the underlying cause of this issue has not been addressed, nor 
discussed.

There is now a way to workaround the different behaviour in Windows and Linux 
and it is possible to use the new call to make virtual environment work in 
Windows as they already do in Linux.

Problem is that application will have to be change to actually implement the 
workaround.

I still think this difference should be addressed directly.

--

___
Python tracker 

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



[issue36840] Add stream.abort() async method

2019-05-27 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Fixed by #36889

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
superseder:  -> Merge StreamWriter and StreamReader into just asyncio.Stream

___
Python tracker 

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



[issue22253] ConfigParser does not handle files without sections

2019-05-27 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue34975] start_tls() difficult when using asyncio.start_server()

2019-05-27 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Fixed by #36889

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
superseder:  -> Merge StreamWriter and StreamReader into just asyncio.Stream

___
Python tracker 

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



[issue22253] ConfigParser does not handle files without sections

2019-05-27 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-05-27 Thread miss-islington


miss-islington  added the comment:


New changeset 23b4b697e5b6cc897696f9c0288c187d2d24bff2 by Miss Islington (bot) 
(Andrew Svetlov) in branch 'master':
bpo-36889: Merge asyncio streams (GH-13251)
https://github.com/python/cpython/commit/23b4b697e5b6cc897696f9c0288c187d2d24bff2


--
nosy: +miss-islington

___
Python tracker 

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



[issue37050] Remove expr_text from ast node FormattedValue

2019-05-27 Thread Eric V. Smith


Change by Eric V. Smith :


--
priority: release blocker -> 
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue37050] Remove expr_text from ast node FormattedValue

2019-05-27 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 6f6ff8a56518a80da406aad6ac8364c046cc7f18 by Eric V. Smith in 
branch 'master':
bpo-37050: Remove expr_text from FormattedValue ast node, use Constant node 
instead (GH-13597)
https://github.com/python/cpython/commit/6f6ff8a56518a80da406aad6ac8364c046cc7f18


--

___
Python tracker 

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



[issue37068] Emit SyntaxWarning for f-strings without expressions ?

2019-05-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I do not think that all uses of f-strings without expression are errors. 
Therefore it would be better to left this on linters. Linters are optional and 
usually are flexible in configuring what warnings and in what part of the code 
should be emitted.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue19904] Add 128-bit integer support to struct

2019-05-27 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue33071] Document that PyPI no longer requires 'register'

2019-05-27 Thread hai shi

hai shi  added the comment:

I think you are right, so i remain meaningful intro. Anyone else has an thought?

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



[issue29143] Logger should ignore propagate property for disabled handlers.

2019-05-27 Thread Mario Corchero


Mario Corchero  added the comment:

Note that "handlers" cannot be disabled. This applies only to loggers.

Also, the following code shows that disabling the logger does indeed prevents 
all logs in emitted by that logger from appearing:

```
import logging

parent_handler = logging.StreamHandler()
child_handler = logging.StreamHandler()

parent_logger = logging.getLogger('parent')
child_logger = logging.getLogger('parent.child')

parent_logger.addHandler(parent_handler)
child_logger.addHandler(child_handler)

child_logger.disabled = True

child_logger.error("wops")
```

Trying to guess what happened, it might be that there was a child of the 
disabled logged and you saw the log trace expecting it was the child, example:

```
import logging

parent_handler = logging.StreamHandler()
child_handler = logging.StreamHandler()

parent_logger = logging.getLogger('parent')
child_logger = logging.getLogger('parent.child')
grandchild_logger = logging.getLogger('parent.child.grandchild')

parent_logger.addHandler(parent_handler)
child_logger.addHandler(child_handler)

child_logger.disabled = True

grandchild_logger.error("wops")
```

Note that disable does not affect how handlers across loggers are called. It 
only disables the logger and therefore prevents from emitting logs that are 
emitted directly through the disabled logger.

Might that be the case? Are you OK with closing this issue if so?

--
nosy: +mariocj89

___
Python tracker 

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



[issue9030] ctypes variable limits

2019-05-27 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue37068] Emit SyntaxWarning for f-strings without expressions ?

2019-05-27 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think this would be better suited for a linter.

--
nosy: +eric.smith

___
Python tracker 

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



[issue37068] Emit SyntaxWarning for f-strings without expressions ?

2019-05-27 Thread Matthias Bussonnier

New submission from Matthias Bussonnier :

Or more precisely I suggest to emit a SyntaxWarning for JoinedStr where no 
f-string members has an expression. 

There seem to be a couple of case where f-strings without expressions may 
indicate
that the programmer may have made a mistake; though there are also a number of
case where f-string w/o expressions are legitimate; I believe we should be able
to emit a SyntaxWarning in case where `f` are really unnecessary or might be a
mistakes.

First case where f-string w/o expressions are legitimate: multiline joined 
string,
to make sure each line is aligned. Example from CPython source:

# not a SyntaxWarning.
msg = (
f'error while attempting to bind on '
f'address {laddr!r}: '
f'{exc.strerror.lower()}'
)

The first line has obviously no expression, but the f is useful for visual
consistency, and we likely do not want a warning.

Though in the above case we can imagine the following typo :

msg = (
f'error while attempting to bind on ', #SyntaxWarning here
f'address {laddr!r}: ',
f'{exc.strerror.lower()}'
)

Easy to make and in this case, the expression-less f-string is likely an error.
In this case a syntax warning would help to distinguish that there are trailing
commas.

Another case from the cpython is the following: 

fullName = f'%s.%s.%s' % ( #SyntaxWarning here
 testCaseClass.__module__, testCaseClass.__qualname__, attrname
 )

Looking at the history; I believe the author was meaning to change to an
f-string, but got interrupted half-way and only added the prefix.

Pep 498 does not seem to say anything about f-string w/o expressions; but
test-suite appear to test that f-string without expression do not raise an
error. I do not believe that making it an error is in anyway desirable;

I believe a SyntaxWarning would align with the current warning on invalid
escape sequence, and help – mostly during refactoring, if an f-string loses 
some of its parameters, and the f"" if non-intentionally kept.

--
components: Interpreter Core
messages: 343672
nosy: mbussonn
priority: normal
severity: normal
status: open
title: Emit SyntaxWarning for f-strings without expressions ?
versions: Python 3.9

___
Python tracker 

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



[issue27860] Improvements to ipaddress module

2019-05-27 Thread Berker Peksag


Change by Berker Peksag :


--
nosy:  -berker.peksag

___
Python tracker 

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



[issue27860] Improvements to ipaddress module

2019-05-27 Thread Jack


Jack  added the comment:

I for one have encountered #35990 in my work and would appreciate a backport.

--

___
Python tracker 

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



[issue37050] Remove expr_text from ast node FormattedValue

2019-05-27 Thread Eric V. Smith


Change by Eric V. Smith :


--
keywords: +patch
pull_requests: +13504
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13597

___
Python tracker 

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



[issue37066] os.execl opening a new bash shell doesn't work if initfile/rcfile provided

2019-05-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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



[issue33071] Document that PyPI no longer requires 'register'

2019-05-27 Thread Éric Araujo

Éric Araujo  added the comment:

I’m concerned that not only references to register command were deleted, but 
also useful general intro to PyPI.

--

___
Python tracker 

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



[issue37066] os.execl opening a new bash shell doesn't work if initfile/rcfile provided

2019-05-27 Thread Siming Yuan


Siming Yuan  added the comment:

thank you for the insight and quick response.

thought i hit the weirdest bug ever

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



[issue37066] os.execl opening a new bash shell doesn't work if initfile/rcfile provided

2019-05-27 Thread Anthony Sottile


Anthony Sottile  added the comment:

They're thin wrappers around the same C functions -- that's just how C works

it is also documented: https://docs.python.org/3/library/os.html#os.execvpe

> In either case, the arguments to the child process **should start with the 
> name of the command being run**, but this is not enforced.

The pattern that I usually use is

```python
cmd = ('bash', '--init-file', 'foo')
os.execvp(cmd[0], cmd)  # never returns
```

--

___
Python tracker 

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



[issue32941] mmap should expose madvise()

2019-05-27 Thread miss-islington


miss-islington  added the comment:


New changeset 695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7 by Miss Islington (bot) 
(Antoine Pitrou) in branch 'master':
bpo-32941:  Fix test_madvise failure when page size >= 8kiB (GH-13596)
https://github.com/python/cpython/commit/695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7


--
nosy: +miss-islington

___
Python tracker 

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



[issue37065] File and lineno is not reported for syntax error in f-string

2019-05-27 Thread SilentGhost


Change by SilentGhost :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> problem with traceback for syntax error in f-string

___
Python tracker 

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



[issue37051] Glossary item "hashable" incorrect

2019-05-27 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue37051] Glossary item "hashable" incorrect

2019-05-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset e8318f31f35dc851684c094b268e4a85d7f357c9 by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.7':
bpo-37051: Refine note on what objects are hashable (GH-13587) (GH-13595)
https://github.com/python/cpython/commit/e8318f31f35dc851684c094b268e4a85d7f357c9


--

___
Python tracker 

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



[issue32941] mmap should expose madvise()

2019-05-27 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +13503
pull_request: https://github.com/python/cpython/pull/13596

___
Python tracker 

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



  1   2   >