[issue34084] possible free statically allocated string in compiler when easter egg on

2018-07-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7795

___
Python tracker 

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



[issue34084] possible free statically allocated string in compiler when easter egg on

2018-07-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PR 8262 fixes the intended setting of error message for the "Barry as BDFL" 
easter egg.

>>> from __future__ import barry_as_FLUFL
>>> 1 != 2
  File "", line 1
1 != 2
   ^
SyntaxError: with Barry as BDFL, use '<>' instead of '!='

But there is other problem. As was exposed in the private communication with 
Victor and Barry, this easter egg works only in REPL (or if explicitly pass 
__future__.CO_FUTURE_BARRY_AS_BDFL to compile()). I'll try to fix this too.

--

___
Python tracker 

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



[issue34101] PyBuffer_GetPointer() not documented

2018-07-12 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
assignee: docs@python
components: Documentation
nosy: docs@python, pitrou, skrah
priority: normal
severity: normal
status: open
title: PyBuffer_GetPointer() not documented
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue34093] Reproducible pyc: FLAG_REF is not stable.

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

According to Serhiy Storchaka, currently marshal.dumps() writes frozenset in 
arbitrary order, and so frozenset serialization is not reproducible:
https://mail.python.org/pipermail/python-dev/2018-July/154604.html

--
nosy: +vstinner

___
Python tracker 

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



[issue34093] Reproducible pyc: FLAG_REF is not stable.

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

What is the time spent in marshal.dumps() at Python startup when Python has to 
create all .pyc files? For example "./python -c pass" in the master branch with 
no external dependency? My question is if the PR makes Python startup 5% slower 
or less than 1% slower.

--

___
Python tracker 

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



[issue34084] possible free statically allocated string in compiler when easter egg on

2018-07-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The problem is that 'from __future__ import' is parsed after converting the 
sources to the AST. But this flag affects the behavior of the tokenizer, before 
an AST is created.

--

___
Python tracker 

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



[issue34100] Same integers in a tuple of constant literals are not merged

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

Honestly, I don't think that it's a bug. We might enhance Python 3.8 to reduce 
constants duplication, but there is no need to "fix" Python 3.7.

--

___
Python tracker 

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



[issue34093] Reproducible pyc: FLAG_REF is not stable.

2018-07-12 Thread INADA Naoki


INADA Naoki  added the comment:

> STINNER Victor  added the comment:
>
> According to Serhiy Storchaka, currently marshal.dumps() writes frozenset in 
> arbitrary order, and so frozenset serialization is not reproducible:
> https://mail.python.org/pipermail/python-dev/2018-July/154604.html

PYTHONHASHSEED can be used to stable frozenset order.

On the other hand, refcnt based approach is more unstable.
Even when x is y, dumps(x) == dumps(y) is not guaranteed.

--

___
Python tracker 

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



[issue34093] Reproducible pyc: FLAG_REF is not stable.

2018-07-12 Thread INADA Naoki


INADA Naoki  added the comment:

> STINNER Victor  added the comment:
>
> What is the time spent in marshal.dumps() at Python startup when Python has 
> to create all .pyc files? For example "./python -c pass" in the master branch 
> with no external dependency? My question is if the PR makes Python startup 5% 
> slower or less than 1% slower.

When startup, Python does more than compile()+marshal.dumps().
And as I wrote above, it makes compile()+marshal.dumps() only 4% slower.
So startup must not be slower than 4%.

