[issue34450] improve shutil.make_archive

2018-08-22 Thread iMath


iMath  added the comment:

one workaround is :
if os.path.join(root_dir, base_dir) exists, use the current implementation , 
this is set for backwards-compatibility, if not exist, please consider the 
feature in my last post(maybe we should recommend Python  users to follow this 
approach in the doc).

--

___
Python tracker 

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



[issue34459] email.contentmanager should use IANA encoding

2018-08-22 Thread era


New submission from era :

https://github.com/python/cpython/blob/3.7/Lib/email/contentmanager.py#L64 
currently contains the following code:

def get_text_content(msg, errors='replace'):
content = msg.get_payload(decode=True)
charset = msg.get_param('charset', 'ASCII')
return content.decode(charset, errors=errors)

This breaks when the IANA character set is not identical to the Python encoding 
name. For example, pass it a message with

Content-type: text/plain; charset=cp-850

This breaks for two separate reasons (and I will report two separate bugs); the 
IANA character-set label should be looked up and converted to a Python codec 
name (that's this bug) and the character-set alias 'cp-850' is not defined in 
the lookup table in the place.

There are probably other places in contentmanager.py where a similar mapping 
should take place. 

I do not have a proper patch, but in general outline, the fix would look like

+import email.charset
+
 def get_text_content(msg, errors='replace'):
content = msg.get_payload(decode=True)
charset = msg.get_param('charset', 'ASCII')
-   return content.decode(charset, errors=errors)
+   encoding = Charset(charset).output_charset()
+   return content.decode(encoding, errors=errors)

This was discovered in this Stack Overflow post: 
https://stackoverflow.com/a/51961225/874188

--
components: email
messages: 323869
nosy: barry, era, r.david.murray
priority: normal
severity: normal
status: open
title: email.contentmanager should use IANA encoding
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



[issue34460] email.charset: common IANA labels missing

2018-08-22 Thread era


New submission from era :

The email.charset module should contain common informal character-set 
identifiers even if they are not formally specified in a IANA RFC.

>From a quick grep of a pile of recent email, I find the following:

   46 "cp-850"
6 "windows-874"

For scale, the same collection contained around 10,000 messages with "utf-8" 
and 2,000 with "iso-8859-1".  Still, the fact that there are multiple 
occurrences in a spool of recent messages indicates that they are fairly common.

Currently, the email module throws a traceback if you attempt to parse a 
message whose character set is not known to Python. This is not possible to 
prevent in the general case, but making it more robust with encodings which are 
reasonably prevalent in the wild would definitely be desirable.  

For what it's worth, "cp-850" is apparently an alias for IBM code page 850 
which is defined with the name "cp850" in RFC1345.  "windows-874" is an 
official designation which is detailed in 
https://www.iana.org/assignments/charset-reg/windows-874 which is apparently 
equivalent to the Python codec "cp784".

--
components: email
messages: 323870
nosy: barry, era, r.david.murray
priority: normal
severity: normal
status: open
title: email.charset: common IANA labels missing
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



[issue34459] email.contentmanager should use IANA encoding

2018-08-22 Thread era


era  added the comment:

https://bugs.python.org/issue34460 now requests the addition of "cp-850" and 
"windows-784" as charset aliases in the email.charset module.

--

___
Python tracker 

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



[issue5999] compile error on HP-UX 11.22 ia64 - 'mbstate_t' is used as a type, but has not been defined as a type

2018-08-22 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue34461] Availability of parsers in etree initializer

2018-08-22 Thread nilanjan roy


New submission from nilanjan roy :

As xml package make the availability of separate global name-space by *__all__* 
so considerably *etree* should have included of all the parser files in its 
initialize(i.e. in *__init__.py*). 

So if any script consider as "from xml import *" then *etree* should have 
accessibility on all of it's parser files i.e. etree should access like 
*etree.ElementTree* which is not working as expected currently. Currently it's 
enforced to use as normal behavior as "import xml.etree.ElementTree"

--
components: XML
messages: 323872
nosy: nilanjan roy
priority: normal
severity: normal
status: open
title: Availability of parsers in etree initializer
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



[issue34457] Missing NULL check in alias_for_import_name() from Python/ast.c

2018-08-22 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


--
pull_requests: +8329

___
Python tracker 

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



[issue34393] json.dumps - allow compression

2018-08-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm not asking to be difficult, I'm asking because a full specification would 
be required in order to implement this.

For example, you're excluding the "compresslevel" parameter, so presumably 
you'd want the default of 9, which is the slowest option. I'm not sure this is 
a good idea. Shouldn't the caller be able to specify this? If not, why not?

In any event, I think the best thing to do is to let the caller use any 
compression they want, and allow them full control over the compression 
parameters.

Unless, of course, there's any documented standard for json compression (even a 
de facto standard would be interesting to know about).

--

___
Python tracker 

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



[issue34457] Missing NULL check in alias_for_import_name() from Python/ast.c

2018-08-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 5223ce2131a121201a78d0680302ea06c4a58369 by Serhiy Storchaka 
(Alexey Izbyshev) in branch '2.7':
[2.7] bpo-34457: Python/ast.c: Add missing NULL check to 
alias_for_import_name(). (GH-8852) (GH-8858)
https://github.com/python/cpython/commit/5223ce2131a121201a78d0680302ea06c4a58369


--

___
Python tracker 

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



