[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-10 Thread anthony shaw


anthony shaw  added the comment:

Thanks, I'll check this out

--
assignee:  -> anthonypjshaw
nosy: +anthonypjshaw

___
Python tracker 

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



[issue36882] 在ctypes里调用C库返回c_char_p类型时的问题

2019-05-10 Thread anthony shaw


anthony shaw  added the comment:

"When the C library is called in ctypes to return the c_char_p type, the 
problem that only the string before \0 can be obtained when the string contains 
\\0"

This function is specifically for null-terminated strings (\0), please could 
you be more specific about the expected behaviour and why this is a bug?

https://docs.python.org/2/library/ctypes.html#ctypes.c_char_p

--
nosy: +anthonypjshaw

___
Python tracker 

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



[issue36883] 在ctypes里调用C库返回c_char_p类型时的问题

2019-05-10 Thread anthony shaw


anthony shaw  added the comment:

Closing as duplicate of 36882

--
nosy: +anthonypjshaw

___
Python tracker 

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



[issue36883] 在ctypes里调用C库返回c_char_p类型时的问题

2019-05-10 Thread anthony shaw


Change by anthony shaw :


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



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

2019-05-10 Thread Martin Panter

Martin Panter  added the comment:

The “cmd” module doesn’t use “argparse” as far as I can see. You might have to 
provide more information or code for someone to make sense of or reproduce your 
bug.

Also, see Issue 14191 which added new “parse_[known]_intermixed_args” APIs in 
3.7, and have a look at Issue 15112, about intermixing options between 
particular kinds of positional parameters.

--
nosy: +martin.panter
status: open -> pending

___
Python tracker 

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



[issue32573] All sys attributes (.argv, ...) should exist in embedded environments

2019-05-10 Thread Dieter Weber


Change by Dieter Weber :


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

___
Python tracker 

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



[issue36751] Changes in the inspect module for PEP 570

2019-05-10 Thread Nick Coghlan


Nick Coghlan  added the comment:

Also note #32190 regarding changing the way these APIs are documented, without 
introducing any programmatic deprecation warnings.

--

___
Python tracker 

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



[issue27172] Undeprecate inspect.getfullargspec()

2019-05-10 Thread Nick Coghlan


Change by Nick Coghlan :


--
status: open -> closed

___
Python tracker 

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



[issue36751] Changes in the inspect module for PEP 570

2019-05-10 Thread Nick Coghlan


Nick Coghlan  added the comment:

And no, the undeprecation wasn't because of Python 2 (Py2 doesn't have 
getfullargspec() - it's a Py3 only API).

The undeprecation was because there are a lot of 3rd party projects for whom 
the getfullargspec() representation is good enough, and switching to 
inspect.Signature instead requires a significant rewrite vs just wrapping 
inspect.Signature to produce getfullargspec() style output.

So getfullargspec() doesn't need to change at all for PEP 570 and should 
instead keep handling positional only arguments the same way it has since it 
was switched over to being based on inspect.Signature: reporting them the same 
way as positional-or-keyword parameters.

--

___
Python tracker 

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



[issue36751] Changes in the inspect module for PEP 570

2019-05-10 Thread Nick Coghlan


Change by Nick Coghlan :


--
priority: normal -> release blocker

___
Python tracker 

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



[issue36751] Changes in the inspect module for PEP 570

2019-05-10 Thread Nick Coghlan


Nick Coghlan  added the comment:

This PR needs to be reverted - we previously deprecated this API, but then 
undeprecated it again in #27172, as the consequence of deprecating it was 
projects copying & pasting the getfullargspec() implementation into their own 
code, not switching to inspect.Signature.

--

___
Python tracker 

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



[issue9351] argparse set_defaults on subcommands should override top level set_defaults

2019-05-10 Thread paul j3


paul j3  added the comment:

A variation on the problem I reported in 

https://bugs.python.org/issue9351#msg229968

is that a custom Namespace class as documented in 

https://docs.python.org/3/library/argparse.html#the-namespace-object

will not be used by the subparsers.  Only the main parser uses that custom 
Namespace object; the subparsers continue to use the default 
'argparse.Namespace()'.

--

___
Python tracker 

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



[issue13824] argparse.FileType opens a file and never closes it

2019-05-10 Thread paul j3


paul j3  added the comment:

While I continue to follow argparse issues, I'm not doing development (with my 
own repository, etc).  

I haven't revisited the issue since 2013, and don't know that much more about 
Python file handling.  Occasionally 'FileType' issues come up on StackOverflow, 
and my most common suggestion is accept a string, and open the file yourself.

In writing a solution, keep backward compatibility foremost in mind.  We don't 
want to mess things up for existing code.  And keep FileType simple, consistent 
with Steven's original intent - as a tool for simple input/output scripts.

As for the idea of 

2 - Making the argument namespace itself support context management