Additionally, it happens only once if pyc can be writable.
(I don't know if marshal.dumps() is called when open(cache_path, 'wb') failed)

--

___
Python tracker 

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



[issue34100] Same constants in tuples are not merged while compile()

2018-07-12 Thread INADA Naoki


Change by INADA Naoki :


--
title: Same integers in a tuple of constant literals are not merged -> Same 
constants in tuples are not merged while compile()

___
Python tracker 

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



[issue34093] Reproducible pyc: FLAG_REF is not stable.

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

> So startup must not be slower than 4%.

I know. But Python does more than compile()+dumps() at the first run. I'm 
curious if it is feasible to measure this cost. But it may be hard to get 
reliable benchmarks, since I expect that the difference will be very small, and 
I know very well that measuring Python startup is hard since it depends a lot 
of on the filesystem which is hard to measure.

--

___
Python tracker 

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



[issue33716] test_concurrent_futures.test_crash() failed on x86 Windows7 3.7

2018-07-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7796

___
Python tracker 

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



[issue33716] test_concurrent_futures.test_crash() failed on x86 Windows7 3.7

2018-07-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7797

___
Python tracker 

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



[issue33716] test_concurrent_futures.test_crash() failed on x86 Windows7 3.7

2018-07-12 Thread miss-islington


miss-islington  added the comment:


New changeset b89776fb1b000f73a62850bea78e5b3434bd7e9a by Miss Islington (bot) 
in branch '3.7':
bpo-33716, test_concurrent_futures: increase timeout (GH-7828)
https://github.com/python/cpython/commit/b89776fb1b000f73a62850bea78e5b3434bd7e9a


--
nosy: +miss-islington

___
Python tracker 

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



[issue33716] test_concurrent_futures.test_crash() failed on x86 Windows7 3.7

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8df4770e8d2c9ebd49c5e4d073eef3a5bc805cfc by Victor Stinner in 
branch '3.6':
bpo-33716, test_concurrent_futures: increase timeout (GH-7828) (GH-8264)
https://github.com/python/cpython/commit/8df4770e8d2c9ebd49c5e4d073eef3a5bc805cfc


--

___
Python tracker 

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



[issue33716] test_concurrent_futures.test_crash() failed on x86 Windows7 3.7

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

The issue has been working around by increasing the timeout from 1 minute to 5 
minutes.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6, Python 3.8

___
Python tracker 

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



[issue34087] django: segmentation fault on garbage collection in visit_decref()

2018-07-12 Thread INADA Naoki


INADA Naoki  added the comment:

Would you provide list of extension modules?
What happens when removing some of them?

--

___
Python tracker 

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



[issue34037] test_asyncio: test_run_in_executor_cancel() leaked a dangling thread on AMD64 FreeBSD 10.x Shared 3.7

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

It's easy to reproduce the issue on Linux:

diff --git a/Lib/test/test_asyncio/test_events.py 
b/Lib/test/test_asyncio/test_events.py
index 11cd950df1..df4c2b9849 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -359,7 +359,7 @@ class EventLoopTestsMixin:
 called = True
 
 def run():
-time.sleep(0.05)
+time.sleep(1.0)
 
 f2 = self.loop.run_in_executor(None, run)
 f2.cancel()


The problem is that BaseEventLoop.close() shutdowns its default executor  
without waiting:

def close(self):
...
executor = self._default_executor
if executor is not None:
self._default_executor = None
executor.shutdown(wait=True)

I fixed a similar issue in socketserver:

* bpo-31233: for socketserver.ThreadingMixIn
* bpo-31151: for socketserver.ForkingMixIn 
* bpo-33540: add block_on_close attr to socketserver

I suggest to wait by default, but maybe also add a block_on_close attribute to 
BaseEventLoop (default: False) just for backward compatibility.

What do you think Yury, Andrew, and Guido?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads

2018-07-12 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_asyncio: test_run_in_executor_cancel() leaked a dangling thread on 
AMD64 FreeBSD 10.x Shared 3.7 -> asyncio: BaseEventLoop.close() shutdowns the 
executor without waiting causing leak of dangling threads

___
Python tracker 

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



[issue33911] [EASY] test_docxmlrpc fails when run with -Werror

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

> Slightly off topic but while trying to look at the code I can see a space 
> between function name and parenthesis as below. (...)

Usually we don't accept changes which only changes the coding style. One reason 
is to keep a simple history in Git.

--

___
Python tracker 

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



[issue33965] [Windows WSL] Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time, after year 2038

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

Petter S: If you don't provide further information, I will close the issue in 
one week.

I tried all possible ways to compile Python on Windows and I failed to 
reproduce the bug. I'm not saying that there is no bug, just that the bug 
cannot fixed it if I fail to reproduce it.

--

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-12 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

The following test failed:

# thread_time() should include CPU time spent in current thread...
start = time.thread_time()
busy_wait(0.100)
stop = time.thread_time()
self.assertGreaterEqual(stop - start, 0.020)  # machine busy?

def busy_wait(duration):
deadline = time.monotonic() + duration
while time.monotonic() < deadline:
pass

Do we really have to have functional tests on Python block functions? These 
tests seem very fragile...

I proposed the PR 8265 to remove these fragile tests.

I chose to keep time.process_time() functional test. We can remove it later if 
it starts failing on a buildbot.

--

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-12 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch, patch
pull_requests: +7798, 7799
stage:  -> patch review

___
Python tracker 

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



[issue33073] Add as_integer_ratio() to int() objects

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

I remove the "easy (C)" keyword since the feature seems  to be controversal (at 
least, not so easy).

--
nosy: +vstinner

___
Python tracker 

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



[issue33965] [Windows WSL] Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time, after year 2038

2018-07-12 Thread Petter S


Petter S  added the comment:

Makes sense. I fail to reproduce it myself. :-(

--

___
Python tracker 

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



[issue15670] PEP 3121, 384 Refactoring applied to ssl module

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

Honestly, the ssl module is complex, and the conversion to PEP 3121 and PEP 384 
are not straighforward, so I removed the "easy (C)" keyword.

--
keywords:  -easy (C)
nosy: +vstinner

___
Python tracker 

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



[issue32560] inherit the py launcher's STARTUPINFO

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

"inherit the py launcher's STARTUPINFO"

I read the issue twice, and honestly I have no idea how to implement that. So I 
removed the "easy (C)" keyword.

If you still consider that it's an "easy (C)" issue, please describe step by 
step how to implement it:

* which files should be modified?
* which function can be used?
* how is STARTUPINFO supposed by inherited?
* do you want to expose STARTUPINFO at Python level?

If you plan to use a pipe, it's tricky to make sure that the pipe is closed 
properly on both sides once STARTUPINFO is transferred.

--
nosy: +vstinner

___
Python tracker 

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



[issue33965] [Windows WSL] Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time, after year 2038

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, no problem, I close the issue.

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



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-12 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Will you make a PR or shall I try to fix this?

--
nosy: +lys.nikolaou

___
Python tracker 

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



[issue34102] local variable 'parts' referenced before assignment in feedparser in email module

2018-07-12 Thread Sagi (Sergey) Shnaidman


New submission from Sagi (Sergey) Shnaidman :

sudo pip install ansible-lint
Requirement already satisfied: ansible-lint in /usr/lib/python2.7/site-packages 
(3.4.21)
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/_internal/basecommand.py", line 
228, in main
status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/_internal/commands/install.py", 
line 291, in run
resolver.resolve(requirement_set)
  File "/usr/lib/python2.7/site-packages/pip/_internal/resolve.py", line 103, 
in resolve
self._resolve_one(requirement_set, req)
  File "/usr/lib/python2.7/site-packages/pip/_internal/resolve.py", line 262, 
in _resolve_one
check_dist_requires_python(dist)
  File "/usr/lib/python2.7/site-packages/pip/_internal/utils/packaging.py", 
line 46, in check_dist_requires_python
feed_parser.feed(metadata)
  File "/usr/lib64/python2.7/email/feedparser.py", line 178, in feed
self._input.push(data)
  File "/usr/lib64/python2.7/email/feedparser.py", line 99, in push
print(parts)
UnboundLocalError: local variable 'parts' referenced before assignment

pip2 --version
pip 10.0.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)

--
components: email
messages: 321544
nosy: barry, r.david.murray, sshnaidm
priority: normal
severity: normal
status: open
title: local variable 'parts' referenced before assignment in feedparser in 
email module
type: crash
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



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

If someone writes a PR, I can review it ;-)

