[issue24116] --with-pydebug has no effect when the final python binary is compiled

2019-04-10 Thread Inada Naoki


Inada Naoki  added the comment:

gcc is not compiler, but linker when `-o python`.
So LDFLAGS is used instead of CFLAGS.

I don't think we can document and maintain all configure & make behavior.
I'm +1 on close this.

--
nosy: +inada.naoki

___
Python tracker 

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



[issue33722] Document builtins in mock_open

2019-04-10 Thread Jay Crotts


Jay Crotts  added the comment:

No worries, I think all of your points make sense, especially number one after 
looking at the patch again. I looked at the docs again, and there is even an 
example of another built in being patched.

Thanks for taking the time to review it.

I'm okay with closing it if you don't think there is any value add.

--

___
Python tracker 

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



[issue36598] mock side_effect should be checked for iterable not callable

2019-04-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak
versions: +Python 3.8 -Python 2.7

___
Python tracker 

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



[issue36595] IDLE: Add search to Squeezed Output text viewer.

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



[issue33722] Document builtins in mock_open

2019-04-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

After looking at the context of the patch and thinking more about whether the 
patch is a good idea, I am reversing what I said before and think that this 
issue and the new patch (sorry) should be closed.

1. The new example duplicates the current example.  The only difference is that 
one module name,'__main__', is replaced with another, 'builtins'.  
Mechanically, there is no difference, so the duplicate adds nothing.

2. The current example, contrary to the claim, "'__main__'.open is replaced", 
adds .open to __main__ and thereby masks builtins.open in, and only in, 
__main__.  In use, '__main__' in all the current doc examples should be 
replaced by the name of the module where open is called.  This would usually, 
but not necessarily, be the module being tested. This is explained in the 
section on where to patch.

3. Touching builtins is generally a bad idea unless one really understands and 
wants to affect *all* modules in the process, including the test code and 
unittest code.  Beginners should *not* be encouraged to do this.  If one 
replaces a builtin needed by test code or other untested mdoules before the 
replacement is undone, one disables the test code.

The real problem, if any, with the mock examples, is that they usually do 
everything in one module (usually __main__) while real use involves code and 
execution in at least two modules.  Users are left to work out which examples 
lines belong in text_xyz, which would be in xyz, and what essential code is 
missing.

--

___
Python tracker 

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



[issue22377] %Z in strptime doesn't match EST and others

2019-04-10 Thread Ram Rachum


Change by Ram Rachum :


--
nosy:  -cool-RR

___
Python tracker 

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



[issue36598] mock side_effect should be checked for iterable not callable

2019-04-10 Thread Gregory Ronin


New submission from Gregory Ronin :

In mock.py, in method:
def _mock_call(_mock_self, *args, **kwargs):

There is a following piece of code:

if not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
if result is DEFAULT:
result = self.return_value
return result

ret_val = effect(*args, **kwargs)

This works correctly for iterables (such as lists) that are not defined as 
generators.
However, if one defined a generator as a function this would not work.

It seems like the check should be not for callable, but for iterable:

try:
iter(effect)
except TypeError:
# If not iterable then callable or exception
if _callable(effect):
ret_val = effect(*args, **kwargs)
else:
raise effect

else:  # Iterable
result = next(effect)
if _is_exception(result):
raise result
if result is DEFAULT:
result = self.return_value
return result

--
components: Tests
messages: 339923
nosy: jazzblue
priority: normal
severity: normal
status: open
title: mock side_effect should be checked for iterable not callable
type: behavior
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



[issue33722] Document builtins in mock_open

2019-04-10 Thread Jay Crotts


Change by Jay Crotts :


--
pull_requests: +12700

___
Python tracker 

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



[issue33722] Document builtins in mock_open

2019-04-10 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

The example looks like a good addition to me since mocking builtins.open is not 
documented for this use case. Please start a new PR.

--
nosy: +xtreak

___
Python tracker 

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



[issue36597] Travis CI: doctest failure

2019-04-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +mdk

___
Python tracker 

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



[issue36595] IDLE: Add search to Squeezed Output text viewer.

2019-04-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I agree.  The Squeezed Output Viewer is an instance of 
idlelib.textview.ViewWindow.  The latter is for read-only text and is also used 
for the text displays invoked from About IDLE.  I have already thought about 
making the text searchable.  Seaching does not require that the text be 
editable.

An initial implementatation might be a [Search] button that opens the current 
search dialog linked to the text in the window.

--
stage:  -> test needed
title: Text Search in Squeezed Output Viewer -> IDLE: Add search to Squeezed 
Output text viewer.

___
Python tracker 

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



[issue36597] Travis CI: doctest failure

2019-04-10 Thread STINNER Victor


New submission from STINNER Victor :

On my https://github.com/python/cpython/pull/12770 the doctest job of Travis CI 
failed with:

https://travis-ci.org/python/cpython/jobs/518572326

mkdir -p build
Building NEWS from Misc/NEWS.d with blurb
PATH=./venv/bin:$PATH sphinx-build -b doctest -d build/doctrees -D 
latex_elements.papersize= -q -W -j4 -W . build/doctest 
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: 
RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use 
ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: 
RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use 
ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: 
RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use 
ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: 
RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use 
ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: 
RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use 
ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: 
RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use 
ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: 
RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use 
ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: 
RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use 
ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
Warning, treated as error:
**
File "library/unittest.mock-examples.rst", line ?, in default
Failed example:
m.one().two().three()
Expected:

Got:
obj dead or exiting

Makefile:44: recipe for target 'build' failed
make[1]: *** [build] Error 2

--

I can reproduce this issue on Linux with:

$ cd Doc
$ make venv
$ PATH=./venv/bin:$PATH sphinx-build -b doctest -d build/doctrees -D 
latex_elements.papersize= -q -W -j4 -W . build/doctest 

I get random errors:

Warning, treated as error:
**
File "library/datetime.rst", line 686, in default
Failed example:
d.strftime("%A %d. %B %Y")
Expected:
'Monday 11. March 2002'
Got:
'lundi 11. mars 2002'

Warning, treated as error:
**
File "library/collections.rst", line 914, in default
Failed example:
p._asdict()
Expected:
{'x': 11, 'y': 22}
Got:
OrderedDict([('x', 11), ('y', 22)])