someone could experiment with a new Namespace class with the proper enter/exit 
methods.  The use of a custom Namespace class is documented 

https://docs.python.org/3/library/argparse.html#the-namespace-object

So the idea can be implemented and thoroughly tested without altering the 
default Namespace class and its use.  (With one caution, subparsers won't use 
this custom class.)

--

___
Python tracker 

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



[issue36881] isinstance raises TypeError for metaclass with metaclass=ABCMeta

2019-05-10 Thread Randy Eckman


New submission from Randy Eckman :

>>> from abc import ABCMeta
>>> class AbstractMeta(type, metaclass=ABCMeta): pass
...
>>> class Meta1(AbstractMeta): pass
...
>>> class Meta2(AbstractMeta): pass
...
>>> class ClassA(metaclass=Meta1): pass
...
>>> isinstance(ClassA, Meta2)
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\miniconda\miniconda3\lib\abc.py", line 139, in __instancecheck__
return _abc_instancecheck(cls, instance)
TypeError: __subclasscheck__() takes exactly one argument (0 given)


This is driven by the fact that the metaclass of AbstractMeta is ABCMeta; if I 
change its metaclass to something else that does not contain ABCMeta in the 
inheritance chain, isinstance returns False as expected.


Possibly related to Issue 2325?

--
components: Interpreter Core
messages: 342152
nosy: emanspeaks
priority: normal
severity: normal
status: open
title: isinstance raises TypeError for metaclass with metaclass=ABCMeta
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



[issue36875] argparse does not ship with translations

2019-05-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Many modules contain translatable strings.  CPython does not ship with 
translations of any of them and I believe it is against policy to do so.

1. Core developers, though an international group, are not competent to create 
or approve translations.
2. Core developers feel that professional Python users must gain basic English 
proficiency.

If you want to discuss this further, please discuss on python-ideas list, 
possibly after trying to find previous discussions, not here. We only allowed 
'official' translations of the docs about a year ago and those are done by a 
group separate from the core developers.

--
nosy: +terry.reedy
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



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

2019-05-10 Thread paul j3


paul j3  added the comment:

At the start of parse_known_args, all defaults (except SUPPRESS ones) are 
placed in the namespace:

# add any action defaults that aren't present
for action in self._actions:
if action.dest is not SUPPRESS:
if not hasattr(namespace, action.dest):
if action.default is not SUPPRESS:
setattr(namespace, action.dest, action.default)

at the end of _parse_known_args there's a conditional expression that cleans up 
remaining defaults that are strings, by passing them through the 'type` 
callable:

setattr(namespace, action.dest,
self._get_value(action, action.default))

Read the comments to see why this default setting is done in two parts.

The pattern of defaults in msg342122 with optionals is consistent with that.  
If the argument is not provided, the default appears.  

In the first example of that message, the REMAINDER is given all the remaining 
strings including the '--bar', so there is nothing left to trigger the '--bar' 
optional argument, and it retains the default.

The difference for positionals is due to how the '*' and '...' are handled in 
_getvalues.  Both may be filled with an empty list of values.

# when nargs='*' on a positional, if there were no command-line
# args, use the default if it is anything other than None
elif (not arg_strings and action.nargs == ZERO_OR_MORE and
  not action.option_strings):
if action.default is not None:
value = action.default
else:
value = arg_strings
self._check_value(action, value)



# REMAINDER arguments convert all values, checking none
elif action.nargs == REMAINDER:
value = [self._get_value(action, v) for v in arg_strings]

In the case of '*', the default is, effectively, placed back on the namespace.  
REMAINDER does not - the empty list is put in the namespace.

In _get_positional_kwargs,

# mark positional arguments as required if at least one is
# always required
if kwargs.get('nargs') not in [OPTIONAL, ZERO_OR_MORE]:
kwargs['required'] = True
if kwargs.get('nargs') == ZERO_OR_MORE and 'default' not in kwargs:
kwargs['required'] = True

That last conditional is a little puzzling, but I suspect it has to do with 
mutually_exclusive_groups,  A '*' positional can be a member of a group if it 
has a default.

Anyways, we could add a test at this point like:

if kwargs.get('nargs') == REMAINDER and 'default' in kwargs:
msg = _("'default' is not allowed with a REMAINDER positional")
raise TypeError(msg)

But reviewing the code I notice another difference.  'choices' are not honored 
for REMAINDER.  That makes a lot of sense.  REMAINDER is supposed to be a catch 
all, documented as something that might be passed on to another parser.  This 
parser shouldn't be doing anything with those values.

The documentation reads:

argparse.REMAINDER. All the remaining command-line arguments are gathered into 
a list. This is commonly useful for command line utilities that dispatch to 
other command line utilities:

I think REMAINDER has another quirk.  It doesn't work as the first (and only?) 
argument.   There should be a bug/issue to that effect.

https://bugs.python.org/issue17050, argparse.REMAINDER doesn't work as first 
argument