--

___
Python tracker 

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



[issue34102] local variable 'parts' referenced before assignment in feedparser in email module

2018-07-12 Thread Sagi (Sergey) Shnaidman


Change by Sagi (Sergey) Shnaidman :


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

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7802

___
Python tracker 

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



[issue32560] inherit the py launcher's STARTUPINFO

2018-07-12 Thread Steve Dower


Steve Dower  added the comment:

The "for example" line is the fix, it really is very simple. That said, we have 
no automatic validation for the launcher, and coming up with a good set of 
manual tests to check it is certainly not easy.

--

___
Python tracker 

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



[issue34102] local variable 'parts' referenced before assignment in feedparser in email module

2018-07-12 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Hi,

I couldn't see the print statement in Lib/email/feedparser.py with latest 2.7 
branch and also `git log -p Lib/email/feedparser.py | grep print` doesn't 
return me anything. `pip install ansible-lint` also works fine with Python 2.7. 
I think this statement was added by mistake for debugging by the developer 
before `parts = data.splitlines(True)`. Can you please point me to the commit 
where the print statement was added or a test case to reproduce this?

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7803

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d6345def68d3a0227253da26213dadb247f786db by Victor Stinner in 
branch 'master':
bpo-33723: Fix test_time.test_thread_time() (GH-8267)
https://github.com/python/cpython/commit/d6345def68d3a0227253da26213dadb247f786db


--

___
Python tracker 

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



[issue32560] [EASY C] inherit the py launcher's STARTUPINFO

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

Ah, so the task is just open PC/launcher.c and replaced "si.cb = sizeof(si)" 
with "GetStartupInfoW(&si)".

Ok, I agree, that's easy and I would be happy to review such PR ;-) I add  the 
"[EASY C]" tag to the issue title in this case.

--
title: inherit the py launcher's STARTUPINFO -> [EASY C] inherit the py 
launcher's STARTUPINFO

___
Python tracker 

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



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

I removed the easy keyword from this issue: it's open since 2005, it has 12 
patches and 1 PR attached, and a lot of discussion.

--
nosy: +vstinner

___
Python tracker 

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



