[issue35380] Enable TCP_NODELAY for proactor event loop

2018-12-05 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset bfb881849f588cd2046776fb431c3045781c8214 by Andrew Svetlov in 
branch '3.6':
[3.6] bpo-35380: Enable TCP_NODELAY for proactor event loop (GH-10867). 
(GH-10874)
https://github.com/python/cpython/commit/bfb881849f588cd2046776fb431c3045781c8214


--

___
Python tracker 

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



[issue35380] Enable TCP_NODELAY for proactor event loop

2018-12-05 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue35415] fileno argument to socket.socket is not validated

2018-12-05 Thread Dima Tisnek


New submission from Dima Tisnek :

socket.socket gained a fileno= kwarg the value of which is not checked if 
address family and socket type are both provided.

For example, following is accepted:

>>> socket.socket(socket.AF_INET, socket.SOCK_STREAM, fileno=-1234)
>>> socket.socket(socket.AF_INET, socket.SOCK_STREAM, fileno=1234)
>>> socket.socket(socket.AF_INET, socket.SOCK_STREAM, fileno=0.999)

Resulting in a socket object that will fail at runtime.

One of the implications is that it's possible to "steal" file descriptor, i.e. 
create a socket for an fd that doesn't exist; then some other function/thread 
happens to create e.g. socket with this specific fd, which can be 
"unexpectedly" used (or closed or modified, e.g. non-blocking changed) through 
the first socket object.

Additionally if the shorthand is used, the exception raised in these cases has 
odd text, at least it was misleading for me.

>>> socket.socket(fileno=get_wrong_fd_from_somewhere())
[snip]
OSError: [Errno 9] Bad file descriptor: 'family'

I thought that I had a bug whereby a string was passed in instead of an int fd;
Ultimately I had to look in cpython source code to understand what the "family" 
meant.

I volunteer to submit a patch!

--
messages: 331096
nosy: Dima.Tisnek
priority: normal
severity: normal
status: open
title: fileno argument to socket.socket is not validated
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



[issue35415] fileno argument to socket.socket is not validated

2018-12-05 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue35416] Fix potential resource warnings in distutils

2018-12-05 Thread Mickaël Schoentgen

New submission from Mickaël Schoentgen :

I am looking to clean-up potential ResourceWarnings in distutils. The patch 
will provide 2 changes:
- ensure file descriptor are always closed when it is not the case
- and uniformization of the "with open(...)" use

--
components: Distutils
messages: 331097
nosy: Tiger-222, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: Fix potential resource warnings in distutils
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



[issue35416] Fix potential resource warnings in distutils

2018-12-05 Thread Mickaël Schoentgen

Change by Mickaël Schoentgen :


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

___
Python tracker 

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



[issue35413] test_multiprocessing_fork: test_del_pool() leaks dangling threads and processes on AMD64 FreeBSD CURRENT Shared 3.x

2018-12-05 Thread Kubilay Kocak


Change by Kubilay Kocak :


--
nosy: +koobs

___
Python tracker 

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



[issue35417] Double parenthesis in print function running 2to3 in already correct call

2018-12-05 Thread Jonathan Alush-Aben


New submission from Jonathan Alush-Aben :

If 2to3 is run on a file with the following contents:
a="string"
print ("%s" % a)

The output is:

a="string"
print (("%s" % a))

Although it was already a valid call to print in python3.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 331098
nosy: jondaa
priority: normal
severity: normal
status: open
title: Double parenthesis in print function running 2to3 in already correct call

___
Python tracker 

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



[issue35396] Add support for __fspath__ to fnmatch.fnmatchase and filter

2018-12-05 Thread Andrés Delfino

Andrés Delfino  added the comment:

Closing, as __fspath__ returns paths and fnmatchcase/filter deals with 
filenames.

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


STINNER Victor  added the comment:

According to seirl on IRC, this issue is trigged when a Python application is 
run by systemd using DynamicUser=yes:

"DynamicUser: Takes a boolean parameter. If set, a UNIX user and group pair is 
allocated dynamically when the unit is started, and released as soon as it is 
stopped. The user and group will not be added to /etc/passwd or /etc/group, but 
are managed transiently during runtime. (...)"

* https://www.freedesktop.org/software/systemd/man/systemd.exec.html
* http://0pointer.net/blog/dynamic-users-with-systemd.html