Warning, treated as error:
**
File "library/unittest.mock.rst", line ?, in default
Failed example:
mock.call_args.args
Expected:
(3, 4)
Got:
args


The virtual environment uses Sphinx 2.0.1. Can it be a change in Sphinx 2 
default configuration?

--
assignee: docs@python
components: Documentation
messages: 339919
nosy: docs@python, vstinner
priority: normal
severity: normal
status: open
title: Travis CI: doctest failure
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



[issue33722] Document builtins in mock_open

2019-04-10 Thread Jay Crotts


Jay Crotts  added the comment:

Yeah the PR had been stale for a while, and I re-based my fork without closing 
the PR, so when I pushed it to the fork it updated the PR reviewer list. Silly 
mistake by me, I should have made sure the diff wasn't huge before pushing it. 
I know review time is valuable and did not mean to waste it.

If you think it is a worthwhile change I'm happy to start over with another PR.

--

___
Python tracker 

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



[issue33722] Document builtins in mock_open

2019-04-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

My *guess* is that you created the branch for PR 7491 when your local master 
branch was months out of date.  Or you branched off of the 3.7 branch.  
Whatever, your patch proposed to revert recent changes to master, touching 
about 1000 files.  When you pushed the button on the github web page to compare 
and possibly make a PR, you should have seen a list of +- 1000 changes in the 
proposed PR, closed the window, deleted the branch on the fork and your 
repository, and started over with a new branch from freshly updated master.  
You are right that the review requests were automatic.  However, I am not sure 
how the 6 month delay factors into what happened.

Since Guido closed the PR rather than suggest fixing it further, I suggest that 
you start over as suggested above and look closely before pressing 'Create PR'. 
 It appears that you already deleted the branch from the fork.

>From my limited knowledge of how to use unitest.mock correctly, I agree that 
>the example looks plausible.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC

2019-04-10 Thread STINNER Victor


STINNER Victor  added the comment:

bpo-33803 bug can be reintroduced using the following patch:

diff --git a/Python/hamt.c b/Python/hamt.c
index 67af04c437..67da8ec22c 100644
--- a/Python/hamt.c
+++ b/Python/hamt.c
@@ -2478,8 +2478,10 @@ hamt_alloc(void)
 if (o == NULL) {
 return NULL;
 }
+#if 0
 o->h_count = 0;
 o->h_root = NULL;
+#endif
 o->h_weakreflist = NULL;
 PyObject_GC_Track(o);
 return o;

And then run:

./python -m test -v test_context

The best would be to also be able to catch the bug in:

./python -m test -v test_asyncio

Problem: Right now, my GC object debugger implementation is way too slow to use 
a threshold lower than 100, whereas the bug is catched like "immediately" using 
gc.set_threshold(5).

Maybe my implementation should be less naive: rather than always check *all* 
objects tracked by the GC, have different thresholds depending on the 
generation? Maybe reuse GC thresholds?

--

___
Python tracker 

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



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

2019-04-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +lars.gustaebel, serhiy.storchaka

___
Python tracker 

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



[issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC

2019-04-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12699

___
Python tracker 

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



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

2019-04-10 Thread Chris Siebenmann


New submission from Chris Siebenmann :

The easiest reproduction of this is:

import tarfile
tarfile.open("/dev/zero", "r:")

(If you use plain "r" you get a hang in attempted lzma decoding.)

I believe this is probably due to a missing 'elif self.offset == 0:' in the 
'except EOFHeaderError' exception handling case that almost all of the other 
exception handlers have.

This appears to be a very long standing issue based on the history of the code.

--
components: Library (Lib)
messages: 339915
nosy: cks
priority: normal
severity: normal
status: open
title: tarfile module considers anything starting with 512 bytes of zero bytes 
to be a valid tar file
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue36592] is behave different for integers in 3.6 and 3.7

2019-04-10 Thread Shane


Shane  added the comment:

Well, then I guess that explains it!  Still, like I said, I tend to shy away 
from features that require such a deep understanding of the implementation in 
order to avoid "gotchas".  "is" does have its uses, but for me they very very 
rarely come up.

--

___
Python tracker 

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



[issue36592] is behave different for integers in 3.6 and 3.7

2019-04-10 Thread Geraldo Xexeo


Geraldo Xexeo  added the comment:

"So 2**8 is a magic number, for whatever reason."

Actually, this is true. Accordingly to 
https://rushter.com/blog/python-integer-implementation/

"Optimization of commonly-used integers
Small integer objects in a range of -5 to 256 are always pre-allocated during 
initialization. Because Python integers are immutable, we can use them as 
singletons. Every time you need to create small integer instead of creating new 
object Python just points to already allocated one. Thereby it saves a lot of 
space and computation for commonly-used integers.

Interestingly enough, the PyLongObject structure takes at least 28 bytes for 
every allocated integer and therefore takes three times as much memory as a 
simple 64-bit C integer."

This are constants 

#define NSMALLPOSINTS   257
#define NSMALLNEGINTS   5

You can find the code in:

https://github.com/python/cpython/blob/master/Objects/longobject.c

--

___
Python tracker 

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



[issue22377] %Z in strptime doesn't match EST and others

2019-04-10 Thread Alex LordThorsen


Alex LordThorsen  added the comment:

It's been a while since I've committed a patch. Do I still upload a diff file 
here or should I open a PR for the doc changes on github?

--

___
Python tracker 

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



[issue36235] distutils.sysconfig.customize_compiler() overrides CFLAGS var with OPT var if CFLAGS env var is set

2019-04-10 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC

2019-04-10 Thread STINNER Victor


STINNER Victor  added the comment:

Do you think that a gc.is_object_debugger_enabled() function would be needed?

The tracemalloc module has 3 functions:

* start(), stop()
* is_tracing()

The faulthandler module has 3 functions:

* enable() / disable()
* is_enabled()

--

___
Python tracker 

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



[issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC

2019-04-10 Thread STINNER Victor


STINNER Victor  added the comment:

I modified my PR to reuse tp_traverse.

Inada-san: would you mind to review my change?

--

___
Python tracker 

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



[issue36593] Trace function interferes with MagicMock isinstance?

2019-04-10 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

On an initial guess this is the change that went through and using 
object.__delattr__(self, name) instead of super().__delattr__(name) restores 
the old behavior and there are no test case failures. But I still have to check 
the change and how it's related to set trace.


diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index 955af5d2b8..42fbc22e74 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -728,11 +728,10 @@ class NonCallableMock(Base):
 # not set on the instance itself
 return

-if name in self.__dict__:
-object.__delattr__(self, name)
-
 obj = self._mock_children.get(name, _missing)
-if obj is _deleted:
+if name in self.__dict__:
+super().__delattr__(name)
+elif obj is _deleted:
 raise AttributeError(name)
 if obj is not _missing:
 del self._mock_children[name]

--

___
Python tracker 

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



[issue36594] Undefined behavior due to incorrect usage of %p in format strings

2019-04-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36593] Trace function interferes with MagicMock isinstance?

2019-04-10 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

There are very few changes to mock.py on bisecting with the example in the 
report is d358a8cda75446a8e0b5d99149f709395d5eae19 the problem? I am surprised 
by the reason this commit leads to change in behavior with set trace.

➜  cpython git:(master) ✗ cat ../backups/bpo36593.py
import sys

def trace(frame, event, arg):
return trace

if len(sys.argv) > 1:
sys.settrace(trace)

from unittest.mock import MagicMock

class A:
pass

m = MagicMock(spec=A)
print("isinstance: ", isinstance(m, A))
➜  cpython git:(master) ✗ git checkout d358a8cda75446a8e0b5d99149f709395d5eae19 
Lib/unittest/mock.py
➜  cpython git:(master) ✗ ./python.exe ../backups/bpo36593.py 1
isinstance:  False
➜  cpython git:(master) ✗ git checkout 
d358a8cda75446a8e0b5d99149f709395d5eae19~1 Lib/unittest/mock.py
➜  cpython git:(master) ✗ ./python.exe ../backups/bpo36593.py 1
isinstance:  True

commit d358a8cda75446a8e0b5d99149f709395d5eae19
Author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
Date:   Mon Jan 21 01:37:54 2019 -0800

bpo-20239: Allow repeated deletion of unittest.mock.Mock attributes 
(GH-11629)

* Allow repeated deletion of unittest.mock.Mock attributes

* fixup! Allow repeated deletion of unittest.mock.Mock attributes

* fixup! fixup! Allow repeated deletion of unittest.mock.Mock attributes
(cherry picked from commit 222d303ade8aadf0adcae5190fac603bdcafe3f0)

Co-authored-by: Pablo Galindo 

--
nosy: +pablogsal

___
Python tracker 

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



[issue36594] Undefined behavior due to incorrect usage of %p in format strings

2019-04-10 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue36594] Undefined behavior due to incorrect usage of %p in format strings

2019-04-10 Thread Zackery Spytz


New submission from Zackery Spytz :

The attached PR fixes incorrect usages of %p in format strings.

--

___
Python tracker 

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



[issue36595] Text Search in Squeezed Output Viewer

2019-04-10 Thread Shane


New submission from Shane :

Would it be possible to enhance IDLE's new Squeezed Output Viewer (which I 
LOVE, btw), with a text search feature?  If I'm in a module's help 
documentation, I'm usually looking for something, and I often end up copying 
the text into notepad and searching for it there.  Seems like text search would 
be a useful feature.

Thanks for reading,

--
assignee: terry.reedy
components: IDLE
messages: 339906
nosy: Shane Smith, terry.reedy
priority: normal
severity: normal
status: open
title: Text Search in Squeezed Output Viewer
type: enhancement

___
Python tracker 

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



[issue36594] Undefined behavior due to incorrect usage of %p in format strings

2019-04-10 Thread Zackery Spytz


Change by Zackery Spytz :


--
components: Extension Modules, Interpreter Core
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: Undefined behavior due to incorrect usage of %p in format strings
versions: Python 2.7, 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



[issue36593] Trace function interferes with MagicMock isinstance?

2019-04-10 Thread Ned Batchelder


Change by Ned Batchelder :


--
keywords: +3.7regression

___
Python tracker 

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



[issue36593] Trace function interferes with MagicMock isinstance?

2019-04-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue36593] Trace function interferes with MagicMock isinstance?

2019-04-10 Thread Ned Batchelder


Ned Batchelder  added the comment:

This also affects Python 3.8.0a3

--

___
Python tracker 

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



[issue36592] is behave different for integers in 3.6 and 3.7

2019-04-10 Thread Shane


Shane  added the comment:

This is the sort of thing that makes me avoid "is" in favor of "==" for most 
applications.  Understanding when two objects point to the same memory requires 
a deeper understanding of the underlying code than I usually want to delve into.

Anyway, I find it interesting that for 3.7.3:
>>> a, b = 256, 256
>>> a is b
True

>>> a, b = 257, 257
>>> a is b
False


So 2**8 is a magic number, for whatever reason.  I'll be sticking with "=="...

--
nosy: +Shane Smith -eric.smith
type: behavior -> 

___
Python tracker 

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



[issue36593] Trace function interferes with MagicMock isinstance?

2019-04-10 Thread Ned Batchelder


New submission from Ned Batchelder :

In Python 3.7.3, having a trace function in effect while mock is imported 
causes isinstance to be wrong for MagicMocks.  I know, this sounds unlikely...


$ cat traced_sscce.py
# sscce.py
import sys

def trace(frame, event, arg):
return trace

if len(sys.argv) > 1:
sys.settrace(trace)

from unittest.mock import MagicMock

class A:
pass

m = MagicMock(spec=A)
print("isinstance: ", isinstance(m, A))

$ python3.7.2 traced_sscce.py
isinstance:  True

$ python3.7.2 traced_sscce.py 1
isinstance:  True

$ python3.7.2 -VV
Python 3.7.2 (default, Feb 17 2019, 16:54:12)
[Clang 10.0.0 (clang-1000.10.44.4)]

$ python3.7.3 traced_sscce.py
isinstance:  True

$ python3.7.3 traced_sscce.py 1
isinstance:  False

$ python3.7.3 -VV
Python 3.7.3 (default, Apr 10 2019, 10:27:53)
[Clang 10.0.0 (clang-1000.10.44.4)]


Note that if you move the mock import to before the settrace call, everything 
works fine.