In https://bugs.python.org/issue17050#msg315716, I suggest removing REMAINDER 
from the docs.  We can leave the code as is, in case anyone is using still 
using it.  But it is probably too much work to make the code and docs match, 
both for that issue, and for this.


'*' plus '--' gives almost the same behavior.  So does parse_known_args.

--

___
Python tracker 

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



[issue36788] Add clamp() function to builtins

2019-05-10 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue21536] extension built with a shared python cannot be loaded with a static python

2019-05-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4ebcd7e2980d650c711d21b93447af39a8604554 by Victor Stinner in 
branch 'master':
bpo-21536: Update What's New in Python 3.8 entry (GH-13242)
https://github.com/python/cpython/commit/4ebcd7e2980d650c711d21b93447af39a8604554


--

___
Python tracker 

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



[issue36471] PEP 432, PEP 587: Add _Py_RunMain()

2019-05-10 Thread STINNER Victor


STINNER Victor  added the comment:

The PEP 587 will decide if this function is made public or not.

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



[issue21536] extension built with a shared python cannot be loaded with a static python

2019-05-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13152

___
Python tracker 

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



[issue36728] Remove PyEval_ReInitThreads() from the public C API

2019-05-10 Thread STINNER Victor


STINNER Victor  added the comment:

The function was added 19 years ago:

commit fee3a2dd8cf984b8261032086fe513bf7327b601
Author: Guido van Rossum 
Date:   Sun Aug 27 17:34:07 2000 +

Charles Waldman's patch to reinitialize the interpreter lock after a
fork.  This solves the test_fork1 problem.  (ceval.c, signalmodule.c,
intrcheck.c)

SourceForge: [ Patch #101226 ] make threading fork-safe

--

___
Python tracker 

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



[issue36728] Remove PyEval_ReInitThreads() from the public C API

2019-05-10 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue36749] PPC64 AIX 3.x: compilation issue, linker fails to locate symbols

2019-05-10 Thread STINNER Victor


STINNER Victor  added the comment:

PPC64 AIX 3.x buildbot worker is back to green. It seems like my PR 13004 is 
useless. I close the issue.

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



[issue33303] ElementTree Comment text isn't escaped

2019-05-10 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

Which characters would you escape in a processing instruction? The XML spec 
says not to escape '<' and '&', but doesn't say what should be escaped. It 
seems to me that escaping '?' when followed by '>' should be sufficient since 
the character sequence "?>" is the closing delimiter.

--

___
Python tracker 

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