--

___
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

2018-12-05 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

AFAIK there is nothing you can do between after calling fork(2) to 
"reinitialise" the ObjC runtime. And I don't think that's the issue anyway: I 
suspect that the actual problem is that Apple's system frameworks use 
multithreading (in particular libdispatch) and don't have code to ensure a sane 
state after calling fork. 

In Python 3 there is another workaround to avoid problems using 
multiprocessing: use multiprocessing.set_start_method() to switch away from the 
"fork" startup handler to "spawn" or "forkserver" (the latter only when calling 
set_start_method before calling any code that might call into Apple system 
frameworks.

--

___
Python tracker 

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



[issue34784] Heap-allocated StructSequences

2018-12-05 Thread Petr Viktorin


Change by Petr Viktorin :


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



[issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS

2018-12-05 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This issue does not have enough information to determine what is wrong. It is 
however fairly clear that it is not related to "scutil --get HostName" 
mentioning that there is no hostname set as that is the normal state of 
systems, and I have never run into the problem mentioned here (and have used 
macOS exclusively from one of the earliest public beta's of macOS 10.0).

My gut feeling is that this is some issue with your system or environment.

Some more questions:

- Is this is a consistent problem, or only on some networks?
- Do you have any custom settings in the Networking preference pane related to 
name resolution (extra search domains, DNS servers, ...)?
- Do the domains returned by the DHCP server actually exist?
- Likewise for the DNS servers
- Does the result of socket.gethostname() look sane? In particular, does this 
include a domain name?
- The original message mentions: "and that the DHCP servers provides one ore 
more domains to be useles for resolution.". What is meant by that? AFAIK the 
DHCP server can only return 1 domain name, not a full DNS search list (or at 
least not one that is used by most major platforms).

--

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread Antoine Pietri


Antoine Pietri  added the comment:

Trivial way to reproduce, run this as root:

systemd-run -p DynamicUser=yes -t python3

--
nosy: +antoine.pietri

___
Python tracker 

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



[issue35417] Double parenthesis in print function running 2to3 in already correct call

2018-12-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report. Is this similar to issue10375 ? One option would be to 
use -p to stop transforming print related code if you don't want to transform 
any print statement.


$ cat /tmp/foo.py
print (1)

$ 2to3 /tmp/foo.py
[snip]
--- /tmp/foo.py (original)
+++ /tmp/foo.py (refactored)
@@ -1 +1 @@
-print (1)
+print((1))

$ 2to3 -p /tmp/foo.py
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: No files need to be modified.

--
nosy: +benjamin.peterson, xtreak

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10158

___
Python tracker 

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



[issue35418] python hung or stuck somtimes randomly on windows server 2008R2

2018-12-05 Thread Cao Hongfu


New submission from Cao Hongfu :

Recently, python frequently(but randomly) hung or stuck at initialization(when 
I click the python.exe or use python cmd prompt) on my server(running windows 
server 2008R2), But everything is fine on my windows 7 PC). I tried reinstall 
python, but not working(also tried 3.6).

I tried process-explorer and found that the normal python process allocated 
about 12MB memory but the stuck one only allocated 8MB memory.

here is the stack information for stuck python process(having 3 threads):
--thread1--
ntdll.dll!ZwWaitForSingleObject+0xa
ntdll.dll!RtlImageDirectoryEntryToData+0x118
ntdll.dll!RtlEnterCriticalSection+0xd1
ntdll.dll!EtwDeliverDataBlock+0x777
ntdll.dll!LdrLoadDll+0xed
!TlsGetValue+0x4756
!UuidCreate+0x1b00
!I_RpcBindingIsServerLocal+0x12899
!RegEnumKeyExW+0x13a
!RegEnumKeyExW+0xbe
!RpcBindingFree+0x320
!RpcAsyncRegisterInfo+0x10ff
!Ndr64AsyncClientCall+0x9da
!Ndr64AsyncClientCall+0xc9b
!NdrClientCall3+0xf5
!LsaOpenPolicy+0xb9
!LsaOpenPolicy+0x56
!LookupPrivilegeValueW+0x6f
!LookupPrivilegeValueA+0x84
!PyNamespace_New+0xd4
!PyCodec_LookupTextEncoding+0xb5
!PyObject_SetAttrId+0x21e
!PyMethodDef_RawFastCallDict+0x115
!PyObject_SetAttr+0x352
!PyEval_EvalFrameDefault+0x1182
!PyEval_EvalCodeWithName+0x1a0
!PyMethodDef_RawFastCallKeywords+0xc32
!PyEval_EvalFrameDefault+0x4b1
!PyMethodDef_RawFastCallKeywords+0xa77
!PyEval_EvalFrameDefault+0x913
!PyMethodDef_RawFastCallKeywords+0xa77
!PyEval_EvalFrameDefault+0x4b1
!PyMethodDef_RawFastCallKeywords+0xa77
!PyEval_EvalFrameDefault+0x4b1
!PyMethodDef_RawFastCallKeywords+0xa77
!PyEval_EvalFrameDefault+0x913
!PyMethodDef_RawFastCallKeywords+0xa77
!PyEval_EvalFrameDefault+0x4b1
!PyMethodDef_RawFastCallKeywords+0xa77
!PyEval_EvalFrameDefault+0x913
!PyFunction_FastCallDict+0xdd
!PyObject_CallMethod+0xef
!PyObject_CallMethod+0xa2
!PyObject_CallMethod+0x3c
!PyTime_MulDiv+0x47
!Py_InitializeMainInterpreter+0x95
!PyMainInterpreterConfig_Read+0x309
!PyMapping_SetItemString+0x306
!PyBytes_AsString+0x142
!Py_Main+0x52
!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x1d
--thread2--
ntdll.dll!ZwWaitForSingleObject+0xa
ntdll.dll!RtlImageDirectoryEntryToData+0x118
ntdll.dll!RtlEnterCriticalSection+0xd1
!UuidCreate+0x1ae2
!NdrFullPointerQueryPointer+0x35d
!LsaLookupGetDomainInfo+0xb8
!RpcBindingFree+0x320
!RpcAsyncRegisterInfo+0x10ff
!Ndr64AsyncClientCall+0x9da
!Ndr64AsyncClientCall+0xc9b
!NdrClientCall3+0xf5
!LsaLookupOpenLocalPolicy+0x41
!LookupAccountNameLocalW+0xaf
!LookupAccountSidLocalW+0x25
!LookupAccountSidW+0x57
!MBCGlobal::get_proc_user_name+0x1f7
!MBCGlobal::init+0x240a
!HDirSnap::operator=+0xda
!LVPVTBase::to_file+0x46ef
ntdll.dll!RtlDeactivateActivationContextUnsafeFast+0x34e
ntdll.dll!EtwDeliverDataBlock+0xa44
ntdll.dll!LdrLoadDll+0xed
!TlsGetValue+0x4756
!PublicService+0x13ec
!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x1d
--thread3--
ntdll.dll!ZwWaitForSingleObject+0xa
ntdll.dll!RtlImageDirectoryEntryToData+0x118
ntdll.dll!RtlEnterCriticalSection+0xd1
ntdll.dll!LdrQueryModuleServiceTags+0x13f
ntdll.dll!CsrIdentifyAlertableThread+0x9d
ntdll.dll!EtwSendNotification+0x16d
ntdll.dll!RtlQueryProcessDebugInformation+0x371
ntdll.dll!EtwDeliverDataBlock+0xf00
!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x1d


here is the stack info for normal python process(have 2 threads)
--thread1--
ntdll.dll!ZwRequestWaitReplyPort+0xa
kernel32.dll!GetConsoleMode+0xf8
kernel32.dll!VerifyConsoleIoHandle+0x281
kernel32.dll!ReadConsoleW+0xbc
python37.dll!PyOS_Readline+0x4f4
python37.dll!PyOS_Readline+0x333
python37.dll!PyOS_Readline+0xfa
python37.dll!PyErr_NoMemory+0xc228
python37.dll!PyUnicode_AsUnicode+0x553
python37.dll!PyUnicode_AsUnicode+0x9c
python37.dll!PyParser_ParseFileObject+0x86
python37.dll!PyParser_ASTFromFileObject+0x82
python37.dll!PyRun_InteractiveOneObject+0x24a
python37.dll!PyRun_InteractiveLoopFlags+0xf6
python37.dll!PyRun_AnyFileExFlags+0x45
python37.dll!Py_UnixMain+0x50b
python37.dll!Py_UnixMain+0x5b3
python37.dll!PyErr_NoMemory+0x195a4
python37.dll!PyBytes_AsString+0x14f
python37.dll!Py_Main+0x52
python.exe+0x1258
kernel32.dll!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x1d
--thread2--
ntdll.dll!NtWaitForMultipleObjects+0xa
ntdll.dll!RtlIsCriticalSectionLockedByThread+0xd4d
kernel32.dll!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x1d


One of my friend say that this may be issues with
https://support.microsoft.com/en-us/help/2545627/a-multithreaded-application-might-crash-in-windows-7-or-in-windows-ser

Thx.

--
components: Windows
messages: 331105
nosy: Cao Hongfu, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: python hung or stuck somtimes randomly on windows server 2008R2
type: crash
versions: Python 3.7

___
Python tracker 

[issue35419] Thread.is_alive while running Process.is_alive causes either premature termination or never-terminating.

2018-12-05 Thread Stan


New submission from Stan :

Checking if thread.is_alive() while thread is checking on Process.is_alive() 
seemingly causes undefined behavior. 

The attached POC is expected to print "ThreadN.data == 1999" for N in range(0, 
20) with some repeats. However the integers are spread all over the place. 
Moreover sometimes one or more of the threads never terminate resulting in 
technically infinite amount of "ThreadN.data == ###" prints. 

In python2.7.15 I never observed a thread lock (only early terminations), but 
in python3.4.8 I did.

You may have to adjust max_count variable to have higher success rate of thread 
locking. I got about 40% chance of `python3 bug_test.py` never finishing on an 
Intel(R) Core(TM) i7-4610M CPU @ 3.00GHz

--
files: bug_test.py
messages: 331106
nosy: Hexorg
priority: normal
severity: normal
status: open
title: Thread.is_alive while running Process.is_alive causes either premature 
termination or never-terminating.
type: behavior
versions: Python 2.7, Python 3.4
Added file: https://bugs.python.org/file47975/bug_test.py

___
Python tracker 

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



[issue35416] Fix potential resource warnings in distutils

2018-12-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

There is a similar open issue issue22831 with patches for distutils and Tools.

--
nosy: +serhiy.storchaka, xtreak

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


STINNER Victor  added the comment:

I wrote PR #10919 which fix posix.expandpath() and also fix indirectly the site 
module.

@Antoine Pietri: Would you mind to try the fix?

--

___
Python tracker 

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



[issue35389] Use gnu_get_libc_version() in platform.libc_ver()?

2018-12-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 476b113ed8531b9fbb0bd023a05eb3af21996600 by Victor Stinner in 
branch 'master':
bpo-35389: platform.libc_ver() uses os.confstr() (GH-10891)
https://github.com/python/cpython/commit/476b113ed8531b9fbb0bd023a05eb3af21996600


--

___
Python tracker 

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



[issue35416] Fix potential resource warnings in distutils

2018-12-05 Thread Mickaël Schoentgen

Mickaël Schoentgen  added the comment:

I saw it but it is quite old and targetting 3.5. I opended this issue to target 
only distutils, easier to eventually backport than a big patch on a lot of 
files.

--

___
Python tracker 

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



[issue35408] Python3.7 crash in PyCFunction_New due to broken _PyObject_GC_TRACK

2018-12-05 Thread Enric Tejedor Saavedra


Enric Tejedor Saavedra  added the comment:

Hi Victor,

Thank you for clarifying.

If the call to PyCFunction_New is done from a C extension module, is it also 
necessary to call Py_Initialize()?

--

___
Python tracker 

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



[issue35387] Dialogs on IDLE are accompanied by a small black window

2018-12-05 Thread Tal Einat


Tal Einat  added the comment:

Vlad, perhaps you could take a look at this?

Note that Tcl/Tk 8.6.9 has recently been released (Nov 16th, 2018), which 
addresses several other issues pertaining to macOS Mojave.  Can someone check 
this on Mojave with Tk 8.6.9?

--
nosy: +vtudorache

___
Python tracker 

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



[issue35389] Use gnu_get_libc_version() in platform.libc_ver()?

2018-12-05 Thread STINNER Victor


Change by STINNER Victor :


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



[issue35408] Python3.7 crash in PyCFunction_New due to broken _PyObject_GC_TRACK

2018-12-05 Thread STINNER Victor


STINNER Victor  added the comment:

> If the call to PyCFunction_New is done from a C extension module, is it also 
> necessary to call Py_Initialize()?

Py_Initialize() must always be called first.

--

___
Python tracker 

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



[issue35416] Fix potential resource warnings in distutils

2018-12-05 Thread Éric Araujo

Éric Araujo  added the comment:

I think the places that already use try/finally: close are correct.

We try to minimize churn in distutils; changing to with is nice but does not 
fix errors or warning in these cases.

The changes for the few spots that don’t use finally: close are welcome though!

--

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

If I understood PR 10919 correctly, sysconfig.get_config_var('userbase') can 
now return unexpanded paths containing '~'. Is it intended despite the previous 
discussion starting with msg135047?

--
nosy: +izbyshev

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-12-05 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-26544: Make platform.libc_ver() less slow (GH-10868)
> https://github.com/python/cpython/commit/8687bd86e6f138ef0699a1e9f3f9555765949b51

"Coarse benchmark on Fedora 29: 1.6 sec => 0.1 sec."

Oops, my benchmark in the commit message was wrong, it included the startup 
time. Correct benchmark says 44x faster, it's way better!

Python 2.7: [old_py2] 1.51 sec +- 0.03 sec -> [if_in] 34.6 ms +- 0.4 ms: 43.61x 
faster (-98%)

--

___
Python tracker 

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



[issue35389] Use gnu_get_libc_version() in platform.libc_ver()?

2018-12-05 Thread STINNER Victor


STINNER Victor  added the comment:

> Quick benchmark on Fedora 29:
> python3 -m perf command ./python -S -c 'import platform; platform.libc_ver()'
> 94.9 ms +- 4.3 ms -> 33.2 ms +- 1.4 ms: 2.86x faster (-65%)

Oops, my benchmark in the commit message was wrong, it includes the startup 
time...

Correct benchmark says 44,538x faster, it's *WAY* better!

[regex] 56.1 ms +- 1.9 ms -> [confstr] 1.26 us +- 0.04 us: 44537.88x faster 
(-100%)

--

___
Python tracker 

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



[issue35416] Fix potential resource warnings in distutils

2018-12-05 Thread Mickaël Schoentgen

Mickaël Schoentgen  added the comment:

OK then I updated the PR to only update code that would really leak resources.

--

___
Python tracker 

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



[issue35257] Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C extensions.

2018-12-05 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


Added file: https://bugs.python.org/file47977/setup.py

___
Python tracker 

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



[issue35257] Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C extensions.

2018-12-05 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

So to better illustrate the actual issue I'll be using an example from the 
python documentation [0][1].

Get the demo.c and the setup.py. Compile cpython first with --with-lto and then 
compile the demo.c with ./python3 setup.py build.

You will notice that various link time optimization linker flags are passed to 
the extension.

[0] 
https://docs.python.org/3/extending/extending.html#keyword-parameters-for-extension-functions
[1] 
https://docs.python.org/3/extending/building.html#building-c-and-c-extensions-with-distutils

--
Added file: https://bugs.python.org/file47976/demo.c

___
Python tracker 

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



[issue32787] Better error handling in ctypes

2018-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 398bd27967690f2c1a8cbf8d47a5613edd9cfb2a by Serhiy Storchaka in 
branch 'master':
bpo-32787: Better error handling in ctypes. (#3727)
https://github.com/python/cpython/commit/398bd27967690f2c1a8cbf8d47a5613edd9cfb2a


--

___
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-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 398bd27967690f2c1a8cbf8d47a5613edd9cfb2a by Serhiy Storchaka in 
branch 'master':
bpo-32787: Better error handling in ctypes. (#3727)
https://github.com/python/cpython/commit/398bd27967690f2c1a8cbf8d47a5613edd9cfb2a


--

___
Python tracker 

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



[issue35257] Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C extensions.

2018-12-05 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

And here is the difference between compiling the extension with the current 
tip, comparing to applying my current draft PR:

Master branch with the linker flags propagated:

running build
running build_ext
building 'demo' extension
creating build
creating build/temp.linux-x86_64-3.8
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall 
-fPIC -I/home/Harris/dev/cpython/_install/include/python3.8m -c demo.c -o 
build/temp.linux-x86_64-3.8/demo.o
creating build/lib.linux-x86_64-3.8
gcc -pthread -shared -flto -fuse-linker-plugin -ffat-lto-objects 
-flto-partition=none -g build/temp.linux-x86_64-3.8/demo.o -o 
build/lib.linux-x86_64-3.8/demo.cpython-38m-x86_64-linux-gnu.so


With introduction of the LDFLAGS_NODIST variable:

running build
running build_ext
building 'demo' extension
creating build
creating build/temp.linux-x86_64-3.8
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall 
-fPIC -I/home/Harris/dev/cpython/_install/include/python3.8m -c demo.c -o 
build/temp.linux-x86_64-3.8/demo.o
creating build/lib.linux-x86_64-3.8
gcc -pthread -shared build/temp.linux-x86_64-3.8/demo.o -o 
build/lib.linux-x86_64-3.8/demo.cpython-38m-x86_64-linux-gnu.so

--

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


STINNER Victor  added the comment:

> If I understood PR 10919 correctly, sysconfig.get_config_var('userbase') can 
> now return unexpanded paths containing '~'. Is it intended despite the 
> previous discussion starting with msg135047?

With my PR 10919, "python3 setup.py install" and  "python3 setup.py install 
--user" still fail with:

Traceback (most recent call last):
  File "setup.py", line 79, in 
main()
  File "setup.py", line 75, in main
setup(**options)
  File "/tmp/cpython/Lib/distutils/core.py", line 121, in setup
dist.parse_config_files()
  File "/tmp/cpython/Lib/distutils/dist.py", line 397, in parse_config_files
filenames = self.find_config_files()
  File "/tmp/cpython/Lib/distutils/dist.py", line 349, in find_config_files
check_environ()
  File "/tmp/cpython/Lib/distutils/util.py", line 161, in check_environ
os.environ['HOME'] = pwd.getpwuid(os.getuid())[5]
KeyError: 'getpwuid(): uid not found: 12345'

I suggest to open a new issue if you want to enhance the error message and/or 
handle getpwuid() failure in find_config_files().

I prefer to stick to the initial bug report which hasn't been fixed in 8 years:

> When Python cannot find the home directory of the user invoking it, it prints 
> "'import site' failed; use -v for traceback".

IMHO PR 10919 fix is straighforward, it respects the contract (documentation) 
of posixpath.expanduser() ("If user or $HOME is unknown, do nothing."), and 
expanduser() already handles KeyError on getpwnam() (since the function has 
been created in 1992 by Guido van Rossum! commit 
7ac4878773040158038031a85be122d9e7071afe).

--

___
Python tracker 

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



[issue35257] Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C extensions.

2018-12-05 Thread Miro Hrončok

Change by Miro Hrončok :


--
nosy: +hroncok

___
Python tracker 

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



[issue35389] Use gnu_get_libc_version() in platform.libc_ver()?

2018-12-05 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Nice. I never liked the "parse the executable approach", but there wasn't 
anything better available at the time.

--
nosy: +lemburg

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread Antoine Pietri


Antoine Pietri  added the comment:

Would it make sense to backport this fix in 3.6 and 3.7? As distros 
increasingly move in the direction of using DynamicUser=yes for most stateless 
services, it would really help to have that, for instance in Debian Buster 
(which will probably be on 3.7 if my understanding is correct).

FYI the cutoff date for the release candidate of 3.6.8 is 2018-12-07 (in two 
days).

--

___
Python tracker 

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



[issue35389] Use gnu_get_libc_version() in platform.libc_ver()?

2018-12-05 Thread STINNER Victor


STINNER Victor  added the comment:

> Nice. I never liked the "parse the executable approach", but there wasn't 
> anything better available at the time.

Aha. Well, it's not perfect but it works and was fast enough (since libc_ver() 
is never used in performance critical code) :-)

I'm now curious and looked at the history of this feature.

"man confstr" says:

> _CS_GNU_LIBC_VERSION (GNU C library only; since glibc 2.3.2)

glibc 2.3.2 has been released in March 2003, so it's fine, we should get this 
constant in most "modern" Linux (using glibc) in 2018 :-)

man gnu_get_libc_version says:

> These functions first appeared in glibc in version 2.1.

glibc 2.1 has been released in Feb 1999. Using this function might provide even 
better compatibility but I'm not sure that it's worth it to use it. As I wrote, 
I prefer to not write a new function C, if os.confstr() can already be used in 
pure Python!

Sadly, these functions (confstr(_CS_GNU_LIBC_VERSION) / gnu_get_libc_version()) 
are specific to glibc. Sorry, I'm not interested to support other libc, I 
mostly care about Fedora, sorry :-)