[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

Is this issue a regression of Python 3? red/256 gave an integer on Python 2?

--
nosy: +vstinner

___
Python tracker 

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



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-07-12 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> third party
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



[issue33687] uu.py calls os.path.chmod which doesn't exist

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

Is there really an use case which requires to set the permission of the file 
created by uu.decode()? It is already possible to call uu.decode() with an open 
file which has been created with the expected permission. Moreover, it's also 
possible to explicitly call chmod() *after* uu.decode().

I would suggest to deprecate the mode parameter in Python 3.7 and remove it 
from Python 3.8.

--

___
Python tracker 

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



[issue34102] local variable 'parts' referenced before assignment in feedparser in email module

2018-07-12 Thread Sagi (Sergey) Shnaidman


Sagi (Sergey) Shnaidman  added the comment:

@xtreak , sorry, you're right, I pasted a wrong traceback.
This is original traceback:

Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 346, in 
run
requirement_set.prepare_files(finder)
  File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in 
prepare_files
ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 666, in 
_prepare_file
check_dist_requires_python(dist)
  File "/usr/lib/python2.7/site-packages/pip/utils/packaging.py", line 48, in 
check_dist_requires_python
feed_parser.feed(metadata)
  File "/usr/lib64/python2.7/email/feedparser.py", line 177, in feed
self._input.push(data)
  File "/usr/lib64/python2.7/email/feedparser.py", line 99, in push
parts = data.splitlines(True)
AttributeError: 'NoneType' object has no attribute 'splitlines'


And I pasted by mistake the one I used to debug.

--

___
Python tracker 

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



[issue33687] uu.py calls os.path.chmod which doesn't exist

2018-07-12 Thread Poul-Henning Kamp


Poul-Henning Kamp  added the comment:

Please note that the mode is not just a parameter, it is also a data field 
inside the encoded input.

See: https://en.wikipedia.org/wiki/Uuencoding

(search for "mode")

--

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-12 Thread miss-islington


miss-islington  added the comment:


New changeset 4ada0cff5315627eae8208adf0209b479f497b8d by Miss Islington (bot) 
in branch '3.7':
bpo-33723: Fix test_time.test_thread_time() (GH-8267)
https://github.com/python/cpython/commit/4ada0cff5315627eae8208adf0209b479f497b8d


--
nosy: +miss-islington

___
Python tracker 

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



[issue34102] local variable 'parts' referenced before assignment in feedparser in email module

2018-07-12 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks @sshnaidm. The patch makes sense. Can you add a test case for this that 
fails without the patch? I have tried `pip install ansible-lint` and it works 
fine for me in Python 2.7.

I think a NEWS entry will help too : 
https://devguide.python.org/committing/#what-s-new-and-news-entries 

Thanks

--

___
Python tracker 

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



[issue33687] uu.py calls os.path.chmod which doesn't exist

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

>  Please note that the mode is not just a parameter, it is also a data field 
> inside the encoded input.

Oh... right...

" is the file's Unix file permissions as three octal digits (e.g. 644, 
744). This is typically only significant to unix-like operating systems."

Ok, in that case, it's maybe better to fix the bug instead of removing the 
parameter.

--

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-12 Thread STINNER Victor


Change by STINNER Victor :


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



[issue34090] Python function call optimization: avoid temporary tuple to pass **kwargs

2018-07-12 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Related issues with similar discussion in the past : 

https://bugs.python.org/issue27840
https://bugs.python.org/issue29318 - Similar discussion where PyDict_Copy was 
proposed

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2018-07-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

It appears so.

--

___
Python tracker 

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



[issue34087] django: segmentation fault on garbage collection in visit_decref()

2018-07-12 Thread Jonas H.


Jonas H.  added the comment:

I also have a segfault that goes away with malloc debugging. Not sure if it's 
the same issue.

My extension modules are

venv/lib/python3.7/site-packages//_yaml.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//netifaces.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//PIL/_webp.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//PIL/_imagingft.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//PIL/_imagingcms.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//PIL/_imaging.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//PIL/_imagingmath.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//PIL/_imagingtk.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//PIL/_imagingmorph.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//lxml/builder.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//lxml/_elementpath.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//lxml/html/diff.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//lxml/html/clean.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//lxml/etree.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//lxml/objectify.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//coverage/tracer.cpython-37m-darwin.so

Unfortunately I can't test the application without any of these, but maybe we 
can match my list with fenrrir's.

--
nosy: +jonash

___
Python tracker 

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



[issue34087] django: segmentation fault on garbage collection in visit_decref()

2018-07-12 Thread Jonas H.


Jonas H.  added the comment:

Btw my segfault is from Django too, but that may just be a coincidence

--

___
Python tracker 

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



[issue34102] local variable 'parts' referenced before assignment in feedparser in email module

2018-07-12 Thread R. David Murray


R. David Murray  added the comment:

This appears to be a bug in pip or the ansible-lint package, similar, and 
possibly identical, to issue 31361.  I believe None is being passed in as the 
argument to feed_parser.feed, which is an invalid use of that API and so 
correctly results in an error.

--

___
Python tracker 

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



[issue34103] Python3.7 places cwd instead of a scripts path in sys.path.

2018-07-12 Thread AndreasPK


New submission from AndreasPK :

Andi@Horzube MINGW64 ~/tmp
$ python3.7 ../pyTest.py
['', 'C:/ghc/msys64/mingw64/lib/python37.zip', 'C:/ghc/msys64/home/Andi/tmp', 
'C:/ghc/msys64/mingw64/lib/python3.7', 'C:/ghc/msys64/mingw64/bin', 
'C:/ghc/msys64/mingw64/lib/python3.7/lib-dynload', 
'C:/ghc/msys64/mingw64/lib/python3.7/site-packages']

Andi@Horzube MINGW64 ~/tmp
$ python3.6 ../pyTest.py
['/home/Andi', '/usr/lib/python36.zip', '/usr/lib/python3.6', 
'/usr/lib/python3.6/lib-dynload', '/usr/lib/python3.6/site-packages']

Ignore the path prefix differences, they comes from slight differences how I 
installed these two versions.

3.6 lists '/home/Andi', path of the script
3.7 lists /home/Andi/tmp , path of cwd

This breaks existing code looking for files (imports primarily) relative to a 
scripts path.
If a file is placed in the right relative path to cwd it will be picked up over 
the intended file.