--
components: Library (Lib)
files: traced_sscce.py
messages: 339903
nosy: nedbat
priority: normal
severity: normal
status: open
title: Trace function interferes with MagicMock isinstance?
versions: Python 3.7
Added file: https://bugs.python.org/file48260/traced_sscce.py

___
Python tracker 

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



[issue36592] is behave different for integers in 3.6 and 3.7

2019-04-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

Python makes no guarantee as to whether an identity test on integers would 
return True or False. You should not depend on the behavior in any particular 
version.

--
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue36235] distutils.sysconfig.customize_compiler() overrides CFLAGS var with OPT var if CFLAGS env var is set

2019-04-10 Thread miss-islington


miss-islington  added the comment:


New changeset d9b25a2627ff6f4e10d46b4de4fff941b63497c7 by Miss Islington (bot) 
in branch '3.7':
bpo-36235: Fix distutils test_customize_compiler() on macOS (GH-12764)
https://github.com/python/cpython/commit/d9b25a2627ff6f4e10d46b4de4fff941b63497c7


--
nosy: +miss-islington

___
Python tracker 

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



[issue36592] is behave different for integers in 3.6 and 3.7

2019-04-10 Thread Geraldo Xexeo


New submission from Geraldo Xexeo :

# When you run the program:
a,b=300,300
print(a is b)
#you get different results in 3.6 (True) and 3.7 (False)

--
components: Interpreter Core
files: testisbehavior.py
messages: 339900
nosy: Geraldo.Xexeo
priority: normal
severity: normal
status: open
title: is behave different for integers in 3.6 and 3.7
versions: Python 3.6, Python 3.7
Added file: https://bugs.python.org/file48259/testisbehavior.py

___
Python tracker 

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



[issue36235] distutils.sysconfig.customize_compiler() overrides CFLAGS var with OPT var if CFLAGS env var is set

2019-04-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12697

___
Python tracker 

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



[issue36235] distutils.sysconfig.customize_compiler() overrides CFLAGS var with OPT var if CFLAGS env var is set

2019-04-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a9bd8925c7fa50dd3cfab125b824ec192133ef49 by Victor Stinner in 
branch 'master':
bpo-36235: Fix distutils test_customize_compiler() on macOS (GH-12764)
https://github.com/python/cpython/commit/a9bd8925c7fa50dd3cfab125b824ec192133ef49


--

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2019-04-10 Thread STINNER Victor


STINNER Victor  added the comment:

Please stop adding more pull requests, I cannot review too many at the same 
time. I would prefer to have a limit of 4 open PRs. I don't propose to close 
existing ones. Just stop to add more :-)

--

___
Python tracker 

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



[issue1583] Patch for signal.set_wakeup_fd

2019-04-10 Thread Adam Olsen


Adam Olsen  added the comment:

signalmodule.c has a hack to limit it to the main thread.  Otherwise there's 
all sorts of platform-specific behaviour.

--

___
Python tracker 

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



[issue18564] Integer overflow in socketmodule

2019-04-10 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Michele Orrù,

Would you be interested in making a GitHub pull request for your patch?  Thanks!

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue36588] change sys.platform() to just "aix" for AIX

2019-04-10 Thread STINNER Victor


STINNER Victor  added the comment:

> However, I am less familiar with (where) the appropriate documentation is. A 
> pointer to the documentation is appreciated.

It would be nice to add a note to:

* https://docs.python.org/dev/whatsnew/3.8.html#changes-in-the-python-api
* https://docs.python.org/dev/library/sys.html#sys.platform

In the source code, there are the files:

* Doc/whatsnew/3.8.rst
* Doc/library/sys.rst

--

___
Python tracker 

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



[issue19770] NNTP.post broken

2019-04-10 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-04-10 Thread STINNER Victor


STINNER Victor  added the comment:

> Will this break something in the world other than our own test_xmlrpc test?  
> Probably. Do they have a right to complain about it?  Not one we need listen 
> to.

I understand. But. Can we consider that for old Python versions like Python 2.7 
and 3.5?

This change will be applied to all supported Python versions.

I recall that when Python 2.7 started to validate TLS certificate, the change 
broke some applications. Are these applications badly written? Yes! But well, 
"it worked well before". Sometimes, when you work in a private network, the 
security matters less, whereas it might be very expensive to fix a legacy 
application. At Red Hat, we developed a solution to let customers to opt-out 
from this fix (to no validate TLS certificates), because it is just too 
expensive for customers to fix their legacy code but they would like to be able 
to upgrade RHEL.

One option to not validate URLs is to downgrade Python, but I'm not sure that 
it's the best compromise :-/

--

___
Python tracker 

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



[issue36591] Should be a typing.UserNamedTuple

2019-04-10 Thread Terry Davis


New submission from Terry Davis :

There should be a builtin alias for `Type[NamedTuple]` so that library 
authors user-supplied `NamedTuple`s can properly type-check their code.

Here's a code sample that causes an issue in my IDE (PyCharm)


from typing import NamedTuple, Type

def fun(NT: NamedTuple, fill):
# Complains that NamedTuple is not callable
nt = NT(*fill)
return nt


UserNamedTuple = Type[NamedTuple]


def fun(NT: UserNamedTuple, fill):
# No complaints
nt = NT(*fill)
return nt



This could just be an issue with PyCharm (I don't use mypy), but the 
correct to annotate this is with a Type[NamedTuple], so I hope mypy 
et. al. wouldn't this as a special case...

--
components: Library (Lib)
messages: 339893
nosy: Terry Davis
priority: normal
severity: normal
status: open
title: Should be a typing.UserNamedTuple
type: enhancement

___
Python tracker 

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



[issue1222585] C++ compilation support for distutils

2019-04-10 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue1583] Patch for signal.set_wakeup_fd

2019-04-10 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> signal-safe is different from thread-safe

I know, but I think that other threads can receive signals too. So in that 
case, it needs to be signal-safe as well as thread-safe.

--

___
Python tracker 

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



[issue24116] --with-pydebug has no effect when the final python binary is compiled

2019-04-10 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

If this is a documentation issue on the build, then I think this issue should 
be moved to the devguide repo on GitHub.  I'm not sure if it's still unclear 
though, so maybe this could just be closed?

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue36590] Add Bluetooth RFCOMM Support for Windows