--

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

> I prefer to stick to the initial bug report which hasn't been fixed in 8 years

I'm interested in fixing this bug too since it bit me in SCons and I had to use 
a local patch for it. I welcome the upstream fix and don't object to PR 10919. 
I'm not personally affected by unexpanded paths in sysconfig (at least not in a 
way I know of), so I just want to make sure that all effects of the PR are 
considered, given the previous discussions. Thanks, Victor!

--

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


STINNER Victor  added the comment:

Yes, I plan to try to backport the fix to stable branches.

--

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

> Would it make sense to backport this fix in 3.6 and 3.7?

I'd like to see it there, given that this bug surfaced in many use cases not 
involving any modern features or systemd at all.

--

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10159

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10159, 10160

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PR 10921 is based on fd_leaks_distutils.patch.

--
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +dstufft, eric.araujo

___
Python tracker 

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



[issue28015] configure --with-lto builds fail when CC=clang on Linux, requires gold linker

2018-12-05 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


--
pull_requests: +10161, 10162

___
Python tracker 

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



[issue28015] configure --with-lto builds fail when CC=clang on Linux, requires gold linker

2018-12-05 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


--
pull_requests: +10161, 10162, 10163

___
Python tracker 

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



[issue28015] configure --with-lto builds fail when CC=clang on Linux, requires gold linker