This should be at least mentioned in breaking changes.

--
messages: 321563
nosy: AndreasPK
priority: normal
severity: normal
status: open
title: Python3.7 places cwd instead of a scripts path in sys.path.
type: security
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



[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2018-07-12 Thread Bryan Oakley


Bryan Oakley  added the comment:

yes, this is a well known backwards incompatibility. In python 2, the
division operator returns an integer if both operands are integers. In
python 3 it returns a float.

https://www.python.org/dev/peps/pep-0238/

On Thu, Jul 12, 2018 at 8:48 AM STINNER Victor 
wrote:

>
> STINNER Victor  added the comment:
>
> Is this issue a regression of Python 3? red/256 gave an integer on Python
> 2?
>
> --
> nosy: +vstinner
>
> ___
> Python tracker 
> 
> ___
>

--
title: tkinter askcolor returning floats for r,g,b values instead of ints -> 
tkinter askcolor returning floats for r, g, b values instead of ints

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

I tested fontforge. It became clear to me that the fontforge must be able to 
call Py_Initialize() and only later call Py_Main(). fontforge calls 
Py_Initialize() and then uses the Python API:

/* This is called to start up the embedded python interpreter */
void FontForge_InitializeEmbeddedPython(void) {
// static int python_initialized is declared above.
if ( python_initialized )
return;

SetPythonProgramName("fontforge");
RegisterAllPyModules();
Py_Initialize();
python_initialized = 1;

/* The embedded python interpreter is now functionally
 * "running". We can modify it to our needs.
 */
CreateAllPyModules();
InitializePythonMainNamespace();
}

Py_Main() is called after FontForge_InitializeEmbeddedPython().

To be clear, Py_Main() must be fixed in Python 3.7 to apply properly the new 
configuration, or *at least* define sys.argv.

--

___
Python tracker 

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



[issue34087] django: segmentation fault on garbage collection in visit_decref()

2018-07-12 Thread Rodrigo Pinheiro Marques de Araújo

Rodrigo Pinheiro Marques de Araújo  added the comment:

Extensions:

./_cffi_backend.cpython-37m-darwin.so
./_mssql.cpython-37m-darwin.so
./_yaml.cpython-37m-darwin.so
./Crypto/Cipher/_AES.cpython-37m-darwin.so
./Crypto/Cipher/_ARC2.cpython-37m-darwin.so
./Crypto/Cipher/_ARC4.cpython-37m-darwin.so
./Crypto/Cipher/_Blowfish.cpython-37m-darwin.so
./Crypto/Cipher/_CAST.cpython-37m-darwin.so
./Crypto/Cipher/_DES.cpython-37m-darwin.so
./Crypto/Cipher/_DES3.cpython-37m-darwin.so
./Crypto/Cipher/_XOR.cpython-37m-darwin.so
./Crypto/Hash/_MD2.cpython-37m-darwin.so
./Crypto/Hash/_MD4.cpython-37m-darwin.so
./Crypto/Hash/_RIPEMD160.cpython-37m-darwin.so
./Crypto/Hash/_SHA224.cpython-37m-darwin.so
./Crypto/Hash/_SHA256.cpython-37m-darwin.so
./Crypto/Hash/_SHA384.cpython-37m-darwin.so
./Crypto/Hash/_SHA512.cpython-37m-darwin.so
./Crypto/PublicKey/_fastmath.cpython-37m-darwin.so
./Crypto/Util/_counter.cpython-37m-darwin.so
./Crypto/Util/strxor.cpython-37m-darwin.so
./cryptography/hazmat/bindings/_constant_time.abi3.so
./cryptography/hazmat/bindings/_openssl.abi3.so
./cryptography/hazmat/bindings/_padding.abi3.so
./Cython/Compiler/Code.cpython-37m-darwin.so
./Cython/Compiler/FlowControl.cpython-37m-darwin.so
./Cython/Compiler/FusedNode.cpython-37m-darwin.so
./Cython/Compiler/Lexicon.cpython-37m-darwin.so
./Cython/Compiler/Parsing.cpython-37m-darwin.so
./Cython/Compiler/Pythran.cpython-37m-darwin.so
./Cython/Compiler/Scanning.cpython-37m-darwin.so
./Cython/Compiler/Visitor.cpython-37m-darwin.so
./Cython/Plex/Actions.cpython-37m-darwin.so
./Cython/Plex/Scanners.cpython-37m-darwin.so
./Cython/Runtime/refnanny.cpython-37m-darwin.so
./Cython/StringIOTree.cpython-37m-darwin.so
./Cython/Tempita/_tempita.cpython-37m-darwin.so
./lazy_object_proxy/cext.cpython-37m-darwin.so
./lxml/_elementpath.cpython-37m-darwin.so
./lxml/builder.cpython-37m-darwin.so
./lxml/etree.cpython-37m-darwin.so
./lxml/html/clean.cpython-37m-darwin.so
./lxml/html/diff.cpython-37m-darwin.so
./lxml/objectify.cpython-37m-darwin.so
./markupsafe/_speedups.cpython-37m-darwin.so
./PIL/_imaging.cpython-37m-darwin.so
./PIL/_imagingcms.cpython-37m-darwin.so
./PIL/_imagingmath.cpython-37m-darwin.so
./PIL/_imagingmorph.cpython-37m-darwin.so
./PIL/_imagingtk.cpython-37m-darwin.so
./psycopg2/_psycopg.cpython-37m-darwin.so
./pymssql.cpython-37m-darwin.so
./reportlab/graphics/_renderPM.cpython-37m-darwin.so
./reportlab/lib/_rl_accel.cpython-37m-darwin.so
./setproctitle.cpython-37m-darwin.so
./simplejson/_speedups.cpython-37m-darwin.so
./wrapt/_wrappers.cpython-37m-darwin.so

requirements.txt


alabaster==0.7.11
amqp==2.2.2
appnope==0.1.0
arrow==0.12.0
asn1crypto==0.24.0
astroid==1.6.5
Babel==2.6.0
beautifulsoup4==4.6.0
billiard==3.5.0.3
boto3==1.7.24
botocore==1.10.24
celery==4.1.0
certifi==2018.4.16
cffi==1.11.2
chardet==3.0.4
colorama==0.3.9
colorful==0.4.0
configparser==3.5.0
coreapi==2.3.3
coreschema==0.0.4
cryptography==2.2.2
cssselect==1.0.3
Cython==0.28.2
decorator==4.3.0
dj-database-url==0.4.2
Django==2.0.6
django-braces==1.12.0
django-celery-beat==1.1.1
django-celery-results==1.0.1
django-ckeditor==5.2.1
django-colorful==1.2
django-crispy-forms==1.6.1
django-extensions==1.9.8
django-extra-views==0.9.0
django-filter==1.0.4
django-filters==0.2.1
django-formset-js==0.5.0
django-formtools==2.1
django-fsm==2.6.0
django-jquery-js==3.1.1
django-js-asset==1.1.0
django-localflavor==1.6.2
django-model-utils==3.1.1
django-mptt==0.9.0
django-pagination==1.0.10
django-querysetsequence==0.8
django-recaptcha2==1.0.3
django-rest-swagger==2.1.2
django-reversion==2.0.13
django-reversion-compare==0.8.4
django-storages==1.6.6
django-tables2==1.17.1
django-tables2-reports==0.1.3
django-taggit==0.22.1
django-wkhtmltopdf==3.1.0
djangorestframework==3.7.3
djangorestframework-filters==0.10.2
djangorestframework-jwt==1.11.0
docutils==0.14
feedparser==5.2.1
google-api-python-client==1.6.4
gunicorn==19.7.1
html5lib==1.0.1
httplib2==0.10.3
idna==2.6
imagesize==0.7.1
ipaddress==1.0.19
ipdb==0.10.3
ipython==6.2.1
ipython-genutils==0.2.0
isort==4.2.15
itypes==1.1.0
jedi==0.12.1
Jinja2==2.10
jmespath==0.9.3
kombu==4.2.1
lazy-object-proxy==1.3.1
ldap3==2.4
lxml==4.1.1
MarkupSafe==1.0
mccabe==0.6.1
MechanicalSoup==0.10.0
minio==4.0.0
model-mommy==1.5.0
oauth2client==4.1.2
olefile==0.45.1
openapi-codec==1.3.2
parso==0.3.1
pathlib2==2.3.0
pbr==3.1.1
pdfrw==0.4
pexpect==4.3.1
pickleshare==0.7.4
Pillow==4.3.0
prompt-toolkit==1.0.15
psycopg2==2.7.3.2
ptyprocess==0.5.2
pyasn1==0.4.2
pyasn1-modules==0.2.1
pycparser==2.18
pycpfcnpj==1.2
pycrypto==2.6.1
Pygments==2.2.0
PyJWT==1.6.4
pylint==1.8.1
pyOpenSSL==17.5.0
PyPDF2==1.26.0
pyquery==1.3.0
python-dateutil==2.6.1
python-logstash==0.4.6
python-magic==0.4.15
python-memcached==1.58
pytz==2018.4
PyYAML==3.13
qrcode==5.3
raven==6.4.0
reportlab==3.4.0
requests==2.18.4
rsa==3.4.2
s3transfer==0.1.13
setproctitle==1.1.10
simplegeneric==0.8.1
simplejson==3.13.2
six==1.11.0
snowballstemmer==1.2.1
Sphinx==1.6.5
sphinxcontrib-websupport==1.1.0
suds-py3==1.3.3.0
traitl

[issue34087] django: segmentation fault on garbage collection in visit_decref()

2018-07-12 Thread INADA Naoki


INADA Naoki  added the comment:

Hmm, all segfault are happend on macOS?

--

___
Python tracker 

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



[issue34090] Python function call optimization: avoid temporary tuple to pass **kwargs

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

Yeah, I recall these issues since I wrote them :-D

The fix for bpo-29318 was to document that we must copy the kwargs dict ;-)