[issue34457] Missing NULL check in alias_for_import_name() from Python/ast.c

2018-08-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue34461] Availability of parsers in etree initializer

2018-08-22 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure

2018-08-22 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +8331

___
Python tracker 

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



[issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure

2018-08-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I agree, that raising UnicodeEncodeError instead of ValueError is acceptable, 
since the former is a subclass of the latter. But since the default 
implementation raises more specialized subclass, it is probably that the user 
code will catch more narrow exception type. Seems, it is not hard to make the 
same exception be raised in all cases. For example, in date_fromisoformat():

if (!dt_ptr || len != 10
|| parse_isoformat_date(dt_ptr, &year, &month, &day) < 0)
{
PyErr_Format(PyExc_ValueError, "Invalid isoformat string: %R", dstr);
return NULL;
}

--

___
Python tracker 

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



[issue34456] pickle: Missing NULL check in save_global()

2018-08-22 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


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



[issue34456] pickle: Missing NULL check in save_global()

2018-08-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Is 2.7 affected?

--

___
Python tracker 

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



[issue34461] Availability of parsers in etree initializer

2018-08-22 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
nosy: +eli.bendersky, scoder

___
Python tracker 

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



[issue34456] pickle: Missing NULL check in save_global()

2018-08-22 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

No, I couldn't find any similar calls in save_global() in 2.7.

However, there is Py_BuildValue() call in initcPickle(), and its result is 
passed unchecked to PyDict_SetItemString(), where it's eventually dereferenced. 
In fact, all PyDict_SetItemString() calls in initcPickle() are made without 
checking for NULL. Should I file an issue for that?

--

___
Python tracker 

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



[issue31436] test_socket.SendfileUsingSendfileTest.testWithTimeoutTriggeredSend fails due to sendfile completing before timeout

2018-08-22 Thread Łukasz Langa

Change by Łukasz Langa :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue31436] test_socket.SendfileUsingSendfileTest.testWithTimeoutTriggeredSend fails due to sendfile completing before timeout

2018-08-22 Thread Łukasz Langa

Łukasz Langa  added the comment:

I'm having the same issue on my devserver at work. I think we need to 
re-evaluate how those timeouts are working. This is flaky testing.

--
nosy: +lukasz.langa
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue34455] Tkinter crashing when pressing Command + ^ (OSX)

2018-08-22 Thread iPodClassic

iPodClassic  added the comment:

Noted the issue with the email replies, sorry!

Do you want me to place the file in any folder in particular? Remember I’m a 
noob at this.  I placed it in the Python app folder, ran the script, played 
around with IDLE and I can still crash it using command + ^ .  Maybe it’s not a 
bug after all and a problem with OSX?

--

___
Python tracker 

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



[issue34207] test_cmd_line test_utf8_mode test_warnings fail in all FreeBSD 3.x (3.8) buildbots

2018-08-22 Thread Nick Coghlan


Nick Coghlan  added the comment:

Nothing has changed recently in the PEP 538 implementation itself, and both 
those builders were green last month:

* https://buildbot.python.org/all/#/builders/60/builds/181
* https://buildbot.python.org/all/#/builders/79/builds/185

The first failing debug build was 
https://buildbot.python.org/all/#/builders/60/builds/182 which rearranged some 
parts of the startup sequence: 
https://github.com/python/cpython/commit/d19d8d5279f156bc8f6736b5f16f069879b9519b

Similarly, the 3.7 builds started failing in 
https://buildbot.python.org/all/#/builders/124/builds/489, which made 
Py_Initialize work more closely to the way it worked in Python 3.6: 
https://github.com/python/cpython/commit/0c90d6f75931da4fec84d06c2efe9dd94bb96b77

So given the output reported in the current build failures, my guess would be 
that something has gotten out of sequence in the code that has to handle 
re-encoding and decoding command line values and environment variables that 
have initially been decoded incorrectly (i.e. as surrogate escaped ASCII).

--
nosy: +vstinner

___
Python tracker 

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



[issue33187] Document ElementInclude (XInclude) support in ElementTree

2018-08-22 Thread Anjali Bansal


Change by Anjali Bansal :


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



[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

2018-08-22 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Carlo: The point of Xiang's post is that this is only tangentially related to 
multiprocessing; the real problem is that tee-ing an iterator implemented in 
Python (of which pool.imap_unordered is just one example) and using the 
resulting tee-ed iterators in multiple threads (which pool.imap_unordered does 
implicitly, as there is a thread involved in dispatching work).

The problem is *exposed* by multiprocessing.pool.imap_unordered, but it 
entirely a problem with itertools.tee, and as Xiang's repro indicates, it can 
be triggered easily without the complexity of multiprocessing being involved.

I've updated the bug title to reflect this.

--
components: +Library (Lib)
nosy: +josh.r
title: Segfault/TimeoutError: itertools.tee of 
multiprocessing.pool.imap_unordered -> itertools.tee not thread-safe; can 
segfault interpreter when wrapped iterator releases GIL
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



[issue33187] Document ElementInclude (XInclude) support in ElementTree

2018-08-22 Thread Anjali Bansal


Anjali Bansal  added the comment:

Hello, 

I had created the PR for this issue. Please review and let me know if any 
modification required.

GitHub PR: https://github.com/python/cpython/pull/8861

bpo-33187: Fix document ElementInclude (XInclude) support in ElementTree issue.

--

___
Python tracker 

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



[issue34455] Tkinter crashing when pressing Command + ^ (OSX)

2018-08-22 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

FWIW I can reproduce the problem with IDLE and tk_scroll.py:

1) Add a spanish keyboard layout in System Preferences (my normal layout is US 
International, matching the text on the keyboard)