2018-12-05 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


--
pull_requests: +10161

___
Python tracker 

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



[issue35412] test_future4 ran no test

2018-12-05 Thread STINNER Victor


STINNER Victor  added the comment:

There are a few more on Windows:

4 tests run no tests:
test_dtrace test_future4 test_multiprocessing_fork
test_multiprocessing_forkserver

test_multiprocessing_fork and test_multiprocessing_forkserver should raise 
SkipTest on Windows.

--

___
Python tracker 

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



[issue35418] python hung or stuck somtimes randomly on windows server 2008R2

2018-12-05 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

You might try to check the list of DLLs loaded into the stuck python process 
and find third-party ones (e.g., antivirus). If there are any, disable the 
third-party software and try again.

--
nosy: +izbyshev

___
Python tracker 

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



[issue32787] Better error handling in ctypes

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f2f4555d8287ad217a1dba7bbd93103ad4daf3a8 by Victor Stinner in 
branch 'master':
bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919)
https://github.com/python/cpython/commit/f2f4555d8287ad217a1dba7bbd93103ad4daf3a8


--

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10164

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10164, 10165

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10164, 10165, 10166

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10167

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10167, 10168

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10169

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10169, 10170

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10175, 10176, 10177

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10172, 10174

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10169, 10170, 10171

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10173, 10175

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10171, 10172, 10173, 10174

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10171, 10172

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10175, 10176

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10177, 10178

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10177, 10178, 10179

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -10160

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread miss-islington