But this issue is not about the copy of the kwargs dict, but about two useless 
conversions: kwargs dict -> kwnames tuple -> kwargs dict.

--

___
Python tracker 

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



[issue34103] Python3.7 places cwd instead of a scripts path in sys.path.

2018-07-12 Thread Eric N. Vander Weele


Change by Eric N. Vander Weele :


--
nosy: +ericvw

___
Python tracker 

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



[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-07-12 Thread Neil Schemenauer


Change by Neil Schemenauer :


Removed file: https://bugs.python.org/file47685/makesetup_fallback_dist.txt

___
Python tracker 

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



[issue34103] Python3.7 places cwd instead of a scripts path in sys.path.

2018-07-12 Thread INADA Naoki


INADA Naoki  added the comment:

inada-n@rinrin:~/t$ ../pyenv/versions/3.7.0/bin/python ../fset.py
['/home/inada-n', '/home/inada-n/pyenv/versions/3.7.0/lib/python37.zip', 
'/home/inada-n/pyenv/versions/3.7.0/lib/python3.7', 
'/home/inada-n/pyenv/versions/3.7.0/lib/python3.7/lib-dynload', 
'/home/inada-n/.local/lib/python3.7/site-packages', 
'/home/inada-n/pyenv/versions/3.7.0/lib/python3.7/site-packages']

inada-n@rinrin:~/t$ ../pyenv/versions/3.6.5/bin/python ../fset.py
['/home/inada-n', '/home/inada-n/pyenv/versions/3.6.5/lib/python36.zip', 
'/home/inada-n/pyenv/versions/3.6.5/lib/python3.6', 
'/home/inada-n/pyenv/versions/3.6.5/lib/python3.6/lib-dynload', 
'/home/inada-n/pyenv/versions/3.6.5/lib/python3.6/site-packages']

Both 3.6 and 3.7 use script directory, not cwd.

I don't know what's wrong on your environment.
Your Python 3.6 and 3.7 are build by exactly same way except prefix?

--
nosy: +inada.naoki

___
Python tracker 

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



[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-07-12 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

I removed the "makesetup_fallback_dist.txt".  PR-8260 is a more polished 
implementation of the same idea.

--

___
Python tracker 

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



[issue34103] Python3.7 places cwd instead of a scripts path in sys.path.

2018-07-12 Thread AndreasPK


AndreasPK  added the comment:

Thank you for the fast response!

Both versions are distributed via msys I did not build them myself and 
installed 3.7 via pacman (today).

$ python3.7
Python 3.7.0 (default, Jul 12 2018, 11:44:33)  [GCC 7.3.0 64 bit (AMD64)] on 
win32

I only found out about this issue after someone else complained that GHC's 
testsuite was broken with 3.7. After upgrading mine it broke for me as well and 
we narrowed it down to this issue.

I've tested the version from python.org in a windows shell as well which works 
so I can confirm your results there.
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

I've also tried running the version from python.org but in the msys shell which 
also works.

So it seems to be an issue with the version distributed by msys!
I'm not familiar with the details of how msys composes their packages. (If they 
distribute an official build, build their own or what not).

But this seems related: https://github.com/Alexpux/MINGW-packages/issues/4062
I will link this thread there and hope this leads somewhere.

--

___
Python tracker 

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



[issue34103] Python3.7 places cwd instead of a scripts path in sys.path.

2018-07-12 Thread AndreasPK


AndreasPK  added the comment:

I've learned that msys builds their own Python binary which is the one broken. 
So I'm closing this as it's my undestanding that it is not a bug in the 
official distribution.

Thanks for the quick responses.

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



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-12 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Upon checking to see where the RuntimeError is coming from, I noticed that 
there is some notorious behaviour in chunk.py. If one runs python with the 
exact same parameters as Jussi Judin did in their first case and after stepping 
through the call stack until Chunk/skip is reached, there is a call to 
Chunk/seek. On the time of the call size_read has the value 16, whereas within 
the seek method it has the value 28. Is this intended? If so, where is that 
implemented? I cannot figure out why this is happening. 

The following is my pdb output.

> cpython/Lib/chunk.py(160)skip()
-> self.file.seek(n, 1)
(Pdb) p self.size_read
16
(Pdb) s
--Call--
> cpython/Lib/chunk.py(98)seek()
-> def seek(self, pos, whence=0):
(Pdb) p self.size_read
28

--

___
Python tracker 

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



[issue34104] email.message.get_payload should enforce correct encoding

2018-07-12 Thread Serge Droz


New submission from Serge Droz :

The issue is really this:
https://noxxi.de/research/mime-5-easy-steps-to-bypass-av.html

get_payload should with decode=Treu should check the validity of the syntax and 
throw an error if it is not. This would happen if the underlying call to 
base64.decode would be called with validate=True

--
messages: 321574
nosy: droz
priority: normal
severity: normal
status: open
title: email.message.get_payload should enforce correct encoding

___
Python tracker 

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



[issue34104] email.message.get_payload should enforce correct encoding

2018-07-12 Thread Serge Droz


Change by Serge Droz :


--
type:  -> security

___
Python tracker 

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



[issue34105] test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6

2018-07-12 Thread Lysandros Nikolaou


New submission from Lysandros Nikolaou :

On my Mac OS X 10.13.6 system test_socket.test_host_resolution_bad_address 
fails with the following error:

==
FAIL: test_host_resolution_bad_address (test.test_socket.GeneralModuleTests)
--
Traceback (most recent call last):
  File "/path/to/cpython/Lib/test/test_socket.py", line 897, in 
test_host_resolution_bad_address
socket.gethostbyname(addr)
AssertionError: OSError not raised : 0.1.1.~1

--
Ran 555 tests in 24.950s

FAILED (failures=1, skipped=141)
/path/to/cpython/Lib/test/test_socket.py:2345: RuntimeWarning: received 
malformed or improperly-truncated ancillary data
  result = sock.recvmsg(bufsize, *args)
/path/to/cpython/Lib/test/test_socket.py:2436: RuntimeWarning: received 
malformed or improperly-truncated ancillary data
  result = sock.recvmsg_into([buf], *args)
test test_socket failed

== Tests result: FAILURE ==

1 test failed:
test_socket

Total duration: 25 sec 423 ms
Tests result: FAILURE

When I manually run socket.gethostbyname('0.1.1.~1'), it returns an IP address, 
no exception thrown.

--
components: Tests
messages: 321575
nosy: lys.nikolaou
priority: normal
severity: normal
status: open
title: test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6
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



[issue34100] Same constants in tuples are not merged while compile()

2018-07-12 Thread Brett Cannon


Brett Cannon  added the comment:

I also agree that there's no bug here, so I'm marking this an enhancement and 
removing the regression label.

--
nosy: +brett.cannon
type: resource usage -> enhancement

___
Python tracker 

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



[issue34087] django: segmentation fault on garbage collection in visit_decref()

2018-07-12 Thread Jonas H.


Jonas H.  added the comment:

I can reproduce this on Ubuntu 18.04.

INADA, I have a full gdb backtrace with Python 3.7 development build. I'd like 
to share it with you privately as I'm concerned it may contain sensible 
information. I know that's a bit unconventional; if you have other suggestions 
I'm happy to follow along.

--

___
Python tracker 

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



[issue34087] django: segmentation fault on garbage collection in visit_decref()

2018-07-12 Thread Rodrigo Pinheiro Marques de Araújo

Rodrigo Pinheiro Marques de Araújo  added the comment:

I did remove PyYAML, lxml and Pillow here but segfault still happen

--

___
Python tracker 

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



[issue34104] email.message.get_payload should enforce correct encoding

2018-07-12 Thread R. David Murray


R. David Murray  added the comment:

It looks like the virus checkers are not doing robust decoding that the email 
RFCs recommend, and that thunderbird is.  This is obviously a bug in the virus 
scanners.  By default, like thunderbird, the email library does its best to 
decode attachments.  If you want your application to reject such attachments, 
then in python3 you can check for defects after doing the get_payload, or you 
can set the policy to 'strict' (that is, raise_on_defect=True) when parsing the 
email.

--
nosy: +r.david.murray
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue34106] Add --with-module-config= to 'configure' script