2019-04-10 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue36549] str.capitalize should titlecase the first character not uppercase

2019-04-10 Thread Kingsley McDonald


Kingsley McDonald  added the comment:

Thanks for clarifying all of that! I now have the patch and tests working 
locally. However, I'm not too sure what documentation needs to be changed for 
str.title. Should it specify that only the first letter of digraphs are 
capitalised, rather than the full character?
I sure hope I get the hang of this soon :-D

--

___
Python tracker 

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



[issue36555] PEP484 @overload vs. str/bytes

2019-04-10 Thread Guido van Rossum


Guido van Rossum  added the comment:

> Mypy already takes first overload for ambiguous arguments.

This is true, but it requires that the return types match (covariantly, IIUC) 
for the overlapping types. So you can have

@overload
def foo(x: int) -> int: ...
@overload
def foo(x: float) -> float: ...

But you can't have

@overload
def foo(x: int) -> str: ...
@overload
def foo(x: float) -> float: ...

(and the docs explain why -- search for "unsafe_func").

--

___
Python tracker 

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



[issue36590] Add Bluetooth RFCOMM Support for Windows

2019-04-10 Thread Greg Bowser


New submission from Greg Bowser :

socketmodule supports Bluetooth RFCOMM sockets for Linux. Given that winsock 
supports this under windows, it is possible to add windows support as well.

--
components: IO, Windows
messages: 339888
nosy: Greg Bowser, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Add Bluetooth RFCOMM Support for Windows
type: enhancement
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue36559] "import random" should import hashlib on demand (nor load OpenSSL)

2019-04-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset d914596a671c4b0f13641359cf43aa0d6fc05070 by Raymond Hettinger 
(Christian Heimes) in branch 'master':
bpo-36559: random module: optimize sha512 import (GH-12742)
https://github.com/python/cpython/commit/d914596a671c4b0f13641359cf43aa0d6fc05070


--

___
Python tracker 

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



[issue36559] "import random" should import hashlib on demand (nor load OpenSSL)

2019-04-10 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue30274] Make importlib.abc.ExtensionFileLoader.__init__() documentation match code

2019-04-10 Thread Brett Cannon


Brett Cannon  added the comment:

I realized another solution to this is to make the argument positional-only, 
then the name simply doesn't matter. Probably unnecessary breakage, though.

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



[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-04-10 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

> *Maybe* we need to provide a way to allow to pass junk characters in an URL? 
> (disable URL validation)

We should not do this in our http protocol stack code.  Anyone who _wants_ that 
is already intentionally violating the http protocol which defeats the entire 
purpose of our library and the parameter named "url".

Will this break something in the world other than our own test_xmlrpc test?  
Probably.  Do they have a right to complain about it?  Not one we need listen 
to.  Such code is doing something that was clearly an abuse of the API.  The 
parameter was named url not 
raw_data_to_stuff_subversively_into_the_binary_protocol.  Its intent was clear.

--

___
Python tracker 

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



[issue26389] Expand traceback module API to accept just an exception as an argument

2019-04-10 Thread Brett Cannon


Brett Cannon  added the comment:

Boy, having a postional-only parameter in that first position would have been 
handy when we created this API (as Matthias pointed out). :)

The 'exec' keyword-only parameter is obviously the safest option here.

Making the first parameter positional-only and then making the other parameters 
optional would lead to the most fluid API long-term as people I suspect would 
much rather just pass in an object than always specifying the keyword-only 
parameter every time going forward. I also doubt anyone is specifying etype by 
name.

So my vote is:

+1 to a positional-only first parameter
+0 to 'exc' keyword-only parameter

--

___
Python tracker 

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



[issue36586] multiprocessing.Queue.close doesn't behave as documented

2019-04-10 Thread Brett Cannon


Change by Brett Cannon :


--
components: +Library (Lib)
nosy: +davin, pitrou

___
Python tracker 

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



[issue36501] Remove POSIX.1e ACLs in tests that rely on default permissions behavior

2019-04-10 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

Given the downsides, I think the proposed solution as it's now is too hacky to 
be a net improvement.

"Skip mode_t checks" looks like the only way to go (since I've no idea how to 
"create temporary dirs" transparently for arbitrary test logic). But skipping 
tests defeats the purpose of a buildbot, so it's not a solution for the problem 
at hand.

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



[issue36589] Incorrect error handling in curses.update_lines_cols()

2019-04-10 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential)

2019-04-10 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

The problem i am fixing is merely making Python's logging library not the 
source of this deadlock because it was not the source in the past.  I am 
solving a regression in CPython behavior between 3.7.0 and 3.7.1 that led to a 
logging.Handler lock related deadlock in two identified problematic 
applications.

Breaking the logging.Handler owned locks does solve that unless someone has 
concrete proof from these specific applications that it does otherwise.

It would be helpful if someone *willing to actually be constructive* would test 
them with my PR's patch applied to their 3.7.3 interpreter as confirmation.

--

___
Python tracker 

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



[issue36589] Incorrect error handling in curses.update_lines_cols()

2019-04-10 Thread Zackery Spytz


New submission from Zackery Spytz :

update_lines_cols() returns 0 if an error occurs, but the generated AC code 
checks for a return value of -1.

--
components: Extension Modules
messages: 339881
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: Incorrect error handling in curses.update_lines_cols()
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



[issue36587] race in logging code when fork()

2019-04-10 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

yeah i saw that bug buried in there, this weakset goes away with my proposed PR.

--

___
Python tracker 

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



[issue36587] race in logging code when fork()

2019-04-10 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

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



[issue19770] NNTP.post broken

2019-04-10 Thread R. David Murray


R. David Murray  added the comment:

I do, and sure.  I won't be able to review it, though :(

--

___
Python tracker 

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



[issue36549] str.capitalize should titlecase the first character not uppercase

2019-04-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This issue is easy if you know C.

* Find the implementation of str.capitalize in unicodeobject.c and make it 
using the title case. See on the implementation of str.title for example.

* Find tests for str.capitalize and aďd new cases. Finding the proper place for 
test may be the hardest part.

* Update the documentation for str.capitalize. Add the versionchanged directive.

* Fix the documentation for str.title. Use str.capitalize in the example.

* Add the news and What's New entries.

--

___
Python tracker 

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



[issue24011] Add error checks to PyInit_signal()