miss-islington  added the comment:


New changeset 983d1ab0e6f4280f954bcba87db76e11131f1c33 by Miss Islington (bot) 
in branch '3.7':
bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919)
https://github.com/python/cpython/commit/983d1ab0e6f4280f954bcba87db76e11131f1c33


--
nosy: +miss-islington

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10177, 10178, 10179, 10180

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PR 10926 is based on fd_leaks_tools1_2.patch.
PR 10927 is based on fd_leaks_tools2_2.patch.
PR 10928 is based on fd_leaks_tests1_2.patch.
PR 10929 is based on fd_leaks_tests2_2.patch.

Some of changes in these patches were already applied in other issues.

--

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 31b635dbf0c7108f18bb3ce382b895374cff77fb by Victor Stinner in 
branch '3.6':
bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919) 
(GH-10925)
https://github.com/python/cpython/commit/31b635dbf0c7108f18bb3ce382b895374cff77fb


--

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10181

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10181, 10182

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10183
versions: +Python 3.7, Python 3.8 -Python 3.5

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10181, 10182, 10183

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10184, 10185

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10184

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10184, 10185, 10186

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -10170, 10171

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -10170

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -10170, 10171, 10174

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -10171, 10173, 10174, 10176, 10180

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -10171, 10173, 10174, 10180

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -10171, 10173, 10174, 10176, 10177, 10179, 10180

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -10170, 10171, 10173, 10174

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -10171, 10173, 10174, 10176, 10177, 10180

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