2) Select this keyboard using the keyboard menu item

3) Type CMD-^ by pressing "CMD+SHIFT+[" (that is, at the same time press the 
keys CMD, SHIFT and the key where [ is on the keycap). 

With tk_scroll.py the following output is shown in the terminal:

2018-08-22 16:12:22.231 Python[51578:13988425] -[TKMenu submenuAction:]: 
unrecognized selector sent to instance 0x7fe078f56270
2018-08-22 16:12:22.315 Python[51578:13988425] *** Terminating app due to 
uncaught exception 'NSInvalidArgumentException', reason: '-[TKMenu 
submenuAction:]: unrecognized selector sent to instance 0x7fe078f56270'
*** First throw call stack:
(
0   CoreFoundation  0x7fff30e8a2db 
__exceptionPreprocess + 171
1   libobjc.A.dylib 0x7fff58034c76 
objc_exception_throw + 48
2   CoreFoundation  0x7fff30f22db4 
-[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3   CoreFoundation  0x7fff30e00820 
___forwarding___ + 1456
4   CoreFoundation  0x7fff30e001e8 
_CF_forwarding_prep_0 + 120
5   AppKit  0x7fff2eb37a43 
-[NSApplication(NSResponder) sendAction:to:from:] + 312
6   AppKit  0x7fff2e82c1bb 
-[NSCarbonMenuImpl performMenuAction:withTarget:] + 155
7   AppKit  0x7fff2e5cb232 -[NSMenu 
_performKeyEquivalentWithDelegate:] + 361
8   AppKit  0x7fff2e5cacd8 -[NSMenu 
performKeyEquivalent:] + 68
9   AppKit  0x7fff2eb366a9 
routeKeyEquivalent + 884
10  AppKit  0x7fff2eb33ce0 
-[NSApplication(NSEvent) sendEvent:] + 1096
11  libtk8.6.dylib  0x000108e7f3ee 
-[TKApplication(TKNotify) sendEvent:] + 39
12  libtk8.6.dylib  0x000108e7f787 
TkMacOSXEventsCheckProc + 434
13  libtcl8.6.dylib 0x000108d16d06 
Tcl_DoOneEvent + 316
14  _tkinter.cpython-37m-darwin.so  0x000108c4701d 
_tkinter_tkapp_mainloop + 269
15  Python  0x00010865884e 
_PyMethodDef_RawFastCallKeywords + 430
16  Python  0x00010865e462 
_PyMethodDescr_FastCallKeywords + 82
17  Python  0x0001087175e0 
call_function + 832
18  Python  0x000108714546 
_PyEval_EvalFrameDefault + 25126
19  Python  0x000108718096 
_PyEval_EvalCodeWithName + 2422
20  Python  0x000108657d81 
_PyFunction_FastCallKeywords + 257
21  Python  0x0001087175bb 
call_function + 795
22  Python  0x000108714560 
_PyEval_EvalFrameDefault + 25152
23  Python  0x000108718096 
_PyEval_EvalCodeWithName + 2422
24  Python  0x00010870e244 
PyEval_EvalCode + 100
25  Python  0x00010874b041 
PyRun_FileExFlags + 209
26  Python  0x00010874a8eb 
PyRun_SimpleFileExFlags + 859
27  Python  0x00010876893c pymain_main 
+ 8044
28  Python  0x000108768da1 _Py_UnixMain 
+ 129
29  libdyld.dylib   0x7fff58c4e015 start + 1
30  ??? 0x0002 0x0 + 2
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

I haven't (and won't) further investigated this problem, but at least this 
should help reproduce the problem.  Its likely a Tk problem, but maybe it is 
possible to tweak IDLE or Tkinter to avoid a crash. 

P.S. The crash does not happen with a US keyboard layout. 

P.P.S. SHIFT+[ appears to be how you enter "^" on a spanish keyboard.

--

___
Python tracker 

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



[issue34425] :s formatting broken for objects without __format__

2018-08-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

About translating ":s" to "":

> The library seems
willing to do this for the empty format string, but not when the client
code specifically asks for a string

You're not asking for a string when you specify ":s". You're asking the object 
to interpret "s" however it wants. For example, if the object is a datetime, 
you're asking for the output to be "s":

>>> f'{datetime.datetime.now():s}'
's'

versus:

>>> f'{datetime.datetime.now()}'
'2018-08-22 10:27:25.188891'

It's precisely because we want to let the object interpret the string that 
Python no longer guesses as to what you might mean.

For example, say you have a MyDate object, that doesn't support __format__, and 
you want Python to decide that format(MyDate(), 's') means is the same as 
format(MyDate(), ''). But later you decide that you want the format strings to 
call strftime (like datetime does). You couldn't do that without breaking 
existing usage of your library.

This actually happened with complex when I added complex.__format__.

--

___
Python tracker 

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



[issue34458] No way to alternate options

2018-08-22 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

That's a *really* niche use case; you want to store everything to a common 
destination list, in order, but distinguish which switch added each one? I 
don't know of any programs that use such a design outside of Python (and 
therefore, it seems unlikely there would be enough demand from argparse users 
to justify the development, maintenance, and complexity cost of adding it).

argparse does support defining custom Actions, so it's wholly possible to add 
this sort of support for yourself if there isn't enough demand to add it to 
argparse itself. For example, a simple implementation would be:

class AppendWithSwitchAction(argparse.Action):
def __init__(self, option_strings, dest, *args, **kwargs):
super().__init__(option_strings, dest, *args, **kwargs)
# Map all possible switches to the final switch provided
# so we store a consistent switch name
self.option_map = dict.fromkeys(option_strings, option_strings[-1])

def __call__(self, parser, namespace, values, option_string=None):
option = self.option_map.get(option_string)
try:
getattr(namespace, self.dest).append((option, value))
except AttributeError:
setattr(namespace, self.dest, [(option, value)])

then use it with:

parser.add_argument('-p', '--preload', help='preload asset', 
action=AppendWithSwitchAction, metavar='NAMESPACE')

parser.add_argument('-f', '--file', help='preload file', 
action=AppendWithSwitchAction, metavar='FILE', dest='preload')

All that does is append ('--preload', argument) or ('--file', argument) instead 
of just appending the argument, so you can distinguish one from the other (for 
switch, arg in args.preload:, then test if switch=='--preload' or '--file'). 
It's bare bones (the actual class underlying the 'append' action ensures nargs 
isn't 0, and that if const is provided, nargs is '?'), but it would serve.

--
nosy: +josh.r

___
Python tracker 

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



[issue34434] Removal of kwargs for built-in types not covered with "changed in Python" note in documentation

2018-08-22 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Bloating the documentation is almost certainly unjustifiable for list and 
tuple, and only barely justifiable for int, bool and float, given that:

1. The documentation (at least for Python 3) has *never* claimed the arguments 
could be passed by keyword (all of them used brackets to indicate the argument 
was optional without implying a meaningful default, which is typically how 
"does not take arguments by keyword" was described before the current "/" 
convention)

and

2. Aside from bool and float (and to a lesser extent, int), the documented name 
of said parameter didn't match the name it was accepted under, e.g.:

   a. The docs for tuple and list claimed the name was "iterable"; the only 
accepted name was "sequence"
   b. The online docs for int gave a wholly invalid "name", calling it "number 
| string", when in fact it was accepted only as "x". That said, int's docstring 
does describe the name "correctly" as "x"

So for tuple/list it would have been impossible to write code that depended on 
being able to pass the first parameter by keyword unless you'd gone mucking 
about in the CPython source code to figure out the secret keyword name. I could 
justify a note for int/bool/float given that the docstrings for all of them 
named the argument, and bool/float named it in the online docs, but we don't 
need to document a change that no one could have taken a dependency on without 
going to extreme trouble.

--
nosy: +josh.r

___
Python tracker 

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



[issue34434] Removal of kwargs for built-in types not covered with "changed in Python" note in documentation

2018-08-22 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Oh, I was checking old docs when I said the online docs didn't call int's 
argument "x"; the current docs do, so int, float and bool all justify a change 
(barely), it's just tuple and list for which it's completely unjustifiable.

--

___
Python tracker 

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



[issue34425] :s formatting broken for objects without __format__

2018-08-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

Forgot to add: I haven't looked at the docs yet, but I agree they should be 
clear on this issue.

The docs should say: for types that implement the documented mini-language, "s" 
is the same as "". It's just that not all types implement the mini-language 
(like datetime, and probably many non-standard, user-defined types).

If they don't say that, can you open a separate documentation issue? Thanks.

Or, maybe the problem is that the docs make it seem like all types do (or 
should?) implement the mini-language? That's definitely not true, and they 
shouldn't say that.

--

___
Python tracker 

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



[issue34458] No way to alternate options

2018-08-22 Thread paul j3


paul j3  added the comment:

I agree that a custom Action subclass like this is the way to go.

The regular 'append' is implemented in _AppendAction class, which is different 
from the default _StoreAction.  So even if there was enough demand for this new 
idea to be put into development, it would be implemented as subclass (along 
with a registry entry).

--
nosy: +paul.j3

___
Python tracker 

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



[issue34455] Tkinter crashing when pressing Command + ^ (OSX)

2018-08-22 Thread iPodClassic

iPodClassic  added the comment:

Thanks for the more detailed and further explanation. So we at least know it’s 
bound to spanish keyboards only.  I wouldn’t even call it a bothersome bug 
except the key combo you press is very similar to when you try to enter a [ key 
(option+^) ; so you end up losing all code by mistake, when trying to enter an 
often used character on IDLE.

--

___
Python tracker 

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



[issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure

2018-08-22 Thread Paul Ganssle


Change by Paul Ganssle :


--
pull_requests: +8336

___
Python tracker 

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



[issue34434] Removal of kwargs for built-in types not covered with "changed in Python" note in documentation

2018-08-22 Thread Brett Cannon


Brett Cannon  added the comment:

Please don't use over-the-top language like "completely unjustifiable" because 
it is unnecessary and in this case wrong. We treat our documentation as a 
recording of the semantics of the stdlib as well as a recording of what 
semantic changes occurred between versions. Something did change semantically 
and so it should be documented. Whether the way the docs have previously been 
written would have suggested that someone accidentally used keyword arguments 
is not the critical point. Anyone could have looked at e.g. help() or simply 
stumbled upon the fact keyword arguments used to work and then suddenly 
discovered they didn't. At that point it's more helpful to the user to know 
when that changed occurred then to try and minimize the amount of text in the  
docs simply because they happened to have not been written to suggest keyword 
arguments worked when they, in fact, did.

IOW adding a "version changed" note is not bloat, it's about letting people 
know who happened to have used keyword arguments what version of Python is 
going to break their code.

--

___
Python tracker 

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



[issue34453] ipaddress module accepts some strange IPv6 addresses that it shouldn't

2018-08-22 Thread Prudvi RajKumar Maddala


Prudvi RajKumar Maddala  added the comment:

Hi Ikcl, are you working on the fix? I'd like to work on it.

--
nosy: +prudvinit

___
Python tracker 

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



[issue34453] ipaddress module accepts some strange IPv6 addresses that it shouldn't

2018-08-22 Thread Luke Kenneth Casson Leighton


Luke Kenneth Casson Leighton  added the comment:

> Hi lkcl, are you working on the fix? I'd like to work on it.

hi prudvi, i'm not: i'm simply making people aware that there's
an issue that needs to be addressed (pun intended)

--

___
Python tracker 

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



[issue34462] _xxsubinterpreters: Wrong NULL check in _copy_raw_string()

2018-08-22 Thread Alexey Izbyshev


New submission from Alexey Izbyshev :

The code at 
https://github.com/python/cpython/blob/28853a249b1d0c890b7e9ca345290bb8c1756446/Modules/_xxsubinterpretersmodule.c#L18
 checks a wrong variable for NULL:

const char *str = PyUnicode_AsUTF8(strobj);
if (str == NULL) {
return NULL;
}
char *copied = PyMem_Malloc(strlen(str)+1);
if (str == NULL) {
PyErr_NoMemory();
return NULL;
}

Reported by Svace static analyzer.

--
components: Extension Modules
messages: 323897
nosy: eric.snow, izbyshev, serhiy.storchaka
priority: normal
severity: normal
status: open
title: _xxsubinterpreters: Wrong NULL check in _copy_raw_string()
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue34462] _xxsubinterpreters: Wrong NULL check in _copy_raw_string()

2018-08-22 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


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

___
Python tracker 

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



[issue2122] mmap.flush does not check for errors on windows

2018-08-22 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset e7d4b2f205c711d056bea73a0093e2e2b200544b by Berker Peksag in 
branch 'master':
bpo-2122: Make mmap.flush() behave same on all platforms (GH-8692)
https://github.com/python/cpython/commit/e7d4b2f205c711d056bea73a0093e2e2b200544b


--
nosy: +berker.peksag

___
Python tracker 

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



[issue2122] mmap.flush does not check for errors on windows

2018-08-22 Thread Berker Peksag


Berker Peksag  added the comment:

Thanks for the suggestions and for the reviews!

--
assignee: brian.curtin -> 
priority: high -> normal
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



[issue34462] _xxsubinterpreters: Wrong NULL check in _copy_raw_string()

2018-08-22 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset c583919ffced0a3b6409766fc12f6e28bef4fac7 by Berker Peksag (Alexey 
Izbyshev) in branch 'master':
bpo-34462: Add missing NULL check to _copy_raw_string() (GH-8863)
https://github.com/python/cpython/commit/c583919ffced0a3b6409766fc12f6e28bef4fac7


--
nosy: +berker.peksag

___
Python tracker 

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



[issue34462] _xxsubinterpreters: Wrong NULL check in _copy_raw_string()

2018-08-22 Thread Berker Peksag


Change by Berker Peksag :


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



[issue32947] Support OpenSSL 1.1.1

2018-08-22 Thread Kurt Roeckx


Kurt Roeckx  added the comment:

This are the errors I'm currently getting testing with the pre9 verion in 
Debian:
https://ci.debian.net/data/autopkgtest/testing/amd64/p/python2.7/865936/log.gz
https://ci.debian.net/data/autopkgtest/testing/amd64/p/python3.6/865937/log.gz
https://ci.debian.net/data/autopkgtest/testing/amd64/p/python3.7/865938/log.gz

--
nosy: +kroeckx

___
Python tracker 

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



[issue34463] Discrepancy between traceback.print_exception and sys.__excepthook__

2018-08-22 Thread Timothy McCurrach


New submission from Timothy McCurrach :

If you have set sys.excepthook to some function which calls 
traceback.print_exception, then I would expect to get identical 
traceback/exception messages. If you run raise SyntaxError("some message"), 
then print_exception has the extra line `File "", line None`. 

This comes from lines 558-561 of traceback.py:

# It was a syntax error; show exactly where the problem was found.
filename = self.filename or ""
lineno = str(self.lineno) or '?'
yield '  File "{}", line {}\n'.format(filename, lineno)

Is it expected behaviour that these two functions behave differently, or should 
there be something like:
if self.filename or self.lineno:
etc.

Also, if self.lineno is None, then str(self.lineno) evaluates to "None" and so 
the ? is never used.

--
components: Demos and Tools
messages: 323902
nosy: Timothy McCurrach
priority: normal
severity: normal
status: open
title: Discrepancy between traceback.print_exception and sys.__excepthook__
type: behavior

___
Python tracker 

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



[issue32947] Support OpenSSL 1.1.1

2018-08-22 Thread Christian Heimes


Christian Heimes  added the comment:

Kurt, can you try again with a current git checkout from master? I fixed a 
couple of issues lately. CPython master passes all tests with vanilla OpenSSL 
1.1.1-pre9. Does Debian change some default settings?

--

___
Python tracker 

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



[issue34464] docs: keywords are special - eg constants.html

2018-08-22 Thread Jonathan Fine


New submission from Jonathan Fine :

The identifiers True, False, None and __debug__ are keywords in the language.  
For example
>>> __debug__ = __debug__
SyntaxError: assignment to keyword


1. The page constants.html incorrectly says then are in the built-in namespace. 
Some of them were, once.

2. The list keyword.kwlist does not contain __debug__. (Problem in 
Lib/keyword.py.)

3. https://docs.python.org/3/reference/datamodel.html for None, NotImplemented, 
etc.

4. There may be other places that need looking at.

See also: 
https://github.com/jfine2358/py-jfine2358/blob/master/docs/none-is-special.md

Credit: The __debug__ problem arises from Steve D'Aprano's message

https://mail.python.org/pipermail/python-ideas/2018-August/052917.html
The std lib contains a test that this correctly raises SyntaxError:
def f(*, x=lambda __debug__:0): pass

--
assignee: docs@python
components: Documentation
messages: 323904
nosy: docs@python, jfine2358
priority: normal
severity: normal
status: open
title: docs: keywords are special - eg constants.html
type: enhancement
versions: Python 2.7, 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



[issue34464] docs: keywords are special - eg constants.html

2018-08-22 Thread Jonathan Fine


Jonathan Fine  added the comment:

I'm happy to work on improving the text here. I'm new to contributing to 
Python. I'm being mentored to work on #34431.

Once I'm done with that, I'll be better placed to contributed to this issue.

--

___
Python tracker 

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



[issue34465] ipaddress should accept bytearray in addition to bytes

2018-08-22 Thread Jörn Heissler

New submission from Jörn Heissler :

Hi,

the ipaddress module accepts `bytes' objects in the constructors.
`bytearray' however is not supported, see paste below.

Should this be supported too?


>>> import ipaddress

>>> ipaddress.IPv4Address(bytes([127, 0, 0, 1]))
IPv4Address('127.0.0.1')

>>> ipaddress.IPv4Address(bytearray([127, 0, 0, 1]))
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.7/ipaddress.py", line 1301, in __init__
self._ip = self._ip_int_from_string(addr_str)
  File "/usr/lib/python3.7/ipaddress.py", line 1135, in _ip_int_from_string
raise AddressValueError("Expected 4 octets in %r" % ip_str)
ipaddress.AddressValueError: Expected 4 octets in 
"bytearray(b'\\x7f\\x00\\x00\\x01')"

--
components: Library (Lib)
messages: 323906
nosy: joernheissler
priority: normal
severity: normal
status: open
title: ipaddress should accept bytearray in addition to bytes
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



[issue34464] There are inconsitencies in the treatment of True, False, None, and __debug__ keywords in the docs

2018-08-22 Thread R. David Murray


R. David Murray  added the comment:

I've removed 2.7 since those constants are not keywords in 2.7 (although None 
and __debug__ do raise syntax errors even in 2.7, they are not keywords there). 
 Which is almost certainly why the docs treat them inconsistently (leftovers 
from before they weren't keywords).  

We only update docs for the actively maintained versions, so I've removed 
everything before 3.6.  I also tried to clarify the issue in the title.

I don't know why you mention NotImplemented, that's not a keyword.

The issue with __debug__ and keywords.py probably requires a code change, since 
that file is auto-generated.  Please open a separate issue for that.

Thanks for wanting to improve python!

--
nosy: +r.david.murray
title: docs: keywords are special - eg constants.html -> There are 
inconsitencies in the treatment of True, False, None, and __debug__ keywords in 
the docs
versions:  -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue34434] Removal of kwargs for built-in types not covered with "changed in Python" note in documentation

2018-08-22 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

For tuple and list, no, they couldn't have looked at the help (because the help 
calls the argument "iterable", while the only keyword accepted was "sequence"). 
Nor was "sequence" documented in the online docs, nor anywhere else that I can 
find; it was solely in the C source code.