2018-07-12 Thread Neil Schemenauer


New submission from Neil Schemenauer :

This patch is based on top of GH-8229 but could be changed to work without it.

--
components: Build
messages: 321580
nosy: nascheme
priority: normal
severity: normal
stage: patch review
status: open
title: Add --with-module-config= to 'configure' script
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



[issue34106] Add --with-module-config= to 'configure' script

2018-07-12 Thread Neil Schemenauer


Change by Neil Schemenauer :


--
keywords: +patch
pull_requests: +7804

___
Python tracker 

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



[issue34087] django: segmentation fault on garbage collection in visit_decref()

2018-07-12 Thread INADA Naoki


INADA Naoki  added the comment:

@jonash, Thank you.  Would you share core file too?
You can get core file when reproducing it after `ulimit -c unlimited`.

My mail address is "songofacandy [at] gmail.com".
Please share it via Dropbox or Google Drive.

--

___
Python tracker 

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



[issue34107] root.warning('msg') output format modified by logging.warning('msg')

2018-07-12 Thread Michael Kearney


New submission from Michael Kearney :

0 >>> import logging
1 >>> root=logging.getLogger(name='root')
2 >>> root.warning('msg')
3 msg   <- Compare this line
4 >>> logging.warning('msg')
5 WARNING:root:msg
6 >>> root.warning('msg')
7 WARNING:root:msg  <-- with this line

Specifically, I was surprised to see
   line 7 response to line 6
given
   line 3 response to line 2

logger methods log(),critical(),error(),info() act the same way.

A workaround from issue 33897 fixes things
   logging.basicConfig(level=logging.DEBUG, force=True)

I discovered this when exploring "logging" module defaults, It is the sort of 
thing someone new to the module might encounter. I did.

Slightly more comprehensive unittest example attached.

This may be my first real submission. Feedback appreciated

--
files: logTest.py
messages: 321582
nosy: Michael Kearney
priority: normal
severity: normal
status: open
title: root.warning('msg') output format  modified by logging.warning('msg')
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file47686/logTest.py

___
Python tracker 

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



[issue34107] root.warning('msg') output format modified by logging.warning('msg')

2018-07-12 Thread Ned Deily


Change by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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