self.addCleanup(f.close) can not be used if the same file should be opened 
several times in the test. It can not be used also if the file is deleted in 
the test or in tearDown().

--

___
Python tracker 

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



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 5b25f1d03100e2283c1b129d461ba68ac0169a14 by Serhiy Storchaka 
(Sergey Fedoseev) in branch 'master':
bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. 
(GH-8113)
https://github.com/python/cpython/commit/5b25f1d03100e2283c1b129d461ba68ac0169a14


--

___
Python tracker 

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



[issue34987] A possible null pointer dereference in _pickle.c's save_reduce()

2018-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 25d389789c59a52a31770f7c50ce9e02a8909190 by Serhiy Storchaka 
(Zackery Spytz) in branch 'master':
bpo-34987: Fix a possible null pointer dereference in _pickle.c's 
save_reduce(). (GH-9886)
https://github.com/python/cpython/commit/25d389789c59a52a31770f7c50ce9e02a8909190


--

___
Python tracker 

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



[issue34987] A possible null pointer dereference in _pickle.c's save_reduce()

2018-12-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10187

___
Python tracker 

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



[issue34987] A possible null pointer dereference in _pickle.c's save_reduce()

2018-12-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10188

___
Python tracker 

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



[issue34738] Distutils: ZIP files don't include directory entries