If it was discoverable in any other way, I wouldn't say documenting the change 
(outside of What's New) was completely unjustifiable (I acknowledge that int, 
bool and float warrant a mention, since they did document a functioning name 
for the argument; I was a little too down on them in my original messages).

But the only way someone would accidentally use keyword arguments for 
list/tuple is if they were fuzzing the constructor by submitting random keyword 
arguments until something worked. That seems an odd thing to worry about 
breaking. The error message wouldn't help either; the exception raised tells 
you what argument was unrecognized, but not the names of recognized arguments.

Even if you want to document it, it's hard to do so without being confusing, 
inaccurate, or both. The original PR's versionchanged message was:

*iterable* is now a positional-only parameter.

But "iterable" was never a legal keyword, so saying it's "now a positional-only 
parameter" implies that at some point, it wasn't, and you could pass it with 
the name "iterable", which is wrong/confusing. If you mention "sequence", 
you're mentioning a now defunct detail (confusing, but not wrong). I suppose 
you could have the versionchanged say "This function does not accept keyword 
arguments", but again, for all discoverable purposes, it never did.

I'm not saying *no* documentation of the change is needed, but I am saying, for 
list/tuple, the What's New note is sufficient to cover it for those people who 
went mucking through the CPython source code to find an undocumented keyword 
they could use.