2019-04-10 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


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



[issue34144] venv activate.bat reset codepage fails on windows 10

2019-04-10 Thread miss-islington


miss-islington  added the comment:


New changeset 6955d44b41058e3bcc59ff41860bd4cc8948c441 by Miss Islington (bot) 
(Lorenz Mende) in branch 'master':
bpo-34144: Fix of venv acvtivate.bat for win 10 (GH-8321)
https://github.com/python/cpython/commit/6955d44b41058e3bcc59ff41860bd4cc8948c441


--
nosy: +miss-islington

___
Python tracker 

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



[issue36475] PyEval_AcquireLock() and PyEval_AcquireThread() do not handle runtime finalization properly.

2019-04-10 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

@eric do we need any tests for this?

--

___
Python tracker 

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



[issue36346] Prepare for removing the legacy Unicode C API

2019-04-10 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue36579] test_venv: test_with_pip() hangs on PPC64 AIX 3.x

2019-04-10 Thread STINNER Victor


STINNER Victor  added the comment:

"I am looking into this - but as it seems to have gone away again - is
there a simple way to get that code back, and/or see what the diff is,
before/badrun/after?"

Maybe it's just a flacky test. It's hard to guess.

You can get the Git revision of a build by looking at details:

https://buildbot.python.org/all/#/builders/10/builds/2389
=> Properties: "got_revision: 8702b67dad62a9084f6c1823dce10653743667c8"

See also "Changes" tab.

Sometimes when a bug disappears, I just close it as "outdated" after a few 
weeks.

--

___
Python tracker 

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



[issue19770] NNTP.post broken

2019-04-10 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Hi David,

You wrote:
> It might be worth adding a post_message method, analogous to the send_message 
> method I added to smtplib.

Do you still think this would be worthwhile to add?  If so, do you think this 
would be a good task for someone to work on at the PyCon sprints?  Thanks!

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue1583] Patch for signal.set_wakeup_fd

2019-04-10 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue36579] test_venv: test_with_pip() hangs on PPC64 AIX 3.x

2019-04-10 Thread Michael Felt


Michael Felt  added the comment:

On 09/04/2019 18:51, STINNER Victor wrote:
> New submission from STINNER Victor :
>
> https://buildbot.python.org/all/#/builders/10/builds/2389
>
> 0:45:36 [412/420/1] test_venv crashed (Exit code 1)
> Timeout (0:15:00)!
> Thread 0x0001 (most recent call first):
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/subprocess.py",
>  line 987 in communicate
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/subprocess.py",
>  line 476 in run
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/subprocess.py",
>  line 396 in check_output
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/venv/__init__.py",
>  line 271 in _setup_pip
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/venv/__init__.py",
>  line 68 in create
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/venv/__init__.py",
>  line 373 in create
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_venv.py",
>  line 68 in run_with_capture
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_venv.py",
>  line 400 in do_test_with_pip
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_venv.py",
>  line 460 in test_with_pip
> ...
> Re-running test 'test_venv' in verbose mode
> test_defaults (test.test_venv.BasicTest) ... ok
> ...
> test_devnull (test.test_venv.EnsurePipTest) ... ok
> test_explicit_no_pip (test.test_venv.EnsurePipTest) ... ok
> test_no_pip_by_default (test.test_venv.EnsurePipTest) ... ok
> Timeout (0:15:00)!
> Thread 0x0001 (most recent call first):
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/selectors.py",
>  line 415 in select
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/subprocess.py",
>  line 1807 in _communicate
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/subprocess.py",
>  line 1000 in communicate
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_venv.py",
>  line 39 in check_output
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_venv.py",
>  line 428 in do_test_with_pip
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_venv.py",
>  line 460 in test_with_pip
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/case.py",
>  line 680 in run
>   File 
> "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/case.py",
>  line 740 in __call__
>   ...
> test_with_pip (test.test_venv.EnsurePipTest) ... Makefile:1139: recipe for 
> target 'buildbottest' failed
> make: *** [buildbottest] Error 1
> program finished with exit code 2
>
> --
> components: Tests
> messages: 339778
> nosy: David.Edelsohn, Michael.Felt, vstinner
> priority: normal
> severity: normal
> status: open
> title: test_venv: test_with_pip() hangs on PPC64 AIX 3.x
> versions: Python 3.8
>
> ___
> Python tracker 
> 
> ___
>
I am looking into this - but as it seems to have gone away again - is
there a simple way to get that code back, and/or see what the diff is,
before/badrun/after?

Michael

--

___
Python tracker 

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



[issue36588] change sys.platform() to just "aix" for AIX

2019-04-10 Thread Michael Felt

Michael Felt  added the comment:

On 10/04/2019 17:05, STINNER Victor wrote:
> STINNER Victor  added the comment:
>
> I like the idea. Would you like to propose a patch? I suggest to only make 
> such change in Python 3.8 and properly document it.
>
> --
> nosy: +vstinner
>
> ___
> Python tracker 
> 
> ___
>
If I understand correctly, the change should be quite simple:

diff --git a/configure.ac b/configure.ac
index 73ee71c..9632add 100644
--- a/configure.ac
+++ b/configure.ac
@@ -404,6 +404,7 @@ then
 MACHDEP="$ac_md_system$ac_md_release"

 case $MACHDEP in
+   aix*) MACHDEP="aix";;
    linux*) MACHDEP="linux";;
    cygwin*) MACHDEP="cygwin";;
    darwin*) MACHDEP="darwin";;

However, I am less familiar with (where) the appropriate documentation
is. A pointer to the documentation is appreciated.

--

___
Python tracker 

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



[issue1583] Patch for signal.set_wakeup_fd

2019-04-10 Thread Adam Olsen


Adam Olsen  added the comment:

signal-safe is different from thread-safe (despite conceptual similarities), 
but regardless it's been a long time since I last delved into this so I'm quite 
rusty.  I could be doing it all wrong.

--

___
Python tracker 

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



[issue36588] change sys.platform() to just "aix" for AIX

2019-04-10 Thread STINNER Victor


STINNER Victor  added the comment:

I like the idea. Would you like to propose a patch? I suggest to only make such 
change in Python 3.8 and properly document it.

--
nosy: +vstinner

___
Python tracker 

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