2018-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The inconsistency is not just with the tarfile module, but with other method of 
creating ZIP archives.

The unix unzip command creates directories if needed, but I am not sure about 
other third-party utilities. Since all know ZIP creators creates entries for 
directories, I would not be surprised if there are ZIP readers that doesn't 
work without explicit entries for directories. Zipimport is an example of this.

Matthew mentioned other case. Empty directories currently are added to the TAR 
archive, but are omitted in the ZIP archive (unless you use an external zip 
tool). TAR archives are common on Unix, ZIP archives are common on Windows, and 
we can get different source distributions for Unix and Windows. You need to add 
a fake empty file to be sure that the directory will be added in the 
distribution. Some old DOS archives needed this trick, but the ZIP format 
supports empty directories.

The downside of adding entries for directories is that this increases the size 
of the archive. But the difference is pretty small.

--

___
Python tracker 

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



[issue34604] Possible mojibake in pwd.getpwnam and grp.getgrnam

2018-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 34c7f0c04e2b4e715b2c3df1875af8939fbe7d0b by Serhiy Storchaka 
(William Grzybowski) in branch 'master':
bpo-34604: Use %R because of invisible characters or trailing whitespaces. 
(GH-9165)
https://github.com/python/cpython/commit/34c7f0c04e2b4e715b2c3df1875af8939fbe7d0b