--

___
Python tracker 

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



[issue32947] Support OpenSSL 1.1.1

2018-08-22 Thread Kurt Roeckx


Kurt Roeckx  added the comment:

This are automated tests for the packages in Debian. I uploaded the pre9 
version to unstable, and as a result of that all reverse dependencies got 
tested. I don't have any experience with python myself.

Anyway, the openssl.cnf in Debian contains:
[system_default_sect]
MinProtocol = TLSv1.2
CipherString = DEFAULT@SECLEVEL=2

So you might want to override that during the test suite by calling 
SSL_CTX_set_min_proto_version(ctx, 0).

--

___
Python tracker 

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



[issue34466] socket.settimeout working incorrectly for connect() method of AF_UNIX socket

2018-08-22 Thread Fedor Korotkiy


New submission from Fedor Korotkiy :

Attached program creates listening server socket, fills backlog queue with 2 
client socket and performs third connect attempt after setting socket timeout 
to 5 second.

I expect third connect() attempt to fail after specified timeout of 5 second. 
That is indeed what's happening for tcp socket (AF_INET).

But when underlying socket has type AF_UNIX, connect() fails immediately with 
'Resource temporarily unavailable' error. I'm able to reproduce this issue on 
linux 4.17.12 and python 3.6.6.

The underlying issue seems to be different behavior of connect(3) system call 
for unix sockets. Instead of starting operation and returning EINPROGRESS error 
it fails immediately with EAGAIN error.