[issue36588] change sys.platform() to just "aix" for AIX

2019-04-10 Thread Michael Felt


New submission from Michael Felt :

This is something that probably shouts - boring - but back in 2012 it was a hot 
topic for linux2 and linux3.

Maybe - as far back as 1996 (when AIX4 was new) "aix3" and "aix4" made sense. 
Whether that is true, or not - is pointless these days - for Python3.

In the python code I have reviewed - for various reasons - I have never seen 
any code with "sys.platform() == "aixX" (where X is any of 5, 6, 7).

There was a reference to "aix3" and "aix4" in setup.py (recently removed, and 
there is no replacement for aix5, aix6, or aix7 - not needed!)

What I mostly see is sys.platform.startswith("aix"). The other form of the same 
test is sys.platform[:3] == 'aix'

sys.platform is "build" related, e.g., potentially bound to libc issues. Even 
if this was the case (AIX offers since 2007 - official binary compatibility 
from old to new (when libc is dynamically linked, not static linked), was 
"unofficial" for aix3 and aix4).

Yes, I am sure there are arguments along the line of "why change" since we have 
been updating it - always, and/or the documentation says so.

linux2 had to stay, because there was known code that compared with linux2 (and 
that code was having problems when python was built on linux3 - hence the 
change to make sys.platform return linux2 for all Python3.2 and younger).

FYI: in Cpython (master) there are no references to "aixX".

All the references there are (in .py) are:

michael@x071:[/data/prj/python/git/cpython-master]find . -name \*.py | xargs 
egrep "[\"']aix"
./Lib/asyncio/unix_events.py:if is_socket or (is_fifo and not 
sys.platform.startswith("aix")):
./Lib/ctypes/__init__.py:if _sys.platform.startswith("aix"):
./Lib/ctypes/util.py:elif sys.platform.startswith("aix"):
./Lib/ctypes/util.py:elif sys.platform.startswith("aix"):
./Lib/distutils/command/build_ext.py:elif sys.platform[:3] == 'aix':
./Lib/distutils/util.py:elif osname[:3] == "aix":
./Lib/sysconfig.py:elif osname[:3] == "aix":
./Lib/test/test_asyncio/test_events.py:if sys.platform.startswith("aix"):
./Lib/test/test_faulthandler.py:
@unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/test_strftime.py:or sys.platform.startswith(("aix", "sunos", 
"solaris"))):
./Lib/test/test_strptime.py:@unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/test_locale.py:@unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/test_locale.py:@unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/test_fileio.py:   not 
sys.platform.startswith(('sunos', 'aix')):
./Lib/test/test_tools/test_i18n.py:
@unittest.skipIf(sys.platform.startswith('aix'),
./Lib/test/test_wait4.py:if sys.platform.startswith('aix'):
./Lib/test/test_c_locale_coercion.py:elif sys.platform.startswith("aix"):
./Lib/test/test_shutil.py:AIX = sys.platform[:3] == 'aix'
./Lib/test/test_utf8_mode.py:elif sys.platform.startswith("aix"):

I'll write the patch - if I recall it should be a one-liner in configure.ac, 
but I think some discussion (or blessing) first is appropriate.

Maybe even review whether other platforms no longer rely on the X for the 
platform.

Hoping this helps!

--
components: Build
messages: 339869
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: change sys.platform() to just "aix" for AIX
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue19476] Add a dedicated specification for module "reloading" to the language reference

2019-04-10 Thread Eric Snow


Eric Snow  added the comment:

Thanks for checking in, Cheryl!

Clearly no one picked up this banner. :)  Furthermore, I'm not aware of any 
reload-related complaints coming from the community.  I know of only a couple 
major use cases for reload():  refresh parts of a running app during 
development and reload a config (e.g. SIGHUP).  Those use cases seem to be 
mostly stable.  Given ~4.5 years of zero activity here, I think it's safe to 
say nothing further is going to happen. :)

So I'm closing this issue.  At this point I don't see much value in keeping it 
open.  If someone later finds a concrete motivator for more detail about 
module-reloading in the language reference (or decide they want to drive this 
effort) then they can re-open this issue (or create a new one) at that point.

--
resolution:  -> rejected
stage: needs patch -> 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



[issue36587] race in logging code when fork()

2019-04-10 Thread SilentGhost


Change by SilentGhost :


--
nosy: +gregory.p.smith, vinay.sajip
type: crash -> behavior

___
Python tracker 

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



[issue19476] Add a dedicated specification for module "reloading" to the language reference

2019-04-10 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Hi Eric, 

Is this still a concern since PEP 451 has been implemented for over 5 years now?

Thanks!

--
nosy: +cheryl.sabella -BreamoreBoy

___
Python tracker 

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



[issue36587] race in logging code when fork()

2019-04-10 Thread cagney


New submission from cagney :

Buried in issue36533; it should probably be turned into a test case.


Exception ignored in: 
Traceback (most recent call last):
  File "/home/python/v3.7.3/lib/python3.7/logging/__init__.py", line
269, in _after_at_fork_weak_calls
_at_fork_weak_calls('release')
  File "/home/python/v3.7.3/lib/python3.7/logging/__init__.py", line
254, in _at_fork_weak_calls
for instance in _at_fork_acquire_release_weakset:
  File "/home/python/v3.7.3/lib/python3.7/_weakrefset.py", line 60, in __iter__
for itemref in self.data:
RuntimeError: Set changed size during iteration

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/home/python/v3.7.3/lib/python3.7/threading.py", line 917, in
_bootstrap_inner
self.run()
  File "/home/python/v3.7.3/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
  File "./btc.py", line 11, in lockie
h = logging.Handler()
  File "/home/python/v3.7.3/lib/python3.7/logging/__init__.py", line
824, in __init__
self.createLock()
  File "/home/python/v3.7.3/lib/python3.7/logging/__init__.py", line
847, in createLock
_register_at_fork_acquire_release(self)
  File "/home/python/v3.7.3/lib/python3.7/logging/__init__.py", line
250, in _register_at_fork_acquire_release
_at_fork_acquire_release_weakset.add(instance)
  File "/home/python/v3.7.3/lib/python3.7/_weakrefset.py", line 83, in add
self._commit_removals()
  File "/home/python/v3.7.3/lib/python3.7/_weakrefset.py", line 56, in