[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-10 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

I like the idea of separate smaller PRs, the first one looks good.

--

___
Python tracker 

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



[issue36810] Recursive type annotations do not work in documentation tests

2019-05-10 Thread Guido van Rossum


Guido van Rossum  added the comment:

I don't think there's an actionable bug here.

--

___
Python tracker 

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



[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13150

___
Python tracker 

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



[issue36620] Documentation missing parameter for Itertools.zip_longest

2019-05-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I'll take care of it. Thank you.

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



[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-10 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee: rhettinger -> 

___
Python tracker 

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



[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-10 Thread dgelessus


New submission from dgelessus :

This occurs when writing a ctypes callback in Python whose restype is 
ctypes.py_object. If the callback returns None, the refcount of None is 
decremented once too often. This happens every time the callback is called, and 
if done often enough, Python attempts to deallocate None and crashes.

To reproduce:

$ bin/python3
Python 3.8.0a4+ (heads/master:09532feeec, May 10 2019, 23:53:49) 
[Clang 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import ctypes
>>> FUNTYPE = ctypes.CFUNCTYPE(ctypes.py_object)
>>> @FUNTYPE
... def fun():
... return None
... 
>>> print(fun())
None
>>> sys.getrefcount(None)
4329
>>> print(fun())
None
>>> sys.getrefcount(None)
4327
>>> print(fun())
None
>>> sys.getrefcount(None)
4326
>>> while True:
... fun()
... 
Fatal Python error: deallocating None

Current thread 0x7fff7bf8 (most recent call first):
  File "", line 2 in 
Abort trap: 6
# exits with code 134 (SIGABRT)

I've attached the crash report generated by OS X. (It's a plain text file, 
despite the extension.)

Interestingly, this only happens with None. Other returned objects are 
refcounted correctly:

>>> thing = object()
>>> @FUNTYPE
... def otherfun():
... return thing
... 
>>> print(otherfun())

>>> sys.getrefcount(thing)
2
>>> print(otherfun())

>>> sys.getrefcount(thing)
2
>>> print(otherfun())

>>> sys.getrefcount(thing)
2

I could reproduce this on the following configurations:

* Python 3.8.0a4 (self-compiled from master branch: 
09532feeece39d5ba68a0d47115ce1967bfbd58e) on OS X 10.11 (x86_64)
* Python 3.7.3 (python.org installer) on OS X 10.11 (x86_64)
* Python 3.6.8 (from package manager) on Kubuntu 18.10 (x86_64)
* Python 3.5.3 (from package manager) on Raspbian Stretch (armv6)

--
components: ctypes
files: python3.8_2019-05-11-000251.crash
messages: 342141
nosy: dgelessus
priority: normal
severity: normal
status: open
title: Returning None from a callback with restype py_object decrements None's 
refcount too much
type: crash
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file48325/python3.8_2019-05-11-000251.crash

___
Python tracker 

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



[issue36810] Recursive type annotations do not work in documentation tests

2019-05-10 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
nosy: +gvanrossum, lukasz.langa

___
Python tracker 

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



[issue36876] Global C variables are a problem.

2019-05-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

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



[issue36879] bug with round() and "numpy floats"

2019-05-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
resolution:  -> not a bug
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



[issue36879] bug with round() and "numpy floats"

2019-05-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

round() delegates to class.__round__, so what's happening here is that numpy's 
float implements __round__ in a way it returns a float.

There is no restriction on what the class can return:

>>> class A:
... def __round__(self):
... return "Oh, no!"
...
>>> round(A())
'Oh, no!'

Making additional restrictions is backwards incompatible. Maybe we should add 
something in the docs regarding the no-restriction point.

--
nosy: +pablogsal

___
Python tracker 

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



[issue32587] Make REG_MULTI_SZ support PendingFileRenameOperations

2019-05-10 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain

2019-05-10 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

My mistake was not adding

--enable-framework=${HOME}/sandbox/src/python3.7/inst

to the configure script and then running

make
make install

(I know... read the README file)

gcc 8.3.0 doesn't like the Xcode system headers included by the .m files. I 
will dig into this now that I am using the proper build steps.

As a side note, I find it counter-intuitive that Mac/Makefile only gets invoked 
by 'make install' to build the Objective-C source files. IMHO they should be 
built by "make" and then installed by "make install". Forcing a build and 
install in one step can be dangerous and accidentally leave the system in an 
undesirable state when the build process fails with a partial install. Also, 
--enable-framework should use a subpath of --prefix by default for the 
framework installation instead of defaulting to /Library/Frameworks regardless 
of the --prefix setting.

--

___
Python tracker 

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



[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2019-05-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 09532feeece39d5ba68a0d47115ce1967bfbd58e by Victor Stinner in 
branch 'master':
bpo-36710: Add 'ceval' local variable to ceval.c (GH-12934)
https://github.com/python/cpython/commit/09532feeece39d5ba68a0d47115ce1967bfbd58e


--

___
Python tracker 

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



[issue32587] Make REG_MULTI_SZ support PendingFileRenameOperations

2019-05-10 Thread Zackery Spytz


Change by Zackery Spytz :


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



[issue34408] possible null pointer dereference in pystate.c

2019-05-10 Thread STINNER Victor


STINNER Victor  added the comment:

> I have backported the fix to 3.7 :)

Ok, thanks.

--

___
Python tracker 

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



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

2019-05-10 Thread STINNER Victor


STINNER Victor  added the comment:

> open O_RDONLY failed

Ah. That sounds like an issue on your machine or specific to AIX. I don't see 
what Python can do to support a platform where /dev/urandom doesn't work. 
Python really needs /dev/urandom at startup to initialize its "hash secret" to 
reduce the risk of DoS attack attack against dict.

https://python-security.readthedocs.io/vuln/cve-2012-1150_hash_dos.html

Maybe it's a permission issue. Maybe a libc issue. I don't know. But I suggest 
to close the issue and try to find help from AIX instead.

--

___
Python tracker 

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



[issue36345] Deprecate Tools/scripts/serve.py in favour of python -m http.server -d

2019-05-10 Thread STINNER Victor

STINNER Victor  added the comment:

Ok, thanks Berker for your longer answer. I have no opinion on this example 
anymore. Stéphane and others: I let you decide how to handle it ;-)

--

___
Python tracker 

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



[issue36818] Add PyInterpreterState.runtime.

2019-05-10 Thread STINNER Victor


STINNER Victor  added the comment:

Eric is working on a different approach: https://bugs.python.org/issue36854

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



[issue36867] Make semaphore_tracker track other system resources

2019-05-10 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset f22cc69b012f52882d434a5c44a004bc3aa5c33c by Antoine Pitrou 
(Pierre Glaser) in branch 'master':
bpo-36867: Make semaphore_tracker track other system resources (GH-13222)
https://github.com/python/cpython/commit/f22cc69b012f52882d434a5c44a004bc3aa5c33c


--

___
Python tracker 

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



[issue36879] bug with round() and "numpy floats"

2019-05-10 Thread Scaler


New submission from Scaler :

round()'s documentation 
(https://docs.python.org/3/library/functions.html#round) says that "The return 
value is an integer if ndigits is omitted or None."

Works well with "built-in floats", but not with "numpy floats" (didn't know 
they were different):
>>> import numpy as np
>>> round(5.5)
6
>>> round(np.round(5.5)-0.5)
6.0



As a side note, is there any reason why round() does not return value as an 
integer if ndigits is 0 or negative also?

--
messages: 342132
nosy: Scaler
priority: normal
severity: normal
status: open
title: bug with round() and "numpy floats"
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-10 Thread Michael Sullivan


Change by Michael Sullivan :


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

___
Python tracker 

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



[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-10 Thread Michael Blahay


Michael Blahay  added the comment:

PR 13203 has finally made it through all checks successfully and is now 
awaiting merging. Please someone pick it up and merge it. Thank you

--

___
Python tracker 

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



[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-10 Thread Michael Sullivan


New submission from Michael Sullivan :

Per discussion during the typing summit at PyCon, it would be a good idea to 
allow extra information to be included in `# type: ignore` comments, in order 
to allow behavior such as suppressing individual errors (for example, with 
syntax like `# type: ignore[E1000]`, to suppress error 1000).

My proposal, then, is to generalize the definition of type: ignore comments to 
be `# type: ignore followed by a non-alphanumeric character. Then `# type: 
ignore[E1000]` and `# type: ignore E1000` would be valid type ignore comments 
while `# type: ignoreE1000` would not be.

Now that ast.parse can parse type_comments, this needs to make it into 3.8, 
basically, if we want to do this and be able to use the ast type_comment 
feature.

Ideally, the text of the type ignore would be actually included in the produced 
AST. As a bare minimum first step, we need to recognize type ignores with extra 
information and report them (and, critically, not detect them as regular type 
comments and produce errors when they appear in unexpected places).

I'll put up a PR to do the second part shortly.

--
components: Interpreter Core
messages: 342130
nosy: gvanrossum, levkivskyi, msullivan
priority: normal
severity: normal
status: open
title: ast.parse with type_comments=True should allow extra text after # type: 
ignore
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



[issue36876] Global C variables are a problem.

2019-05-10 Thread Eric Snow


Eric Snow  added the comment:

Also, Tools/c-globals/ignored-globals.txt is a bit out of date (some vars have 
been removed, renamed, or moved to another file).  That should get cleaned up.  
It might also make sense to update check-c-globals.py to verify that all 
variables in ignored-globals.txt actually exist.

--

___
Python tracker 

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



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

2019-05-10 Thread Michael Blahay


Michael Blahay  added the comment:

Much detail has been provided regarding why the default is ignored when user 
the REMAINDER option. The desire to add an exception has not. Is there anyone 
that can provide guidance on whether the combination of:
1. Positional Argument 
2. nargs=REMAINDER
3. default=something  
should raise an exception upon execution of the add_argument method?

--

___
Python tracker 

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



[issue34408] possible null pointer dereference in pystate.c

2019-05-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 34ed40f2e56703de04241cbacb306113b59a84f9 by Pablo Galindo in 
branch '3.7':
[3.7] bpo-34408: Prevent a null pointer dereference and resource leakage in 
`PyInterpreterState_New()` (GH-8767) (GH-13237)
https://github.com/python/cpython/commit/34ed40f2e56703de04241cbacb306113b59a84f9


--

___
Python tracker 

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



[issue34408] possible null pointer dereference in pystate.c

2019-05-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I have backported the fix to 3.7 :)

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



[issue36877] [meta] Move fields from _PyRuntimeState to PyInterpreterState.

2019-05-10 Thread Eric Snow


Eric Snow  added the comment:

In conjunction with #36876, there are a bunch of currently ignored globals (in 
Tools/c-globals/ignored-globals.txt) that should actually be moved to 
per-interpreter runtime state.  This mostly applies to any globals that point 
to one or more objects, since objects must not be shared by interpreters.

--

___
Python tracker 

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



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

2019-05-10 Thread Michael Blahay


Michael Blahay  added the comment:

With the optional arguments, the determination about whether to use the default 
value is made based on whether the flag is present or not. When positional 
arguments are involved, the need for the defaults seems to in part be 
determined based on whether the argument exists. The fact that * and REMAINDER 
are zero-to-many in nature add some ambiguity into the situation. For the *, it 
seems that the positional argument only exists if there is at least one actual 
argument value that it can consume.

import argparse
parser = argparse.ArgumentParser()
parser.add_argument('foo', nargs=1,default=['none'])
#parser.add_argument('bar', nargs=argparse.REMAINDER,default=['nothing'])
parser.add_argument('baz', nargs='*', default=['nada'])
parser.parse_args('a b'.split())

Out[25]: Namespace(baz=['b'], foo=['a'])

import argparse
parser = argparse.ArgumentParser()
parser.add_argument('foo', nargs=1,default=['none'])
#parser.add_argument('bar', nargs=argparse.REMAINDER,default=['nothing'])
parser.add_argument('baz', nargs='*', default=['nada'])
parser.parse_args('a'.split())

Out[26]: Namespace(baz=['nada'], foo=['a'])

Mean while, the REMAINDER option makes the argument act as if it exists 
regardless of whether an actual argument value exists.

import argparse
parser = argparse.ArgumentParser()
parser.add_argument('foo', nargs=1,default=['none'])
parser.add_argument('bar', nargs=argparse.REMAINDER,default=['nothing'])
#parser.add_argument('baz', nargs='*', default=['nada'])
parser.parse_args('a b'.split())

Out[27]: Namespace(bar=['b'], foo=['a'])

import argparse
parser = argparse.ArgumentParser()
parser.add_argument('foo', nargs=1,default=['none'])
parser.add_argument('bar', nargs=argparse.REMAINDER,default=['nothing'])
#parser.add_argument('baz', nargs='*', default=['nada'])
parser.parse_args('a'.split())

Out[28]: Namespace(bar=[], foo=['a'])

To conclude, * and REMAINDER perform similar, but different, roles when used 
with positional arguments. With edge cases like the ones laid out above, it can 
be hard to conceptualize what the exact behavior should be. I will recommend 
that the documentation be updated to convey the following message: "When used 
with positional arguments, REMAINDER will never use the designated default 
value list. It will instead return an empty list if there are no values for the 
argument to consume. If the use of default values is desired, then * must be 
used."

--

___
Python tracker 

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



[issue34408] possible null pointer dereference in pystate.c

2019-05-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +13147

___
Python tracker 

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



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

2019-05-10 Thread Glenn Linderman


Change by Glenn Linderman :


--
nosy: +v+python

___
Python tracker 

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



[issue36810] Recursive type annotations do not work in documentation tests

2019-05-10 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

I think this is related to doc tests being executed in a namespace where the 
class definition is not available. I am not sure what is the best way here, a 
workaround is to explicitly pass the namespace, for example this passes:

import typing
  
def f(clazz, ns):
"""
>>> class MyClass:
...   my_field: 'MyClass'
>>> f(MyClass, globals())
"""
typing.get_type_hints(clazz, ns)

You can maybe make the ns parameter optional, but it still doesn't look like a 
good solution.

--
nosy: +levkivskyi

___
Python tracker 

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



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

2019-05-10 Thread Michael Blahay


Michael Blahay  added the comment:

Here is another take on the issue, this time illustrated through the lens of 
optional arguments.

import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--foo', nargs=1,default=['none'])
parser.add_argument('--baz', nargs='*', default=['nada'])
parser.add_argument('--bar', nargs=argparse.REMAINDER,default=['nothing'])
parser.parse_args('--foo a --bar b --baz c'.split())

Out[9]: Namespace(bar=['b', '--baz', 'c'], baz=['nada'], foo=['a'])

import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--foo', nargs=1,default=['none'])
parser.add_argument('--baz', nargs='*', default=['nada'])
parser.add_argument('--bar', nargs=argparse.REMAINDER,default=['nothing'])
parser.parse_args('--foo a --baz b --bar c'.split())

Out[10]: Namespace(bar=['c'], baz=['b'], foo=['a'])

import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--foo', nargs=1,default=['none'])
parser.add_argument('--baz', nargs='*', default=['nada'])
parser.add_argument('--bar', nargs=argparse.REMAINDER,default=['nothing'])
parser.parse_args([])

Out[11]: Namespace(bar=['nothing'], baz=['nada'], foo=['none'])

It is important to note that when an optional argument is not present then the 
default is always used, including for one using nargs=argparse.REMAINDER. In 
all three tests, bar is the argument using REMAIDER. In the first test, one can 
see that when bar isn't the last argument then anything else, including other 
arguments, are swept up as being arguments of bar. This greedy behavior for 
REMAINDER is something that * does not share (test 2).

--

___
Python tracker 

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



[issue36877] [meta] Move fields from _PyRuntimeState to PyInterpreterState.

2019-05-10 Thread Eric Snow


Eric Snow  added the comment:

FYI, I've already started some of this work:

* #36737 warnings
* #36854 gc
* #33608 pending calls
* #10915 & #15751 gilstate

Other bits I'm planning on:
* the rest of the global "ceval" state
* the memory allocators
* the GIL

Note that, to make the GIL per-interpreter, we can't have any remaining runtime 
state shared by interpreters (unless it is protected by its own locks).

--

___
Python tracker 

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



[issue36877] [meta] Move fields from _PyRuntimeState to PyInterpreterState.

2019-05-10 Thread Eric Snow


New submission from Eric Snow :

We have quite a bit of global state the runtime that effectively breaks the 
isolation between interpreters.  Some of it exists as "global" C variables (see 
#36876) and the rest as fields on _PyRuntimeState.  The offending state should 
be moved to PyInterpreterState.

See Include/internal/pycore_pystate.h for the _PyRuntimeState and 
PyInterpreterState structs.

--
assignee: eric.snow
components: Interpreter Core
messages: 342120
nosy: eric.snow, vstinner
priority: normal
severity: normal
status: open
title: [meta] Move fields from _PyRuntimeState to PyInterpreterState.
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



[issue36876] Global C variables are a problem.

2019-05-10 Thread Eric Snow


New submission from Eric Snow :

We still have a bunch of "global" C variables (static globals, static locals, 
maybe thread-local storage) in our code-base that break the isolation between 
interpreters.  I added Tools/c-globals/check-c-globals.py a while back to help 
identify such variables, however more have crept in.  I also did not take 
static locals or thread-locals into account.

To address the above, we should do the following:

1. update check-c-globals.py to identify static locals (and thread-locals)
2. deal with any identified globals
   * move them to _PyRuntimeState (or thread-locals to PyThreadState, etc.)
   * ignore them by adding them to Tools/c-globals/ignored-globals.txt
3. add check-c-globals.py to "make check"
4. (if "make check" isn't already there), ensure check-c-globals.py is run at 
some point in CI

Separately, we should move fields out of _PyRuntimeState into 
PyInterpreterState wherever possible.  That can also be done at step 2 if it's 
not too much work.

--
assignee: eric.snow
components: Interpreter Core
messages: 342119
nosy: eric.snow, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: Global C variables are a problem.
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



[issue36368] server process of shared_memory shuts down if KeyboardInterrupt

2019-05-10 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset d0d64ad1f5f1dc1630004091d7f8209546c1220a by Antoine Pitrou 
(Pierre Glaser) in branch 'master':
bpo-36368: Ignore SIGINT in SharedMemoryManager servers. (GH-12483)
https://github.com/python/cpython/commit/d0d64ad1f5f1dc1630004091d7f8209546c1220a


--

___
Python tracker 

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



[issue15987] Provide a way to compare AST nodes for equality recursively

2019-05-10 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

Btw, I am +1 on this feature (preferably with an option to check line, column, 
end line, and end column). I always wanted this, but never had time to actually 
implement this.

--
nosy: +levkivskyi

___
Python tracker 

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



[issue36338] urlparse of urllib returns wrong hostname

2019-05-10 Thread Pierre Glaser


Change by Pierre Glaser :


--
pull_requests: +13146

___
Python tracker 

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



[issue36084] Threading: add builtin TID attribute to Thread objects

2019-05-10 Thread Jake Tesler


Jake Tesler  added the comment:

The feature is supported on Windows: the file supporting Windows threading is 
`thread_nt.h`, not `thread_pthread.h` since Windows doesn't use POSIX-style 
threads.

Also it is different from threading.get_ident() - ident is a Python-issued 
unique identifier, TID is issued by the OS and is tracable system-wide.

--

___
Python tracker 

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



[issue30657] [security] CVE-2017-1000158: Unsafe arithmetic in PyString_DecodeEscape

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342086

___
Python tracker 

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



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

2019-05-10 Thread Michael Blahay


Michael Blahay  added the comment:

For the purpose of facilitating continuing conversation, here are two tests 
that contrast the use of * versus REMAINDER

import argparse
parser = argparse.ArgumentParser()
parser.add_argument('foo', nargs=1,default=['none'])
parser.add_argument('bar', nargs=argparse.REMAINDER,default=['nothing'])
parser.add_argument('baz', nargs='*', default=['nada'])
parser.parse_args('a b c'.split())

Out[7]: Namespace(bar=['b', 'c'], baz=['nada'], foo=['a'])

import argparse
parser = argparse.ArgumentParser()
parser.add_argument('foo', nargs=1,default=['none'])
parser.add_argument('baz', nargs='*', default=['nada'])
parser.add_argument('bar', nargs=argparse.REMAINDER,default=['nothing'])
parser.parse_args('a b c'.split())

Out[8]: Namespace(bar=[], baz=['b', 'c'], foo=['a'])

You can see that * and REMAINDER do differ in functionality when they are the 
last defined argument.

--

___
Python tracker 

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



[issue35647] Cookie path check returns incorrect results

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342091

___
Python tracker 

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



[issue33329] sigaddset() can fail on some signal numbers

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342090

___
Python tracker 

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



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

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342089

___
Python tracker 

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



[issue32072] Issues with binary plists

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342093

___
Python tracker 

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



[issue30730] [security] Injecting environment variable in subprocess on Windows

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342094

___
Python tracker 

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



[issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342095

___
Python tracker 

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



[issue34656] [CVE-2018-20406] memory exhaustion in Modules/_pickle.c:1393

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342084

___
Python tracker 

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



[issue30231] test_imaplib needs a TLS server accepting self-signed certificates

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342100

___
Python tracker 

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



[issue31036] building the python docs requires the blurb module

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342110

___
Python tracker 

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



[issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat)

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342099

___
Python tracker 

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



[issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342096

___
Python tracker 

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



[issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472)

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342087

___
Python tracker 

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



[issue32981] Catastrophic backtracking in poplib (CVE-2018-1060) and difflib (CVE-2018-1061)

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342092

___
Python tracker 

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



[issue30726] [Windows] Warnings in elementtree due to new expat

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342097

___
Python tracker 

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



[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342101

___
Python tracker 

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



[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342102

___
Python tracker 

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



[issue27945] Various segfaults with dict

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342104

___
Python tracker 

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



[issue33001] Buffer overflow vulnerability in os.symlink on Windows (CVE-2018-1000117)

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342103

___
Python tracker 

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



[issue36216] CVE-2019-9636: urlsplit does not handle NFKC normalization

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342088

___
Python tracker 

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



[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342109

___
Python tracker 

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



[issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342105

___
Python tracker 

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



[issue29572] Upgrade installers to OpenSSL 1.0.2k

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342106

___
Python tracker 

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



[issue35121] Cookie domain check returns incorrect results

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342111

___
Python tracker 

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



[issue30500] [security] urllib connects to a wrong host

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342098

___
Python tracker 

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



[issue26617] Assertion failed in gc with __del__ and weakref

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342107

___
Python tracker 

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



[issue30694] Update embedded copy of expat to 2.2.1

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342085

___
Python tracker 

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



[issue29169] update zlib to 1.2.11

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342113

___
Python tracker 

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



[issue32620] [3.5] Travis CI fails on Python 3.5 with "pyenv: version `3.5' not installed"

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342108

___
Python tracker 

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



[issue36512] future_factory argument for Thread/ProcessPoolExecutor

2019-05-10 Thread Stefan Hölzl

Stefan Hölzl  added the comment:

It would allow to use Futures with a customized interface for a specific domain.
e.g. to not only save the result of a task but also some context informations
or provide properties/methods which are result specific.

But when subclassing Future the builtin Thread/ProcessExecutor cannot be reused 
anymore, because
the returned class on submit cannot be customized to be the subclassed Future.

With my change it would be possible to customize the Future object returned by 
the Executor.

As it is now the Future class has to be wrapped and the Executor subclassed
to return a wrapped Future object. 
The Future object cannot be extended without completely wrapping it.

This change would make the Executor class more versatile.

It would allow something like this:

class CustomExecutor:
...

custom_executor = CustomExecutor()
custom_future = custom_executor.submit(workload, context=context_information)
...
assert custom_future.context_has_some_property()
assert custom_future.result_has_some_property()


factories are also used in other places in standard library:
logging.setLogFactory
asyncio.loop.set_task_factory

--

___
Python tracker 

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



[issue35746] [ssl][CVE-2019-5010] TALOS-2018-0758 Denial of Service

2019-05-10 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg342112

___
Python tracker 

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



[issue34128] Release GIL periodically in _pickle module

2019-05-10 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +pierreglaser

___
Python tracker 

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



[issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3

2019-05-10 Thread Ned Deily


Ned Deily  added the comment:


New changeset 86a713cb0c110b6798ca7f9e630fc511ee0a4028 by larryhastings (Victor 
Stinner) in branch '3.4':
[3.4][Security] bpo-30947, bpo-31170: Update expat from 2.2.1 to 2.2.4 (#3353)
https://github.com/python/cpython/commit/86a713cb0c110b6798ca7f9e630fc511ee0a4028


--

___
Python tracker 

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



[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2019-05-10 Thread Ned Deily


Ned Deily  added the comment:


New changeset 86a713cb0c110b6798ca7f9e630fc511ee0a4028 by larryhastings (Victor 
Stinner) in branch '3.4':
[3.4][Security] bpo-30947, bpo-31170: Update expat from 2.2.1 to 2.2.4 (#3353)
https://github.com/python/cpython/commit/86a713cb0c110b6798ca7f9e630fc511ee0a4028

New changeset 8b11e8de7aedacfbbcc8c780f3c4097396f1d1a3 by larryhastings (Victor 
Stinner) in branch '3.4':
[3.4] bpo-31170: Fix inclusion of expat in Windows build projects (#3785)
https://github.com/python/cpython/commit/8b11e8de7aedacfbbcc8c780f3c4097396f1d1a3


--

___
Python tracker 

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



[issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat)

2019-05-10 Thread Ned Deily


Ned Deily  added the comment:


New changeset f37b0cb230069481609b0bb06891b5dd26320504 by Barry Warsaw in 
branch '3.4':
bpo-25008: Deprecate smtpd and point to aiosmtpd (#274) (#280)
https://github.com/python/cpython/commit/f37b0cb230069481609b0bb06891b5dd26320504


--
nosy: +ned.deily

___
Python tracker 

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



  1   2   >