Thanks to Vladislav Bidzilya for discovering this issue.

--
files: bug.py
messages: 323910
nosy: Slon
priority: normal
severity: normal
status: open
title: socket.settimeout working incorrectly for connect() method of AF_UNIX 
socket
versions: Python 3.6
Added file: https://bugs.python.org/file47759/bug.py

___
Python tracker 

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



[issue34467] No mechanism to abort created coroutine or suppress not-awaited warning

2018-08-22 Thread Sheng Zhong


New submission from Sheng Zhong :

As far as I know, there is no mechanism for aborting a created coroutine 
instance before it's executed with an await (directly or indirectly). I have a 
function which takes in coroutine instances and conditionally creates a task 
for them that I track so that they can be later gathered. When the condition is 
false, I'd like to not execute the passed in coroutine.

Simply ignoring the coroutine works but reports a RuntimeWarning about 
coroutine not being awaited on. Checking the conditional before calling the 
function works but damages maintainability and is putting the responsibility on 
the wrong party.

Creating the task then immediately cancelling it does not work since execution 
for it will start and leads to other cancellation issues.

Is there a way to abort a coroutine instance that I'm not aware of?

--
components: asyncio
messages: 323911
nosy: Sheng Zhong, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: No mechanism to abort created coroutine or suppress not-awaited warning
type: enhancement
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