_commit_removals
discard(l.pop())
IndexError: pop from empty list

--
components: Library (Lib)
files: btc.py
messages: 339866
nosy: cagney
priority: normal
severity: normal
status: open
title: race in logging code when fork()
type: crash
versions: Python 3.7
Added file: https://bugs.python.org/file48258/btc.py

___
Python tracker 

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



[issue30612] Unusual Windows registry path syntax

2019-04-10 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

@chrullrich, were you still interested in creating a PR for this?  Thanks!

--
nosy: +cheryl.sabella
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential)

2019-04-10 Thread cagney


cagney  added the comment:

BTW, non-visible change might be to use a global readers-writer lock where 
fork() is the writer.

https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock

--

___
Python tracker 

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



[issue24011] Add error checks to PyInit_signal()

2019-04-10 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
stage: patch review -> needs patch
versions: +Python 3.7, Python 3.8 -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



[issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential)

2019-04-10 Thread cagney


cagney  added the comment:

> nope.  the contrived emit() pseudocode from msg339650 never defined b in the 
> first place.  that code, if massaged into python syntax would raise an 
> UnboundLocalError no matter who executed it.  a fork() from another thread 
> would not change that.  There is no concept of undefined/uninitialized state 
> from the Python perspective.

Wow!  It is pseudo code, right? (I figured using Ada like attributes was a bit 
of a giveaway).  Nitpicking it achieves nothing (if you feel that your language 
needs 'b' pre-defined then, hey!, pre-define it; I'm pretty sure that won't fix 
the problem of operations such b[i] = 2 not being atomic yet alone thread-safe 
in Python).

Lets instead focus on my point that breaking the locks won't fix the problem.  
For instance, above.  Or "For instance, if the fork() happens while a thread is 
holding the  FILE lock on a log file, then the child trying to access 
that FILE will hang."

--

___
Python tracker 

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



[issue21318] sdist fails with symbolic links do non-existing files

2019-04-10 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

This was fixed under issue 12885.

--
nosy: +cheryl.sabella
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> distutils.filelist.findall() fails on broken symlink in Py2.x

___
Python tracker 

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



[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-04-10 Thread STINNER Victor


STINNER Victor  added the comment:

Since this issue has a long history and previously attempts to fix it failed, 
it seems like the Internet is a black or white world, more like a scale of 
gray... *Maybe* we need to provide a way to allow to pass junk characters in an 
URL? (disable URL validation)

Idea: add an optional parameter to urllib, httplib, maybe also ftplib, to allow 
arbitrary "invalid" URLs / FTP commands. It would be a parameter *per request*, 
not a global option.

I don't propose to have a global configuration option like an environment 
variable, urllib attribute or something else. A global option would be hard to 
control and would impact just too much code.

My PEP 433 has been rejected because of the sys.setdefaultcloexec(cloexec: 
bool) function which allowed to change globally the behavior of Python. The PEP 
446 has been accepted with no *global* option to opt-in for the old behavior, 
but only "local" *per file descriptor*: os.set_inheritable(fd, inheritable).

--

___
Python tracker 

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



[issue36346] Prepare for removing the legacy Unicode C API

2019-04-10 Thread Inada Naoki


Inada Naoki  added the comment:

I think these ABI incompatible options are used many people.
But it is helpful to find extensions which using legacy APIs before Python 3.10 
is released.

I had found ujson and MarkupSafe used legacy APIs.  I fixed MarkupSafe.
I don't care ujson because it is wrapper of wchar_t based C library
and there are enough json libraries.

I suppose there are some other packages in PyPI, but I'm not sure.

--

___
Python tracker 

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



[issue36235] distutils.sysconfig.customize_compiler() overrides CFLAGS var with OPT var if CFLAGS env var is set

2019-04-10 Thread STINNER Victor


STINNER Victor  added the comment:

Good, my change fixed x86-64 High Sierra 2.7 buildbot:
https://buildbot.python.org/all/#/builders/140/builds/216

I wrote PR 12764 to forward-port the fix to the master branch.

--

___
Python tracker 

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



[issue36235] distutils.sysconfig.customize_compiler() overrides CFLAGS var with OPT var if CFLAGS env var is set

2019-04-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12692

___
Python tracker 

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



[issue36549] str.capitalize should titlecase the first character not uppercase

2019-04-10 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential)

2019-04-10 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue34698] urllib.request.Request.set_proxy doesn't (necessarily) replace type

2019-04-10 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +orsenthil
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



[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-04-10 Thread STINNER Victor


STINNER Victor  added the comment:

> According to the following message, urllib3 is also vulnerable to HTTP Header 
> Injection: (...)

And the issue has been reported to urllib3:
https://github.com/urllib3/urllib3/issues/1553

Copy of the first message:

"""
At https://bugs.python.org/issue36276 there's an issue in Python's urllib that 
an attacker controlling the request parameter can inject headers by injecting 
CR/LF chars.

A commenter mentions that the same bug is present in urllib3:
https://bugs.python.org/issue36276#msg337837

So reporting it here to make sure it gets attention.
"""

--

___
Python tracker 

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



[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-04-10 Thread STINNER Victor


STINNER Victor  added the comment:

bpo-36276 has been marked as a duplicate of this issue.

According to the following message, urllib3 is also vulnerable to HTTP Header 
Injection:
https://bugs.python.org/issue36276#msg337837

Copy of Alvin Chang's msg337837:

"""
I am also seeing the same issue with urllib3 

import urllib3

pool_manager = urllib3.PoolManager()

host = "localhost:?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
url = "http://; + host + ":8080/test/?test=a"

try:
info = pool_manager.request('GET', url).info()
print(info)
except Exception:
pass

nc -l localhost 
GET /?a=1 HTTP/1.1
X-injected: header
TEST: 123:8080/test/?test=a HTTP/1.1
Host: localhost:
Accept-Encoding: identity
"""

--

___
Python tracker 

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



[issue31226] shutil.rmtree fails when target has an internal directory junction (Windows)

2019-04-10 Thread Vidar Fauske


Vidar Fauske  added the comment:

I think the submitted PR could need a pair of eyes now. I've sorted the merge 
conflicts, and addressed the previous review points by eryksun.

--

___
Python tracker 

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



  1   2   >