--

___
Python tracker 

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



[issue35420] how to migrate a c-extension module to one that supports subinerpreters?

2018-12-05 Thread mattip


New submission from mattip :

NumPy does not currently support subinterpreters, it has global state that is 
not cleaned up when releasing the module. I could not find a description of the 
steps I need to take to modernize the C-extension module to be able to used 
under a subinterpreter. It would be nice to describe this in the Python 
documentation, or does such documentation exist?

--
assignee: docs@python
components: Documentation
messages: 331142
nosy: docs@python, eric.snow, mattip
priority: normal
severity: normal
status: open
title: how to migrate a c-extension module to one that supports subinerpreters?
type: enhancement

___
Python tracker 

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



[issue31715] Add mimetype for extension .mjs

2018-12-05 Thread Myles Borins


Myles Borins  added the comment:

I see that when this landed it appears that it was removed from landing on 
"Python 2.7, Python 3.6, Python 3.7".

Is there any chance to revisit this decision? I dug into the mimetype code and 
it doesn't appear that there is a way to rely on operating system mimetypes for 
systems aside from Windows... as such this is going to be a fairly large 
experience gap for people developing front-end applications that utilize the 
file extension on any version other than 3.8, which will likely take quite a 
while to be distributed as a default in various OS distributions.

--
nosy: +mylesborins

___
Python tracker 

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



  1   2   3   >