[issue34468] An always-false condition in range_repr() from Objects/rangeobject.c

2018-08-22 Thread Alexey Izbyshev


New submission from Alexey Izbyshev :

range_repr() contains the following snippet:

/* Check for special case values for printing.  We don't always
   need the step value.  We don't care about errors
   (it means overflow), so clear the errors. */
istep = PyNumber_AsSsize_t(r->step, NULL);
if (istep != 1 || (istep == -1 && PyErr_Occurred())) {
PyErr_Clear();
}

The second condition in 'if' statement is always false (reported by Svace 
static analyzer). Moreover, the comment is incorrect. It implies that any error 
from PyNumber_AsSsize_t() means that an overflow occurred, but according to its 
implementation and documentation, any error is guaranteed *not* to be an 
OverflowError if the second parameter is NULL (the result is clamped on 
overflow).

In practice, 'range' invariants currently guarantee that no error can occur in 
this case because 'r->step' is a subtype of int (enforced in validate_step()). 
So the 'if' statement can be replaced either with an assert:

assert(!(istep == -1 && PyErr_Occurred()))

or with a conservative check:

if (istep == -1 && PyErr_Occurred())) {
// may also add assert(!PyErr_ExceptionMatches( PyExc_OverflowError);
return NULL;
}

Suggestions are appreciated.

--
components: Interpreter Core
messages: 323912
nosy: izbyshev, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
status: open
title: An always-false condition in range_repr() from Objects/rangeobject.c
type: behavior
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



[issue34467] No mechanism to abort created coroutine or suppress not-awaited warning

2018-08-22 Thread ppperry


ppperry  added the comment:

Does calling `coro.close()` not work?

--
nosy: +ppperry

___
Python tracker 

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



[issue6700] inspect.getsource() returns incorrect source lines at the module level

2018-08-22 Thread Vladimir Matveev


Change by Vladimir Matveev :


--
pull_requests: +8338

___
Python tracker 

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



[issue34455] Tkinter crashing when pressing Command + ^ (OSX)

2018-08-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I should have been more specific.  I meant to run the file directly with 
python, with IDLE not involved.  "python3 .../path/to/tk_scroll.py".  Howver, 
running it from an IDLE editor and editing in the resulting non-IDLE text 
window is almost as good.

This reminds me of when trying to enter a French cedilla crashed tk.  That was 
fixed about at tk 8.5.15.

The only thing that could be done from IDLE is to add tk(inter) bind calls.

--
nosy: +wordtech

___
Python tracker 

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



