[issue32559] logging - public function to get level from name

2018-01-16 Thread Vinay Sajip

Vinay Sajip  added the comment:

I don't think a strong enough case has been made for adding this enhancement.

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



[issue32575] IDLE cannot locate certain SyntaxErrors raised by f-string expressions

2018-01-16 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Syntax errors come from Python, not IDLE.  Except for the pseudofile name 
('' versus ''), the message is the same as the interactive 
interpreter.  Anytime one thinks IDLE has a bug, one should check the standard 
interactive interpreter as a 'control'.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Improve error reporting involving f-strings (PEP 498)

___
Python tracker 

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



[issue32577] Pip creates entry point commands in the wrong place when invoked in a venv nested in a virtualenv

2018-01-16 Thread Tzu-ping Chung

New submission from Tzu-ping Chung :

(I’m not sure whether this is a venv or virtualenv problem. Asking here first.)

To reproduce:

$ python3.6 -m virtualenv outer
$ ./outer/bin/python -m venv inner
$ ls inner/bin
activate  activate.csh  activate.fish  python  python3

In comparison:

$ python3.6 -m venv another
$ ls another/bin
activate easy_install pip3 python3
activate.csh easy_install-3.6 pip3.6   python3.6
activate.fishpip  python

All commands that pip is supposed to populate are missing

Pip can install packages correctly, but the entry points are populated not 
inside the inner venv, but the outer virtualenv:

$ ./inner/bin/python -m pip install django

$ ls inner/bin
activate  activate.csh  activate.fish  python  python3
$ ls outer/bin
... django-admin django-admin.py

The entry points correctly point to the inner environment. They are just in the 
wrong directory.

--
components: Library (Lib)
messages: 310140
nosy: uranusjr
priority: normal
severity: normal
status: open
title: Pip creates entry point commands in the wrong place when invoked in a 
venv nested in a virtualenv
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



[issue32573] sys.argv documentation should include caveat for embedded environments

2018-01-16 Thread Nick Coghlan

Nick Coghlan  added the comment:

There are actually 3 attributes that may be absent when CPython itself isn't 
managing the C level entry point: sys.argv, sys.warnoptions, and sys._xoptions.

I'd be more inclined to make the implementation match the docs though, and have 
these all be empty lists in the not-configured case, rather than absent 
entirely. (Accessing sys.argv[0] would still be an error in that situation, 
just an IndexError instead of an AttributeError)

--

___
Python tracker 

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



[issue32559] logging - public function to get level from name

2018-01-16 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> The request is not to set the level but to get the level 
> given the level name aka textual representation. 
> For example, passing in INFO should return 20 and passing
> in CRITICAL should return 50.

Why do we care about this?

--

___
Python tracker 

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



[issue32534] Speed-up list.insert: use memmove()

2018-01-16 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

FWIW, we've encountered a number of situations in the past when something that 
improved the timings on one compiler would make timings worse on another 
compiler.  There was also variance between timings on 32-bit builds versus 
64-bit builds.

--

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

> That looks like recompilation (or at least how recompilation would look if 
> you'd been granted permission). Assuming you can recompile the binary, you 
> could rename the dependency and regenerate the import library so that you can 
> link directly against the new name.

Perhaps *you* can do that, but I don't think you want to volunteer to maintain 
Windows wheels for every package on PyPI :-). Regenerating import libraries and 
tweaking build systems and all that works fine if you're a Windows specialist 
distributing artisinal hand-crafted builds, but you can't automate that 
knowledge and use it at scale. You *can* write an automatic tool that slurps in 
a bunch of PE files and rewrites them to create a self-contained DLL-hell-free 
redistributable. This is the core strategy that osx and manylinux wheels have 
been using for years now, and why it's possible for random devs to make wheels 
that work, even on platforms they don't use.

--

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread xoviat

xoviat  added the comment:

Just to be clear, I'm not considering doing this with respect to the C/C++ 
runtimes, but all of the other shared libraries. And in case you weren't aware, 
this is exactly what auditwheel does (except that I believe it uses patchelf, 
whereas I will be using Nathaniel's tool).

--

___
Python tracker 

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



[issue32551] Zipfile & directory execution in 3.5.4 also adds the parent directory to sys.path

2018-01-16 Thread Nick Coghlan

Nick Coghlan  added the comment:

Good catch Eryk, I misdiagnosed what was going on, since the current directory 
and the parent directory were the same location in Ned's particular example.

I double checked, and we resolve symlinks in path entries *before* performing 
the incorrect directory traversal ("..." below indicates the usual standard 
path entries, "/tmp" is the unexpected entry introduced by the bug), so it 
isn't possible to use a symlink to get a user-controlled directory onto the 
path:

```
$ ./python /tmp/spam
/tmp/spam
/tmp
...
$ ln -s /tmp/spam /tmp/mydir/malicious
$ ./python /tmp/mydir/malicious
/tmp/mydir/malicious
/tmp
...
```

That means that as far as I can tell, this is just a plain old bug, rather than 
a potential security concern (since privileged admin-controlled commands tend 
generally live in admin-controlled directories, as if they didn't, potential 
attackers would be able to replace them with arbitrary code directly)

--
title: Zipfile & directory execution in 3.5.4 adds the current directory to 
sys.path -> Zipfile & directory execution in 3.5.4 also adds the parent 
directory to sys.path

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread Steve Dower

Steve Dower  added the comment:

That looks like recompilation (or at least how recompilation would look if 
you'd been granted permission). Assuming you can recompile the binary, you 
could rename the dependency and regenerate the import library so that you can 
link directly against the new name.

As an official position, I don't support modifying other people's PE files or 
distributing the modified results.

--

___
Python tracker 

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



[issue29319] Embedded 3.6.0 distribution cannot run pyz files

2018-01-16 Thread Nick Coghlan

Nick Coghlan  added the comment:

Tweaking metadata to make it clear Py3.5 was also updated.

--
versions: +Python 3.5

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

> it still won't help if another import has loaded a different DLL by the same 
> name. This is where you can't avoid recompilation or activation contexts.

Ah, there's an important bit of context you're missing: there is actually a 
third option :-)

https://github.com/njsmith/machomachomangler#pe-features

--

___
Python tracker 

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



[issue30604] co_extra_freefuncs is stored thread locally and can lead to crashes

2018-01-16 Thread Jeethu Rao

Change by Jeethu Rao :


--
nosy: +jeethu

___
Python tracker 

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



[issue28521] _PyEval_RequestCodeExtraIndex should return a globally valid index, not a ThreadState specific one

2018-01-16 Thread Jeethu Rao

Change by Jeethu Rao :


--
nosy: +jeethu

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread Steve Dower

Steve Dower  added the comment:

The import hook could theoretically modify the search path before and after 
loading the module, though that could make debugging a real pain.

I was also thinking of just having an explicit list of DLLs to load, rather 
than inspecting the binary. Per-module preloading is as fine grained as you can 
get though it still won't help if another import has loaded a different DLL by 
the same name. This is where you can't avoid recompilation or activation 
contexts.

--

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread xoviat

xoviat  added the comment:

For the record, moving the DLL path manipulation code into the interpreter 
would address the concern that importing a module would not manipulate the 
search path because the behavior would move into Python itself.

--

___
Python tracker 

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



[issue32573] sys.argv documentation should include caveat for embedded environments

2018-01-16 Thread Pedro

Pedro  added the comment:

My comment above uses "code that we provide for supporting embedding," not 
"third party code," as the definition of embedded.

--

___
Python tracker 

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



[issue32573] sys.argv documentation should include caveat for embedded environments

2018-01-16 Thread Pedro

Pedro  added the comment:

My first inclination would be no. An argv value of [''] means "zero 
command-line arguments" (not even a filename), which implies the following as 
far as I know:
1. Python was called as an executable rather than a library, because you can't 
pass command-line arguments to a library
2. No arguments were passed to the executable
3. You are running from inside the REPL

All three are false in an embedded context.

A not-much-better-but-maybe-worth-considering question might also be: should 
scripts be able to tell whether they are being run from an embedded 
interpreter? If so, do they have any other way of doing so if an initialization 
is forced for argv?

--

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

Steve said:
> The import hook was my proposal to let you only preload DLLs when the 
> extension module is being loaded, rather than having to load all the DLLs on 
> the first "import scipy" just in case one of its submodules gets imported 
> later. A hook can trigger on a specific module.

That's a good point: we could write an import hook that examines each .pyd 
before it's loaded, and then preloads just the .dlls that it's looking for. 
But... that's literally reimplementing what the normal DLL loader does. If we 
can get the normal DLL loader to work, it's probably going to be simpler. And 
so long as we're talking specifically about the case where it's a directory we 
control and that only contains .dlls with mangled names, then it seems fine to 
me. (And maybe Ray will have to hold his nose, but, well, you know. That's 
programming sometimes.)

xoviat said:
> This is what ray said:
> "Please do not do this. Importing a specific module should not modify the way 
> that process loads subsequent DLLs."

I'm not sure what Ray's worried about exactly, but I don't see anything in his 
comment that makes me think moving the DLL path manipulation code into the 
interpreter will make him happier.

I think this can be closed.

--

___
Python tracker 

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



[issue32576] concurrent.futures.thread potential deadlock due to Queue in weakref callback

2018-01-16 Thread Gregory P. Smith

New submission from Gregory P. Smith :

As a follow up to https://bugs.python.org/issue14976 which just introduced 
queue.SimpleQueue:

concurrent.futures.thread currently uses a queue.Queue() from weakref callbacks 
which could in theory lead to a deadlock when periodic gc triggers a cleanup 
invalidating some weakrefed objects at an inopportune time while Python code 
has the queue's lock held.

I don't have a test case proving this (deadlocks are hard).

Switching it to use a SimpleQueue should avoid the problem?

...

This and the C extension module based SimpleQueue would be good to backport to 
https://pypi.python.org/pypi/futures as well.

--
messages: 310124
nosy: gregory.p.smith, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: concurrent.futures.thread potential deadlock due to Queue in weakref 
callback
type: behavior
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



[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2018-01-16 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

https://bugs.python.org/issue32576 filed for that

--

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread Steve Dower

Steve Dower  added the comment:

I am very okay with it not being Python's responsibility to do this.

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



[issue32534] Speed-up list.insert: use memmove()

2018-01-16 Thread Jeethu Rao

Jeethu Rao  added the comment:

> Be careful. Moving "l.insert" lookup of the loop might make the code slower. 
> I never looked why. But Python 3.7 was also optimized in many places to call 
> methods, so I'm not sure anymore :)

Thanks again! Here's a gist without the hack[1].

[1]: https://gist.github.com/jeethu/19430d802aa08e28d1cb5eb20a47a470

--

___
Python tracker 

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



[issue32534] Speed-up list.insert: use memmove()

2018-01-16 Thread STINNER Victor

STINNER Victor  added the comment:

> I’ve run the benchmark that you've suggested with a minor change (to avoid 
> the cost of LOAD_ATTR)

Be careful. Moving "l.insert" lookup of the loop might make the code slower. I 
never looked why. But Python 3.7 was also optimized in many places to call 
methods, so I'm not sure anymore :)

--

___
Python tracker 

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



[issue32534] Speed-up list.insert: use memmove()

2018-01-16 Thread Jeethu Rao

Jeethu Rao  added the comment:

Victor: I’m booting with the isolcpus and rcu_nocbs flags, and running 
pyperformance with the --affinity flag to pin the benchmark to the isolated CPU 
cores. I’ve also run `perf system tune`. And the OS is Ubuntu 17.10. Thanks for 
the tip on using perf timeit instead of timeit. I’ve run the benchmark that 
you've suggested with a minor change (to avoid the cost of LOAD_ATTR) and 
attached the output on a gist[1].

Antoine: Thanks for benchmarking it. After looking at the generated 
assembly[2], I found that ins1 is being inlined and the call to memmove was 
appearing before the loop (possibly because the compiler assumes that the call 
to memmove is more likely). I made a minor change and increased the threshold 
to 32. I’ve attached the generated assembly in a gist[3] (The relevant sequence 
is around line 8406, if you’re interested). And here’s the pyperformance 
comparison[4]. Could you please try benchmarking this version on your machine?

[1]: https://gist.github.com/jeethu/2d2de55afdb8ea4ad03b6a5d04d5227f
[2]: Generated with “gcc -DNDEBUG -fwrapv -O3 -std=c99  -I. -I./Include 
-DPy_BUILD_CORE -S -masm=intel Objects/listobject.c”
[3]: https://gist.github.com/jeethu/596bfc1251590bc51cc230046b52fb38
[4]: https://gist.github.com/jeethu/d6e4045f7932136548a806380eddd030

--

___
Python tracker 

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



[issue31299] Add "ignore_modules" option to TracebackException.format()

2018-01-16 Thread Dmitry Kazakov

Change by Dmitry Kazakov :


--
pull_requests: +5065
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



[issue32575] IDLE cannot locate certain SyntaxErrors raised by f-string expressions

2018-01-16 Thread Eric V. Smith

Eric V. Smith  added the comment:

This is not an IDLE bug, per se. There's a known problem with f-strings not 
producing the correct line numbers. See issue #29051. Unless Terry thinks 
there's something IDLE-specific here, I suggest closing this as a duplicate.

--
nosy: +eric.smith

___
Python tracker 

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



[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-16 Thread Barry A. Warsaw

Change by Barry A. Warsaw :


--
pull_requests:  -5016

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread xoviat

xoviat  added the comment:

This is what ray said:

"Please do not do this. Importing a specific module should not modify the way 
that process loads subsequent DLLs."

(https://github.com/numpy/numpy/pull/10229#issuecomment-354846459)

What I'm proposing to do is write a tool, widely used like auditwheel, that 
will copy shared libraries into the .libs folder and then patch __init__.py in 
all packages in order to modify the DLL search path to add these folders.

If everyone's okay with that, we can close this issue. But if everyone's not 
okay with that, then we need to document that it's Python's responsibility to 
do this.

--

___
Python tracker 

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



[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-16 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +5064

___
Python tracker 

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



[issue32575] IDLE cannot locate certain SyntaxErrors raised by f-string expressions

2018-01-16 Thread Dan Snider

New submission from Dan Snider :

For example the following f-string

f'{1):.1%}'

IDLE will scroll to the top of the file and highlight a random and irrelevant 
line (not sure what it's doing tbh).

running the expression with `exec` makes it look like implicit parenthesis are 
added to the ends of files..

>>> exec("f'{1):.1f}'")
Traceback (most recent call last):
  File "", line 1, in 
exec("f'{1):.1f}'")
  File "", line 1
(1))
   ^
SyntaxError: unexpected EOF while parsing

IDLE can correctly find a `(1))` in a file but appears to fail only in f-string 
expressions.

--
assignee: terry.reedy
components: IDLE
messages: 310117
nosy: bup, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE cannot locate certain SyntaxErrors raised by f-string expressions
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue32573] sys.argv documentation should include caveat for embedded environments

2018-01-16 Thread STINNER Victor

Change by STINNER Victor :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread Steve Dower

Steve Dower  added the comment:

I understood the proposal just fine, and I understand the problems involved and 
appreciate why the ideal isn't sufficient here.

The import hook was my proposal to let you only preload DLLs when the extension 
module is being loaded, rather than having to load all the DLLs on the first 
"import scipy" just in case one of its submodules gets imported later. A hook 
can trigger on a specific module.

Since there appears to be some uncertainty, package __init__.py always runs 
before its submodules are even resolved, so it's totally fine to modify import 
machinery or preload DLLs here. 

rpath is totally irrelevant here. The OS model is different and we've given you 
the available options on Windows (application directory, process-wide search 
path, explicit preloading, assembly probing path).

--

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

> However, the principal reason that I'm opening this issue is that Ray 
> complained that packages shouldn't be altering the DLL search path

If that's crucial context, can you link to it?

--

___
Python tracker 

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



[issue26692] cgroups support in multiprocessing

2018-01-16 Thread David Chin

David Chin  added the comment:

I would like to state strong support if is.get_usable_cpu_count()

I administer a typical HPC cluster which may have multiple jobs scheduled on 
the same physical server. The fact that multiprocessing ignores cgroups leads 
to bad oversubscription.

--
nosy: +hairygristle

___
Python tracker 

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



[issue32574] asyncio.Queue, put() leaks memory if the queue is full

2018-01-16 Thread José Melero Fernández

Change by José Melero Fernández :


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

___
Python tracker 

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



[issue32549] Travis: Test with OpenSSL 1.1.0

2018-01-16 Thread Christian Heimes

Christian Heimes  added the comment:


New changeset ced9cb5303ad1447f84d923e0c7f769f5e0c6297 by Christian Heimes in 
branch 'master':
bpo-32549: Compile OpenSSL 1.1.0 on Travis CI (#5180)
https://github.com/python/cpython/commit/ced9cb5303ad1447f84d923e0c7f769f5e0c6297


--

___
Python tracker 

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



[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2018-01-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Could you open a new issue for it?

--

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread xoviat

xoviat  added the comment:

As Nathaniel noted, the "solution" of placing DLLs in the same directory as 
extension modules is not a solution. I also think that some people here 
misunderstand my proposal: I'm not necessarily proposing that these directories 
are added using an import hook: they could be added on startup through a scan 
of site-packages.

"However, even if this were implemented we'd still need to write and maintain 
the __init__.py injection code for the next ~5 years, so probably the thing to 
do is to implement the __init__.py approach first and wait to see how it shakes 
out before considering interpreter changes."

Yes, this approach is already implemented in NumPy and SciPy. I'm also 
implementing it for other packages as well. However, the principal reason that 
I'm opening this issue is that Ray complained that packages shouldn't be 
altering the DLL search path: the only other solution that I can see is to make 
this documented behavior, only on Windows, and only because the Windows 
developers (and I'm in no way anti-Windows, but I'm just frustrated with this 
particular issue) decided to place an arbitrary limit on probingPath.

As far as the complaints about rpath: this is a mechanism used by every single 
manylinux and actually most OSX wheels, and it works perfectly.

--

___
Python tracker 

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



[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2018-01-16 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Catalin has been examining code... switching concurrent.futures.thread to use 
SimpleQueue instead of Queue is probably a good idea as the queues in there get 
used from weakref callbacks.

--

___
Python tracker 

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



[issue32573] sys.argv documentation should include caveat for embedded environments

2018-01-16 Thread R. David Murray

R. David Murray  added the comment:

A better question might be: is there something in the embedding framework that 
should initialize argv to the empty list?  embedding framework here could have 
two meanings: either the third party code, or the code that we provide for 
supporting embedding.

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



[issue32574] asyncio.Queue, put() leaks memory if the queue is full

2018-01-16 Thread José Melero Fernández

New submission from José Melero Fernández :

Repro: asyncio queue with limited size and the queue full, call 
asyncio.wait_for(some_queue.put(1), some_timeout). Every canceled put produces 
a new item in queue._putters that is never deleted (memory leak). 

Uploaded to the issue a file with an example.

The get method had a very similar bug which was fixed in 2016-11. The related 
issue:
https://bugs.python.org/issue31620

I already have the code for the PR prepared, so I want to publish the link of 
the MR in a few of minutes.

--
components: asyncio
files: asyncio_put_memory_leak.py
messages: 310107
nosy: Mordis, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.Queue, put() leaks memory if the queue is full
type: resource usage
versions: Python 3.6, Python 3.7
Added file: https://bugs.python.org/file47388/asyncio_put_memory_leak.py

___
Python tracker 

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



[issue8243] curses writing to window's bottom right position raises: `_curses.error: addstr() returned ERR'

2018-01-16 Thread Jay Crotts

Jay Crotts  added the comment:

Submitted a PR for this issue, awaiting review.

--

___
Python tracker 

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



[issue32573] sys.argv documentation should include caveat for embedded environments

2018-01-16 Thread Pedro

New submission from Pedro :

Embedded Python interpreters, such as Boost.Python, do not have sys.argv 
available. (sys itself works fine.) This causes the interpreter to crash with 
the following exception when you try to access argv:

AttributeError: 'module' object has no attribute 'argv'

I'm not sure how closely related this is to #15577 or PEP 432. A simple 
workaround is to manually assign a list with an empty string to argv, as 
suggested by https://github.com/google/oauth2client/issues/642. However, the 
documentation for the sys module makes no mention of this special case for 
argv, and the line at the top that says "It is always available" can easily be 
interpreted to mean that *all* of sys's attributes will always be available. I 
suggest adding the following to the documentation for sys.argv:



Since `argv` contains the list of **command line** arguments passed to the 
Python interpreter, `argv` is not available within embedded interpreters, and 
scripts that run in embedded environments will raise an `AttributeError` when 
they attempt to access `argv`. As a workaround, assign a list with an empty 
string manually:
```
import sys

if not hasattr(sys, 'argv'):
sys.argv  = ['']
```

--
assignee: docs@python
components: Documentation
messages: 310105
nosy: docs@python, pgacv2
priority: normal
severity: normal
status: open
title: sys.argv documentation should include caveat for embedded environments
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue32559] logging - public function to get level from name

2018-01-16 Thread Varun Agrawal

Varun Agrawal  added the comment:

@zach.ware: True, but since we already have a getLevelName method, having a 
symmetric method to do the opposite made sense. Plus the method can perform 
error checking and other things to ensure much cleaner code.

--

___
Python tracker 

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



[issue32551] Zipfile & directory execution in 3.5.4 adds the current directory to sys.path

2018-01-16 Thread Eryk Sun

Eryk Sun  added the comment:

On Windows it's the directory that contains the zip file or directory with 
__main__.py, not the current directory. This seems normal to me. The directory 
or zip file is effectively executing as a script. I can understand wanting more 
isolated behavior in this case, i.e. make isolated mode the default when 
executing a directory or zip file as a script.

C:\>py -3.5 C:\Temp\spam
__file__:
 C:\Temp\spam\__main__.py
sys.path:
C:\Temp\spam
C:\Temp
C:\Program Files\Python35\python35.zip
C:\Program Files\Python35\DLLs
C:\Program Files\Python35\lib
C:\Program Files\Python35
C:\Program Files\Python35\lib\site-packages

C:\>py -3.5 C:\Temp\spam.zip
__file__:
 C:\Temp\spam.zip\__main__.py
sys.path:
C:\Temp\spam.zip
C:\Temp
C:\Program Files\Python35\python35.zip
C:\Program Files\Python35\DLLs
C:\Program Files\Python35\lib
C:\Program Files\Python35
C:\Program Files\Python35\lib\site-packages

--
nosy: +eryksun

___
Python tracker 

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



[issue32572] Add the ftplib option, overrides the IP address.

2018-01-16 Thread Hideyuki

Change by Hideyuki :


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

___
Python tracker 

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



[issue11191] test_search_cpp error on AIX (with xlc)

2018-01-16 Thread Michael Felt

Change by Michael Felt :


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

___
Python tracker 

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



[issue32572] Add the ftplib option, overrides the IP address.

2018-01-16 Thread Hideyuki

New submission from Hideyuki :

Add the ftplib's option, overrides the IP address to be used with the PORT 
command.
Currently, the PORT command is sending its self IP address.
If the host is connected with NAT, it will not work.
If that command has a NAT external IP address, it is working.
So add an option to overrides the IP address sending with the PORT command.
This is useful when active FTP transfer needed on a 1:1 NAT connected host so 
like AWS VPC.

--
components: Library (Lib)
messages: 310102
nosy: hideyuki
priority: normal
severity: normal
status: open
title: Add the ftplib option, overrides the IP address.
type: enhancement
versions: 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



[issue32571] Speed up and clean up getting optional attributes in C code

2018-01-16 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue32571] Speed up and clean up getting optional attributes in C code

2018-01-16 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

In issue32544 there was introduced a new private C API function 
_PyObject_GetAttrWithoutError() which never raises an AttributeError, but 
returns NULL without error set if an attribute is absent. This allowed to speed 
up Python builtins hasattr() and getattr() with the default argument.

But C code also could gain a benefit from this. It is common to look up an 
attribute and silence an AttributeError. Actually it is more common than the 
opposite case.

The proposed patch adds yet one function, _PyObject_GetAttrIdWithoutError(), 
and uses these two functions if it is possible to avoid checking an 
AttributeError after PyObject_GetAttr() and _PyObject_GetAttrId(). This could 
speed up some code, and also makes it cleaner.

--
components: Extension Modules, Interpreter Core
messages: 310101
nosy: inada.naoki, serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Speed up and clean up getting optional attributes in C code
type: performance
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



[issue32403] date, time and datetime alternate constructors should take fast construction path

2018-01-16 Thread Alexander Belopolsky

Change by Alexander Belopolsky :


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



[issue32404] fromtimestamp does not call __new__ in datetime subclasses

2018-01-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:


New changeset 9f1b7b93f5f0ef589e7b272e127cacf4ce5d23f1 by Alexander Belopolsky 
(Paul Ganssle) in branch 'master':
bpo-32403: Faster date and datetime constructors (#4993)
https://github.com/python/cpython/commit/9f1b7b93f5f0ef589e7b272e127cacf4ce5d23f1


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



[issue32403] date, time and datetime alternate constructors should take fast construction path

2018-01-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:


New changeset 9f1b7b93f5f0ef589e7b272e127cacf4ce5d23f1 by Alexander Belopolsky 
(Paul Ganssle) in branch 'master':
bpo-32403: Faster date and datetime constructors (#4993)
https://github.com/python/cpython/commit/9f1b7b93f5f0ef589e7b272e127cacf4ce5d23f1


--

___
Python tracker 

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



[issue32410] Implement loop.sock_sendfile method

2018-01-16 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset 6b5a27975a415108a5eac12ee302bf2b3233f4d4 by Andrew Svetlov in 
branch 'master':
bpo-32410: Implement loop.sock_sendfile() (#4976)
https://github.com/python/cpython/commit/6b5a27975a415108a5eac12ee302bf2b3233f4d4


--

___
Python tracker 

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



[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-16 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset c2740e8a263e76427a8102a89f4b491a3089b2a1 by Victor Stinner (Miss 
Islington (bot)) in branch '3.6':
Skip test_readline.test_nonascii() on C locale (GH-5203) (#5204)
https://github.com/python/cpython/commit/c2740e8a263e76427a8102a89f4b491a3089b2a1


--

___
Python tracker 

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



[issue32559] logging - public function to get level from name

2018-01-16 Thread Zachary Ware

Zachary Ware  added the comment:

You could use `getattr(logging, levelname)` for that purpose.

--
nosy: +zach.ware

___
Python tracker 

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



[issue32570] Python crash 0xc00000fd Windows10 x64 - "fail without words"

2018-01-16 Thread Василь Коломієць

New submission from Василь Коломієць :

The code https://ideone.com/ctx92s works for 1 000 000. 
But on my PC it works only for 1024.
Wen i am trting give him 1 000 000 - the Python crashes without any words:
https://i.stack.imgur.com/1do06.png
and in windows we can found this crash report: 
https://i.stack.imgur.com/nruoa.png
---
so it works for low values and crashes on higher values. Buy its no bug...
Than - What is it?

--
components: Windows
messages: 310095
nosy: Vasyl Kolomiets, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Python crash  0xc0fd Windows10 x64  -  "fail without words"
type: crash
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



[issue32534] Speed-up list.insert: use memmove()

2018-01-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, I ran the benchmarks here (Ubuntu 16.04, Core i5-2500K, PGO and LTO 
disabled) and I don't get any consistent speedup, which is more in line with 
what I was expecting:
https://gist.github.com/pitrou/29eb7592fa1eae2be390f3bfa3db0a3a

--

___
Python tracker 

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



[issue32536] ast and tokenize disagree about line number

2018-01-16 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



[issue32559] logging - public function to get level from name

2018-01-16 Thread Varun Agrawal

Varun Agrawal  added the comment:

The request is not to set the level but to get the level given the level name 
aka textual representation. For example, passing in INFO should return 20 and 
passing in CRITICAL should return 50.

--

___
Python tracker 

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



[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-16 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +5058

___
Python tracker 

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



[issue31572] Avoid suppressing all exceptions in PyObject_HasAttr()

2018-01-16 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 4d9aec022063dcfc4cf40ae46b1c4a968297e664 by Serhiy Storchaka in 
branch 'master':
bpo-31572: Get rid of PyObject_HasAttr() and _PyObject_HasAttrId() in the _io 
module. (#3726)
https://github.com/python/cpython/commit/4d9aec022063dcfc4cf40ae46b1c4a968297e664


--

___
Python tracker 

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



[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-16 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset c495e799ed376af91ae2ddf6c4bcc592490fe294 by Victor Stinner in 
branch 'master':
Skip test_readline.test_nonascii() on C locale (#5203)
https://github.com/python/cpython/commit/c495e799ed376af91ae2ddf6c4bcc592490fe294


--

___
Python tracker 

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



[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-16 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +5057

___
Python tracker 

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



[issue32544] Speed up hasattr(o, name) and getattr(o, name, default)

2018-01-16 Thread STINNER Victor

STINNER Victor  added the comment:

Cool. I always wanted to implement something similar. Nice work Naoki!

--
nosy: +vstinner

___
Python tracker 

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



[issue31368] Support asynchronous, non-blocking buffered reads (RWF_NONBLOCK)

2018-01-16 Thread YoSTEALTH

YoSTEALTH  added the comment:

According to this nginx test 
https://www.nginx.com/blog/thread-pools-boost-performance-9x/ there is a huge 
boost in performance when using thread poll for File IO. It is postulated that 
when preadv2() & RWF_NONBLOCK feature are available it would further benefit 
(latency, thread sync, ...)

I am not a C coder so i can't just jump into this and code this feature (if i 
could i would have done it long ago). As Antoine mentioned, it needs to written 
at C (+ctypes) level.

I am willing to help, hit me up on #python user: stealth_

--

___
Python tracker 

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



[issue11416] netrc module does not handle multiple entries for a single host

2018-01-16 Thread Yuri Bochkarev

Change by Yuri Bochkarev :


--
nosy: +Yuri.Bochkarev

___
Python tracker 

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



[issue32503] Avoid creating small frames in pickle protocol 4

2018-01-16 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

In the current form the change is trivial, just an additional check. Actually 
it fixes a regression introduced in issue31993. Currently even empty frames can 
be produced (when fast=True).

--

___
Python tracker 

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



[issue32561] Add API to io objects for non-blocking reads/writes

2018-01-16 Thread YoSTEALTH

YoSTEALTH  added the comment:

There will be lot of confusion using "buffered" & "unbuffered" terminology, 
since python already has BufferedIOBase (as mentioned by Martin). It would be 
more appropriate to create io.CachedIOBase and add non-blocking argument to 
open(blocking=False) to enable this feature.

--
nosy: +YoSTEALTH

___
Python tracker 

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



[issue11849] glibc allocator doesn't release all free()ed memory

2018-01-16 Thread Bob Kline

Bob Kline  added the comment:

> ... jemalloc can reduce memory usage ...

Thanks for the tip. I downloaded the source and successfully built the DLL, 
then went looking for a way to get it loaded. Unfortunately, DLL injection, 
which is needed to use this allocator in Python, seems to be much better 
supported on Linux than on Windows. Basically, Microsoft's documentation [1] 
for AppInit_DLL, the shim for DLL injection on Windows, says (in effect) 
"here's how to use this technique, but we don't recommend using it, so here's a 
link [2] for what we recommend you do instead. That link takes you to "Try 
searching for what you need. This page doesn’t exist."

[1] 
https://support.microsoft.com/en-us/help/197571/working-with-the-appinit-dlls-registry-value
[2] https://support.microsoft.com/en-us/help/134655

--

___
Python tracker 

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



[issue32544] Speed up hasattr(o, name) and getattr(o, name, default)

2018-01-16 Thread INADA Naoki

INADA Naoki  added the comment:

I confirmed django_template is `hasattr`-heavy benchmark.

Functionwas called by...
ncalls  tottime  cumtime
{built-in method builtins.hasattr}  <-   10.0000.000  
/home/inada-n/local/py37/lib/python3.7/site-packages/django/apps/registry.py:20(__init__)
...
 163180.0030.003  
/home/inada-n/local/py37/lib/python3.7/site-packages/django/utils/functional.py:81(__prepare_class__)
 90.0650.065  
/home/inada-n/local/py37/lib/python3.7/site-packages/django/utils/html.py:79(conditional_escape)
 932000.0640.064  
/home/inada-n/local/py37/lib/python3.7/site-packages/django/utils/safestring.py:129(mark_safe)
 90.0750.075  
/home/inada-n/local/py37/lib/python3.7/site-packages/django/utils/safestring.py:149(mark_for_escaping)

--

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

Conda is cool but we're not currently planning to abandon wheels.

--

___
Python tracker 

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



[issue32544] Speed up hasattr(o, name) and getattr(o, name, default)

2018-01-16 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 378edee0a3b913d60653dc17dfe61d83405a8135 by INADA Naoki in branch 
'master':
bpo-32544: Speed up hasattr() and getattr() (GH-5173)
https://github.com/python/cpython/commit/378edee0a3b913d60653dc17dfe61d83405a8135


--

___
Python tracker 

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



[issue32544] Speed up hasattr(o, name) and getattr(o, name, default)

2018-01-16 Thread INADA Naoki

Change by INADA Naoki :


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



[issue32569] Blake2 module, memory clearance update

2018-01-16 Thread David Carlier

David Carlier  added the comment:

No worries If I saw first it was an extra project I would not have try to 
submit in Cpython. Apologies. I ll see what I can do in blake2 side :-)

--

___
Python tracker 

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



[issue32569] Blake2 module, memory clearance update

2018-01-16 Thread Christian Heimes

Christian Heimes  added the comment:

In general your patch is a good idea. It should land in upstream, so everybody 
benefits from it. I also want to keep the maintenance burden as small as 
possible.

--

___
Python tracker 

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



[issue32569] Blake2 module, memory clearance update

2018-01-16 Thread Christian Heimes

Christian Heimes  added the comment:

Thanks for your contribution. Any optimization must land in upstream first, 
https://github.com/BLAKE2/libb2.

See https://bugs.python.org/issue17405 for more discussion on the topic.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue32569] Blake2 module, memory clearance update

2018-01-16 Thread David Carlier

David Carlier  added the comment:

Since the PR had been closed.

--
resolution:  -> wont fix
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



[issue32569] Blake2 module, memory clearance update

2018-01-16 Thread David Carlier

Change by David Carlier :


--
components: Library (Lib)
nosy: David Carlier
priority: normal
pull_requests: 5056
severity: normal
status: open
title: Blake2 module, memory clearance update
type: enhancement
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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Probably better overall to go with a conda package which puts
the DLLs in a central location and manages the dependencies.

You can then load the DLL in the package before loading the PYD
and you're all set. Whether in an __init__.py or elsewhere is
really up to the package.

--

___
Python tracker 

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



[issue32569] Blake2 module, memory clearance update

2018-01-16 Thread David Carlier

New submission from David Carlier :

Might brings a bit of "controversy" but some oses have already unoptimizable 
memset like functions from their libc was thinking to just use them instead.

--

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-16 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

Putting .dll's next to their .pyd's isn't a general solution, because sometimes 
you want to be able to use the same .dll's from .pyd's that are in different 
directories. For example, scipy.spatial.qhull, scipy.optimize._lbfsgb, and 
scipy.linalg._flinalg are three different extensions in different directories, 
but they all link against BLAS. And you definitely don't want to include 
multiple copies of BLAS; the current scipy wheels on Linux are 50 MB, and 40 MB 
of that is *one* copy of OpenBLAS.

I don't think import hooks are terribly relevant here either. The big problem 
is how to arrange for the .dlls to be loaded before the .pyds. The obvious hack 
would be to somehow automatically rewrite the package __init__.py to either 
mutate PATH or pre-load the .dlls, which is admittedly pretty nasty. But... if 
you want to install an import hook, then that *also* requires rewriting the 
package __init__.py to inject the import hook installation code, and then the 
import hook would just be mutating PATH or pre-loading the .dlls. So adding an 
import hook to the mix doesn't seem to be buying much.

I guess I can see the argument for @xoviat's original proposal: if lots of 
packages are going to have weird code injected into their __init__.py just to 
add the same paths to the DLL search path, then maybe it's simpler all around 
if this becomes a standard feature of the Python importer. However, even if 
this were implemented we'd still need to write and maintain the __init__.py 
injection code for the next ~5 years, so probably the thing to do is to 
implement the __init__.py approach first and wait to see how it shakes out 
before considering interpreter changes.

--
nosy: +njs

___
Python tracker 

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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-01-16 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Also sizehint=0 was rejected before 2fb9ae9dfc5a6830d902332ba93b13387e292ddb. 
Now it is accepted.

--

___
Python tracker 

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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-01-16 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
components: +Extension Modules
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue32563] -Werror=declaration-after-statement expat build failure on Python 3.5

2018-01-16 Thread Nick Coghlan

Nick Coghlan  added the comment:

I couldn't persuade git to pull the upstream patch in directly, so I just made 
the same change downstream: https://github.com/python/cpython/pull/5201

--

___
Python tracker 

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



[issue32563] -Werror=declaration-after-statement expat build failure on Python 3.5

2018-01-16 Thread Nick Coghlan

Change by Nick Coghlan :


--
keywords: +patch
pull_requests: +5055
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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-01-16 Thread Tal Einat

Tal Einat  added the comment:

Also see discussion in GitHub PR 4265 for #31938.

--

___
Python tracker 

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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-01-16 Thread Tal Einat

New submission from Tal Einat :

In 2fb9ae9dfc5a6830d902332ba93b13387e292ddb, select.epoll() was changed to 
reject sizehint=-1, despite that still being documented as the default value. 
Would it be possible to reverse this change, making -1 a special value 
signaling select.epoll() to use sizehint=FD_SETSIZE-1, as was before this 
change?

Additionally, in the same commit the docs were changed to say that the sizehint 
parameter is deprecated and has no effect, but later changes have restored use 
of sizehint in certain cases without updating the documentation. This 
inconsistency should be fixed.

For reference, this came up as part of #31938.

--
messages: 310072
nosy: benjamin.peterson, serhiy.storchaka, taleinat
priority: normal
severity: normal
status: open
title: Fix handling of sizehint=-1 in select.epoll()

___
Python tracker 

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



[issue32567] Venv’s config file (pyvenv.cfg) should be compatible with ConfigParser

2018-01-16 Thread Tzu-ping Chung

New submission from Tzu-ping Chung :

I’m not sure if it is intended, but it seems wrong to me that pyvenv.cfg is 
using a format that ConfigParser does not recognise. ConfigParser requires all 
values be placed under a section, but pyvenv.cfg does not do that.

Maybe related:

* ConfigParser’s format requirement: 
https://docs.python.org/3/library/configparser.html#supported-ini-file-structure
* How venv creates the configuration file: 
https://github.com/python/cpython/blob/master/Lib/venv/__init__.py#L141
* Abandoned discussion on whether ConfigParser should support section-less 
format #22253

--
components: Library (Lib)
messages: 310071
nosy: uranusjr
priority: normal
severity: normal
status: open
title: Venv’s config file (pyvenv.cfg) should be compatible with ConfigParser
type: enhancement
versions: Python 3.4, 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



[issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)

2018-01-16 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset e7dbd0658304f11daf103d56662656efecad006d by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.6':
bpo-26163: Frozenset hash improvement (GH-5194) (#5198)
https://github.com/python/cpython/commit/e7dbd0658304f11daf103d56662656efecad006d


--

___
Python tracker 

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



[issue29708] support reproducible Python builds

2018-01-16 Thread Bernhard M. Wiedemann

Change by Bernhard M. Wiedemann :


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

___
Python tracker 

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



[issue32561] Add API to io objects for non-blocking reads/writes

2018-01-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Do you think we can deprecate the existing broken non-blocking mode?

I would suggest asking on python-dev.  I wouldn't mind it, but perhaps there 
are people using it.

--

___
Python tracker 

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



[issue11849] glibc allocator doesn't release all free()ed memory

2018-01-16 Thread INADA Naoki

INADA Naoki  added the comment:

FYI, jemalloc can reduce memory usage, especially when application
is multithreaded.

https://www.speedshop.co/2017/12/04/malloc-doubles-ruby-memory.html
https://zapier.com/engineering/celery-python-jemalloc/

--
nosy: +inada.naoki

___
Python tracker 

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



[issue32561] Add API to io objects for non-blocking reads/writes

2018-01-16 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

That's a reasonable concern. Do you think we can deprecate the existing broken 
non-blocking mode?

--

___
Python tracker 

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



[issue32563] -Werror=declaration-after-statement expat build failure on Python 3.5

2018-01-16 Thread STINNER Victor

STINNER Victor  added the comment:

Hum, I backported a fix to 3.4 but I forgot Python 3.5.

My fix for Python 3.4 is made of multiple bugfixes: 
8b11e8de7aedacfbbcc8c780f3c4097396f1d1a3

For Python 3.5, you want at least this change I think:

https://github.com/libexpat/libexpat/commit/e0b290eb3d8f4c4b45137a7d7f4f8db812145bd2

--

___
Python tracker 

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



[issue32534] Speed-up list.insert: use memmove()

2018-01-16 Thread STINNER Victor

Change by STINNER Victor :


--
title: Speed-up list.insert -> Speed-up list.insert: use memmove()

___
Python tracker 

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



[issue11849] glibc allocator doesn't release all free()ed memory

2018-01-16 Thread Bob Kline

Bob Kline  added the comment:

Thanks for your responses to my comments. I'm working as hard as I can to get 
my customer's systems migrated into the Python 3 world, and I appreciate the 
efforts of the community to provide incentives (such as the resolution for this 
failure) for developers to upgrade. However, it's a delicate balancing act 
sometimes, given that we have critical places in our system for which the same 
code runs more than twice as slowly on Python 3.6 as on Python 2.7.

--

___
Python tracker 

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



[issue32565] Document the version of adding opcodes

2018-01-16 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)

2018-01-16 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



  1   2   >