[issue34455] Tkinter crashing when pressing Command + ^ (OSX)

2018-08-22 Thread iPodClassic


iPodClassic  added the comment:

I see. Well, I guess as far as I can go is to notify about the bug. The part 
about adding tkinter bind calls I have no idea. Should we just close this bug 
report as postponed or something?

Thanks for the help and explanation though! I guess the more I get into Python 
the more things I will find out.

--

___
Python tracker 

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



[issue34434] Removal of kwargs for built-in types not covered with "changed in Python" note in documentation

2018-08-22 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> I'm not saying *no* documentation of the change is needed, 
> but I am saying, for list/tuple, the What's New note is 
> sufficient to cover it for those people who went mucking 
> through the CPython source code to find an undocumented 
> keyword they could use.

That seems like a reasonable position to take.

--
nosy: +rhettinger

___
Python tracker 

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



[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

2018-08-22 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Xiang Zhang, would you like to submit a patch?

--

___
Python tracker 

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



[issue34469] windows msi in headless mode fails to install Script directory on reinstall if the python folder was deleted but not uninstalled

2018-08-22 Thread Christopher Knorowski


New submission from Christopher Knorowski :

Steps to repeate (windows 10)

msiexec.exe /i python-2.7.15.amd64.msi TARGET_DIR=C:/Users/Public/python /qr

(fresh install works without issue)

rm -r C:/Users/Public/python

msiexec.exe /i python-2.7.15.amd64.msi TARGET_DIR=C:/Users/Public/python /qr

(Scripts folder and all site-packages are not copied ie. no Pip or easy_install)

--
components: Installation
messages: 323918
nosy: cdknorow
priority: normal
severity: normal
status: open
title: windows msi in headless mode fails to install Script directory on 
reinstall if the python folder was deleted but not uninstalled
type: compile error
versions: Python 2.7

___
Python tracker 

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



[issue34469] windows msi in headless mode fails to install Script directory on reinstall if the python folder was deleted but not uninstalled

2018-08-22 Thread Christopher Knorowski


Christopher Knorowski  added the comment:

Steps to repeate (windows 10)

msiexec.exe /i python-2.7.15.amd64.msi TARGETDIR=C:/Users/Public/python /qr

(fresh install works without issue)

rm -r C:/Users/Public/python

msiexec.exe /i python-2.7.15.amd64.msi TARGETDIR=C:/Users/Public/python /qr

(Scripts folder and all site-packages are not copied ie. no Pip or easy_install)

--

___
Python tracker 

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



[issue34469] windows msi in headless mode fails to install Script directory on reinstall if the python folder was deleted but not uninstalled

2018-08-22 Thread Christopher Knorowski


Christopher Knorowski  added the comment:

Steps to repeate (windows 10)

msiexec.exe /i python-2.7.15.amd64.msi ALL_USERS=0 
TARGETDIR=C:\Users\Public\python /qr

(fresh install works without issue)

rm -r C:/Users/Public/python

msiexec.exe /i python-2.7.15.amd64.msi ALL_USERS=0 
TARGETDIR=C:\Users\Public\python /qr

(Scripts folder and all site-packages are not copied ie. no Pip or easy_install)

--

___
Python tracker 

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



[issue34469] windows msi in headless mode fails to install Script directory on reinstall if the python folder was deleted but not uninstalled

2018-08-22 Thread Christopher Knorowski


Change by Christopher Knorowski :


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



[issue34470] windows msi in headless mode fails to install Script directory on reinstall if the python folder was deleted but not uninstalled

2018-08-22 Thread Christopher Knorowski


New submission from Christopher Knorowski :

Steps to repeate (windows 10)

msiexec.exe /i python-2.7.15.amd64.msi ALL_USERS=0 
TARGETDIR=C:\Users\Public\python /qr

(fresh install works without issue)

rm -r C:\Users\Public\python

(On reinstall scripts folder and all site-packages are not copied ie. no Pip or 
easy_install)

msiexec.exe /i python-2.7.15.amd64.msi ALL_USERS=0 
TARGETDIR=C:\Users\Public\python /qr

--
components: Installation
messages: 323921
nosy: cdknorow
priority: normal
severity: normal
status: open
title: windows msi in headless mode fails to install Script directory on 
reinstall if the python folder was deleted but not uninstalled
type: compile error
versions: Python 2.7

___
Python tracker 

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



[issue34470] windows msi in headless mode fails to install Script directory on reinstall if the python folder was deleted but not uninstalled

2018-08-22 Thread Zachary Ware


Zachary Ware  added the comment:

Python 2.7 is nearing end-of-life, its installer scheme is no longer used on 
any other branch, and the maintainer of that installer retired some years ago.  
If you provide a patch, we can take a look and possibly merge it for you, but 
it's unlikely that this will be picked up by a maintainer without a patch to 
review.

If you would like to try patching it, all the necessary files should be in 
2.7/Tools/msi, and you can feel free to ask questions here if you get stuck.  
Good luck!

--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
priority: normal -> low
type: compile error -> behavior

___
Python tracker 

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



[issue34466] socket.settimeout working incorrectly for connect() method of AF_UNIX socket

2018-08-22 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

I think what you want to do is not use the timeout feature of Python sockets 
and instead use mysock.setsockopt(SO_SNDTIMEO, 5).

--
nosy: +benjamin.peterson

___
Python tracker 

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