[issue36124] Provide convenient C API for storing per-interpreter state

2019-03-01 Thread Armin Rigo


Armin Rigo  added the comment:

PyModule_GetState() requires having the module object that corresponds to the 
given interpreter state.  I'm not sure how a C extension module is supposed to 
get its own module object corresponding to the current interpreter state, 
without getting it from the caller in some way.

The mess in cffi's call_python.c would be much reduced if we had bpo-36124 
(fixed to call Py_CLEAR(), see comment in bpo-36124).

If you want to point out a different approach that might work too, that's OK 
too.  It's just that the current approach was arrived at after multiple 
generations of crash reports, which makes me uneasy about changing it in more 
subtle ways than just killing it in favor of a careful 
PyInterpreterState_GetDict().

If you want to see details of the current hacks, I can explain 
https://bitbucket.org/cffi/cffi/src/d765c36df047cf9d5e766777049c4107e1f4cb00/c/call_python.c
 :

The goal is that we are given a finite (but unknown at compile-time) number of 
'externpy' data structures, and for each pair (externpy, interp) the user can 
assign a callable 'PyObject *'.  The annoying part of the logic is that we have 
a C-exposed callback function (line 204) which is called with a pointer to one 
of these 'externpy' structures, and we need to look up the right 'PyObject *' 
to call.

At line 255 we just got the GIL and need to check if the 
'PyThreadState_GET()->interp' is equal to the one previously seen (an essential 
optimization: we can't do complicated logic in the fast path).  We hack by 
checking for 'interp->modules' because that's a PyObject.  The previous time 
this code was invoked, we stored a reference to 'interp->modules' in the C 
structure 'externpy', with an incref.  So this fast-path pointer comparison is 
always safe (no freed object whose address can be accidentally reused).  This 
test will quickly pass if this function is called in the same 'interp' many 
times in a row.

The slow path is in _update_cache_to_call_python(), which calls 
_get_interpstate_dict(), whose only purpose is to return a dictionary that 
depends on 'interp'.  Note how we need to be very careful about various cases, 
like shutdown.  _get_interpstate_dict() can fail and return NULL, but it cannot 
give a fatal error.  That's why we couldn't call, say, 
PyImport_GetModuleDict(), because this gives a fatal error if 'interp' is being 
shut down at the moment.

Overall, the logic uses both 'interp->modules' and 'interp->builtins'.  The 
'modules' is used only for the pointer equality check, because that's an object 
that is not supposed to be freed until the very last moment.  The 'builtins' is 
used to store the special name "__cffi_backend_extern_py" in it, because we 
can't store that in 'interp->modules' directly without crashing various 
3rd-party Python code if this special key shows up in 'sys.modules'.  The value 
corresponding to this special name is a dictionary 
{PyLong_FromVoidPtr(externpy): infotuple-describing-the-final-callable}.

--

___
Python tracker 

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



[issue36157] Document PyInterpreterState_Main().

2019-03-01 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

@Mariatta do you want to keep this for the mentored sprint at PyCon?

--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue36008] [good first issue] Update documentation for 3.8

2019-03-01 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

@Mariatta this issue https://bugs.python.org/issue36157 also looks like one you 
can track for the mentored sprint at PyCon.

--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue36164] Updating Py_InspectFlag programmatically

2019-03-01 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue35819] Fatal Python error

2019-03-01 Thread Inada Naoki


Inada Naoki  added the comment:

By the way, do you remember why you set PYTHONHOME?
I afraid that someone recommends such bad practice on Web and this issue is 
spreading.

Beginner ~ average Python user must not try PYTHONHOME.

--
nosy: +inada.naoki

___
Python tracker 

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



[issue36164] Updating Py_InspectFlag programmatically

2019-03-01 Thread Atsuo Ishimoto


New submission from Atsuo Ishimoto :

I sometime use a hack to start interactive console after running script.

.. code-block:: python

   import os

   os.environ['PYTHONINSPECT'] = 'x'
   print("Hello")

This hack works because ``PYTHONINSPECT`` is checked `here 
`__ when 
exiting Python.

However, if the script uses ``sys.exit()`` to exit from Python, interactive 
console doen't apper because unhandled ``SystemExit`` exception leads 
``exit()`` call to kill process, without checking ``PYTHONINSPECT``.

.. code-block:: python

   import os, sys

   os.environ['PYTHONINSPECT'] = 'x'
   print("Hello")

   sys.exit(1)  # Interactive console will not start


I think feature to allow updating ``Py_InspectFlag`` is useful, and this is a 
bugs to be fixed. However, setting environment variable to start console is not 
intuituve.

So instead of fixing bug, I would like to propose a small function to set 
``Py_InspectFlag`` to start interactive console after running script.

.. code-block:: python

sys.setinteractiveflag(bool)

Thoughts?

--
components: Interpreter Core
messages: 336993
nosy: ishimoto
priority: normal
severity: normal
status: open
title: Updating Py_InspectFlag programmatically
type: behavior

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2019-03-01 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Mar 1, 2019, at 19:59, Ivan Pozdeev  wrote:
> 
> Ivan Pozdeev  added the comment:
> 
> On 02.03.2019 2:25, Barry A. Warsaw wrote:
>> The fact that .pth files are global and affect the entire Python 
>> installation. <...> Right now, there’s no control over the scope of such 
>> environmental customizations; it’s all or nothing.
> 
> That's the entire purpose of "customizing the environment in which the
> program specified by the user would run". A customization can very well
> be implemented to be application-specific but it doesn't have to. Python
> was never designed to isolate modules from each other (an "application"
> as you say it is just another module) -- on the contrary, the amount of
> power it gives the user over the code that they don't control is one of
> its key appeals. A Python installation acts as a unit where anything can
> affect anything else, and the order is maintained with
> https://en.wikipedia.org/wiki/Soft_security .

So I just come at it from a different angle (I think Steve and I are aligned).

Here’s a very real use case about the dangers.  I use my Linux package manager 
to install a bunch of applications (I don’t totally agree with the “an 
application is just another package”).  I don’t even know that they are Python 
applications, they’re just tools that do something I like.  Now I have an idea 
for some cool Python thing to hack on and I just install a few development 
libraries with my package manager.   Maybe those libraries come from a 
secondary repo that has a different level of scrutiny.  Or maybe I think, hey 
what’s the harm to just `sudo pip install` a few things (yes, people do this 
all the time ;).

Subtly, under the hood, one of those transient dependencies down the stack 
installs some .pth file that executes some arbitrary code and breaks some of 
those distro provided applications.  And lets say I don’t notice weird things 
happening for a week.  Now I think “whoa! how did that application break? I 
didn’t change it at all”.  Not only did I mysteriously break things I relied 
on, but unless I’m an expert Pythonista and I know how to debug site.py, I’ve 
got almost no hope of fixing the problem by myself (SO to the rescue?).  If I 
do manage to diagnose the problem, I’ll have to go and uninstall the bad 
package, and I *should* report things to my distro or upstream.  Of course, 
upstream may say that it’s critical functionality to their library so too bad 
for you.

I’m not even making that up. :)

Sure, maybe the very concept of a distro-wide Python application is a mistake, 
but it’s what we have now, and it’s not going away.

>> Applications should be able to opt in or out of them, just like they can 
>> with individual packages (which must be imported in order to affect the 
>> interpreter state).
> Right on the contrary. To decide what environment an application shall
> be run in is the user's prerogative. The application itself has
> absolutely no business meddling in this.

Again, I just look at this from a different perspective.  The user probably 
doesn’t even know all the environmental factors that affect the operation of 
their applications, and changes in that environment can happen without the 
user’s knowledge.  All they’re going to know is that application X which is 
critical to their work has just broken.  Sadly, the engineer looking into the 
bug they filed on it will not be able to reproduce the problem.  And now nobody 
is happy. :)

> With "individual packages", it's actually completely the same: the app
> can decide which ones it wants to use, but it's the user who decides
> which ones are available for use!

It’s actually not the same, and that’s the point.  An application won’t ever 
import a library that actively harms it.  But it has no such guards against 
changes to the environment — any environment, including magical Python code.

--

___
Python tracker 

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



[issue36138] Improve documentation about converting datetime.timedelta to scalars

2019-03-01 Thread Yasser Alshalaan


Change by Yasser Alshalaan :


--
pull_requests:  -12138

___
Python tracker 

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



[issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29

2019-03-01 Thread Open Close


Open Close  added the comment:

It may be openssl 1.1.1a specific.
I don't understand most of what they say,
but the changelog (to 1.1.1b) 'looks' suspicious.
https://www.openssl.org/news/changelog.html#x1

...Actually Archlinux updated openssl to 1.1.1b about 4 days ago,
so I can 'test' 1.1.1b.
But which means I may not be able to reproduce the fail after that.

--

___
Python tracker 

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



[issue36138] Improve documentation about converting datetime.timedelta to scalars

2019-03-01 Thread Yasser Alshalaan


Change by Yasser Alshalaan :


--
pull_requests: +12139

___
Python tracker 

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



[issue36158] Regex search behaves differently in list comprehension

2019-03-01 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

> i want to apply a regex on a list of strings. 

The example you give doesn't include a list of strings, it has some unknown 
"entity" object with an unknown "trigger" attribute. Please refactor the code 
to remove the use of a class we don't have access to. You may find that 
entity.trigger does not contain what you think it contains.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread Nick Coghlan


Nick Coghlan  added the comment:

Agreed - I think the biggest thing we learned from the pre-implementation in 
Python 3.7 is that the "Let's move as much config as we can to Python C API 
data types" fell down in a couple of areas:

1. The embedding application is likely to speak char* and/or wchar_* natively, 
not PyObject*, and this applies even for CPython's own current `Py_Main` 
implementation.

2. There's some core system libc interaction scaffolding that we need in place 
first, giving 3 phases, not two:

- initialise anything needed to read configuration settings from the 
environment and command line (i.e. memory allocators, interface encodings)
- initialise the things needed to execute builtin and frozen Python modules 
(core data types, random hash seed, etc)
- initialise the things needed to execute external Python modules (sys.path, 
etc)

I'll update PEP 432 so it at least mentions some of the lessons learned, and 
points to the current internal configuration API definitions in the CPython 
source tree.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue36103] Increase shutil.COPY_BUFSIZE

2019-03-01 Thread Inada Naoki


Inada Naoki  added the comment:

I chose 64 KiB because performance difference between 64 and 128 KiB
I can see is only up to 5%.

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



[issue36103] Increase shutil.COPY_BUFSIZE

2019-03-01 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 4f190306186973c1bbfadd3d3f146920856e by Inada Naoki in branch 
'master':
bpo-36103: change default buffer size of shutil.copyfileobj() (GH-12115)
https://github.com/python/cpython/commit/4f190306186973c1bbfadd3d3f146920856e


--

___
Python tracker 

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



[issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29

2019-03-01 Thread Kubilay Kocak


Change by Kubilay Kocak :


--
nosy: +koobs

___
Python tracker 

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



[issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29

2019-03-01 Thread Open Close


Open Close  added the comment:

I have the same TimeoutError on Arch linux PC (openssl 1.1.1a).

It is random, but for now running test continuously at most 5 times 
successfully brings about the fail.

So I think msg335635 needs re-checking.
He saids PR 10011 makes this test pass in fedora 29 VM,
but thinking about that it only adds an conditional to FreeBSD, it is not 
likely.

if sys.platform.startswith('freebsd'):
client_context.options |= ssl.OP_NO_TLSv1_3

And indded, if commenting out the conditional line,
the test actually passes.
So I also think the commit needs re-considering.
f777fa5f2bd16ac8d60416eaa64eb9d2cf84ffac (Opt out of TLS 1.3 only on FreeBSD) 

---

$ uname -a
Linux  4.20.4-arch1-1-ARCH #1 SMP PREEMPT Wed Jan 23 00:12:22 UTC 2019 
x86_64 GNU/Linux
(native, not venv nor vm)

$ ./python -m test.pythoninfo | grep ssl
ssl.HAS_SNI: True
ssl.OPENSSL_VERSION: OpenSSL 1.1.1a  20 Nov 2018
ssl.OPENSSL_VERSION_INFO: (1, 1, 1, 1, 15)
ssl.OP_ALL: 0x8054
ssl.OP_NO_TLSv1_1: 0x1000

$ ./python -X tracemalloc -m unittest -v 
test.test_asyncio.test_sslproto.SelectorStartTLSTests.test_start_tls_server_1
...
==
ERROR: test_start_tls_server_1 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests)
--
Traceback (most recent call last):
  File "/home/philo/me/git/cpython/Lib/test/test_asyncio/test_sslproto.py", 
line 510, in test_start_tls_server_1
self.loop.run_until_complete(run_main())
  File "/home/philo/me/git/cpython/Lib/asyncio/base_events.py", line 589, in 
run_until_complete
return future.result()
  File "/home/philo/me/git/cpython/Lib/test/test_asyncio/test_sslproto.py", 
line 503, in run_main
await asyncio.wait_for(
  File "/home/philo/me/git/cpython/Lib/asyncio/tasks.py", line 461, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError

--
Ran 1 test in 60.076s

--
nosy: +op368

___
Python tracker 

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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread kellena


kellena  added the comment:

That worked! Thank you!

--

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2019-03-01 Thread Ivan Pozdeev

Ivan Pozdeev  added the comment:

On 02.03.2019 2:25, Barry A. Warsaw wrote:
> The fact that .pth files are global and affect the entire Python 
> installation. <...> Right now, there’s no control over the scope of such 
> environmental customizations; it’s all or nothing.

That's the entire purpose of "customizing the environment in which the 
program specified by the user would run". A customization can very well 
be implemented to be application-specific but it doesn't have to. Python 
was never designed to isolate modules from each other (an "application" 
as you say it is just another module) -- on the contrary, the amount of 
power it gives the user over the code that they don't control is one of 
its key appeals. A Python installation acts as a unit where anything can 
affect anything else, and the order is maintained with 
https://en.wikipedia.org/wiki/Soft_security .

So, if you need a compartmentalized application, a regular Python 
installation is a wrong tool for the job.
Compartmentalization comes at the price of:

  * rampant code duplication ('cuz if you actively distrust external
code, you have to bring all the code you need with you) and all its
corollaries (no automatic security fixes and modernized semantics;
no memory and disk space economy from shared library reuse)
  o so compartmentalization is absolutely impossible within a shared
environment: anything that you use can be changed by the user
(e.g. to satisfy the requirements of something else, too)
  * lack of interoperability (how many Android apps do you know that can
use each other's functionality?).

Venv does a pretty good job of providing you with a private copy of any 
3rd-party modules you require but not the envvars, the interpreter and 
the standard library (and any OS facilities they depend on). If you 
require a harder barrier between your app and the rest of the system 
and/or wish to actively prevent users from altering your application, 
you'll have to use a private Python installation (e.g. in /opt), or hide 
it from everyone with the likes of Pyinstaller, or an OS-level 
container, or a VM... or just drop the pretense and go SaaS(S) (that'll 
teach those sneaky bastards to mess with my code!).

> Applications should be able to opt in or out of them, just like they can with 
> individual packages (which must be imported in order to affect the 
> interpreter state).
Right on the contrary. To decide what environment an application shall 
be run in is the user's prerogative. The application itself has 
absolutely no business meddling in this. All it can do is declare some 
requirements for the environment (either explicitly or implicitly by 
making assumptions) and refuse to work or malfunction if they are not 
met (and the user is still fully within their right to say: "screw you, 
I know what I am doing" -- and fool the app into thinking they are met 
and assume responsibility for any breakages).

With "individual packages", it's actually completely the same: the app 
can decide which ones it wants to use, but it's the user who decides 
which ones are available for use!

--

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2019-03-01 Thread Steve Dower


Steve Dower  added the comment:

Barry's response in https://bugs.python.org/issue33944#msg336970 is exactly 
what my response to that point was going to be.

Just because I want to use package spam and it wants to use package eggs 
doesn't mean that eggs gets to enable cloud imports (or anything else similarly 
magical) automatically. If I want that, it can provide it and tell me to call 
it in my code, or it can do it when needed. Neither of those options require 
arbitrary code execution in a .pth file.

--

___
Python tracker 

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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread Ned Deily


Ned Deily  added the comment:

Yes, remove the PYTHONHOME env variable definition and things should be fine.

--
resolution:  -> works for me
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



[issue36138] Improve documentation about converting datetime.timedelta to scalars

2019-03-01 Thread Yasser Alshalaan


Change by Yasser Alshalaan :


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

___
Python tracker 

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



[issue36163] same object, same method, but the is keyword return false.

2019-03-01 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

The ``is`` operator returns False because the two objects are different objects.

Methods are descriptors, and whenever you access an instance method, you get a 
brand-new method object. This is described in the documentation for descriptors:

https://docs.python.org/3/howto/descriptor.html#functions-and-methods

The last two tests in your example both call id(a.a), which returns the same ID 
number for precisely the same reason as we explained in your previous bug 
report #36156. Since the two "a.a" method objects don't exist at the same time, 
the interpreter is permitted to re-use the same ID number for them.

P.S. remember in the previous bug report you raised, I asked you to use less 
awkward and confusing names? "a.a" is a terrible name, even for a simple 
example like this. It makes it hard to talk about what is going on when "a" is 
an instance and also a method.

--
nosy: +steven.daprano
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



[issue36138] Improve documentation about converting datetime.timedelta to scalars

2019-03-01 Thread Yasser Alshalaan


Yasser Alshalaan  added the comment:

I'll do this in a moment I'll have the PR

--
nosy: +Yasser Alshalaan

___
Python tracker 

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



[issue36163] same object, same method, but the is keyword return false.

2019-03-01 Thread lgj


New submission from lgj <929102...@qq.com>:

>>> class A():
...   def a(self):
...   pass
...
>>> a = A()
>>> a is a
True
>>> a.a is a.a
False
>>> id(a.a)
4532803784
>>> id(a.a)
4532803784
It's seems quite oops.

--
messages: 336979
nosy: lgj1993
priority: normal
severity: normal
status: open
title: same object, same method, but the is keyword return false.
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue32129] IDLE app icon is blurry on macOS with Aqua Tk 8.6

2019-03-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

After patching my 3.7.2 Macbook installation, and reviewing #20406 which added 
the icon code, I understand this issue better.  IDLE, while open and unlike 
other Mac apps I later tested, was replacing the initial Mac IDLE app dock icon 
(tilted page with double snakes and pen) with the cross-platform IDLE icon.

This was an accidental side-effect.  #20406 replaced the tk icon on the title 
bar of IDLE windows with the little IDLE icons.  Before merging, I checked that 
this did not affect the large app icons on the taskbar.  I assume that Serhiy 
did the equivalent on Linux.  I don't think that the patch was visually checked 
on Mac.

After the patch, I noticed that the normal behavior with macOS is to put a 
barely visible (to my eyes) black dot under dock icons when an app is open.  On 
Windows, the icon is also left as is, but a much more visible icon-width 
underline is added while open.  I approve of removing the while-open overlay on 
Mac and don't think it needs to be reinstated.
---

Kevin, I suspect that higher resolution .pngs (64px, 128px?) would help on 
other *nixes, (and perhaps Windows), but this would be another issue.  Whatever 
is in the .ico file for Windows looks awful in the corner of IDLE windows on my 
system, but this also is another issue.

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



[issue32387] Disallow untagged C extension import on major platforms

2019-03-01 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I think it'd be worth doing on POSIX systems for some 3.8 alpha/beta release 
cycles before making a final call there.

--

___
Python tracker 

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



[issue36162] error: implicit declaration of function 'sendfile' is invalid in C99

2019-03-01 Thread muhzi


muhzi  added the comment:

After some testing, it works and builds extensions OK for android arm with 
API>=21. fails on lower API versions (e.g. 16).

--

___
Python tracker 

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



[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-03-01 Thread David Bolen


David Bolen  added the comment:

If I can help with testing or builder access or anything just let me know.  It 
appears that I can pretty reliably trigger the error through just the 
individual tests (test_daemon_threads_shutdown_std{out,err}_deadlock) in 
isolation, which is definitely less tedious than a full buildbot run to test a 
change.

BTW, while not directly related since it was only just merged, and I won't 
pretend to have any real understanding of the changes here, I do have a 
question about PR 12024 ... it appears HEAD_UNLOCK is used twice in 
_PyInterpreterState_LookUpID.  Shouldn't one of those be HEAD_LOCK?

--

___
Python tracker 

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



[issue35859] Capture behavior depends on the order of an alternation

2019-03-01 Thread Ma Lin


Change by Ma Lin :


--
pull_requests: +12137

___
Python tracker 

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



[issue35466] Use a linked list for the ceval pending calls.

2019-03-01 Thread Eric Snow


Eric Snow  added the comment:

At this point I'm not terribly interested in this. :)

--
resolution:  -> wont fix
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



[issue36097] Use only public C-API in _xxsubinterpreters module.

2019-03-01 Thread Eric Snow


Change by Eric Snow :


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



[issue36097] Use only public C-API in _xxsubinterpreters module.

2019-03-01 Thread Eric Snow


Eric Snow  added the comment:


New changeset bcfa450f210074e16feb761ae5b3e966a2532fcf by Eric Snow in branch 
'master':
bpo-36097: Use only public C-API in the_xxsubinterpreters module (adding as 
necessary). (#12003)
https://github.com/python/cpython/commit/bcfa450f210074e16feb761ae5b3e966a2532fcf


--

___
Python tracker 

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



[issue35808] Let's retire pgen

2019-03-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 1f24a719e7be5e49b876a5dc7daf21d01ee69faa by Pablo Galindo in 
branch 'master':
bpo-35808: Retire pgen and use pgen2 to generate the parser (GH-11814)
https://github.com/python/cpython/commit/1f24a719e7be5e49b876a5dc7daf21d01ee69faa


--

___
Python tracker 

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



[issue35808] Let's retire pgen

2019-03-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread Inada Naoki

Inada Naoki  added the comment:

You must not set PYTHON HOME. Python find it's home by itself.
But since PYTHONHOME is set, Python can't find it's home.

2019年3月2日(土) 4:45 kellena :

>
> kellena  added the comment:
>
> There isn't much. I downloaded this and installed it from python.org with
> the install wizard. Shouldn't all of the necessary environment variables
> have been added at that time?
>
> $ env | grep PYTHON
>
> PYTHONHOME=/usr/local/bin/python3
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2019-03-01 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Mar 1, 2019, at 09:27, Ivan Pozdeev  wrote:

> Startup code (custom or not) is not a dependency of anything. It rather 
> customizes the environment in which the program specified by the user would 
> run, _before_ any user code could be allowed to get control. It is not a part 
> of the program to be run but rather of the environment that the user wants, 
> and it needs to be implicit so the user can use the same commands and code 
> (compare venv). This is a required feature because the stock Python startup 
> logic cannot possibly provide all the customizations that a user may need 
> (compare initrd).
> 
> .pth's are equivalent to sitecustomize but allow the user to manage the set 
> of code chunks automatically using the packaging infrastructure (compare .d 
> directories in UNIX). The fact that this feature is mixed up with and often 
> supplements "real packages" that a program would explicitly use is actually 
> incidental: a package with a .pth does not need to have any functionality 
> intended for explicit use.
> 
> We already identified a few real reasons: hard to see, hard to debug, 
> encourages unreadable code, run in arbitrary order when the order matters 
> (and IIRC I provided fixes for all). What else?

The fact that .pth files are global and affect the entire Python installation.  
That’s not so bad in venvs where we have environmental isolation, but it’s 
really bad (IMHO) for the global Python interpreter.  Right now, there’s no 
control over the scope of such environmental customizations; it’s all or 
nothing.  Applications should be able to opt in or out of them, just like they 
can with individual packages (which must be imported in order to affect the 
interpreter state).  The trick then is how to define opt-in for applications 
*before* the interpreter gets to user code.

--

___
Python tracker 

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



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

2019-03-01 Thread Miro Hrončok

Miro Hrončok  added the comment:

I am not able to do PRs right now but here are the Fedora patches:

https://src.fedoraproject.org/rpms/python34/blob/master/f/00302-fix-multiprocessing-regression-on-newer-glibcs.patch
https://src.fedoraproject.org/rpms/python35/blob/master/f/00302-fix-multiprocessing-regression-on-newer-glibcs.patch


They seem quite identical to the applied 3.6 patch.

--

___
Python tracker 

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



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

2019-03-01 Thread Larry Hastings


Larry Hastings  added the comment:

These issues also occur on Python 3.4 and 3.5.  And I'm now upgraded to Ubuntu 
18.10 which I guess has the new version of glibc. The regression test suite for 
both 3.4 and 3.5 blocks forever on three tests (multiprocessing_fork, 
multiprocessing_forkserver, and multiprocessing_spawn).  This affects my 
ability as RM to run the regression test suite, not to mention affecting the 
fundamental usability and trustability of 3.4 and 3.5 releases.


Can I please get backports of this patch to 3.4 and 3.5?  Note that I consider 
this a release blocker for 3.4 and 3.5.  And I'd expected to tag 3.4.10rc1 and 
3.5.7rc1 in about twenty-four hours.  So I sure would appreciate a quick 
turnaround on this if folks are available--otherwise I'll have to slip the 
schedule.  Sorry for the late notice!

--
nosy: +larry, lukasz.langa
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open
versions: +Python 3.4, Python 3.5

___
Python tracker 

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



[issue32129] IDLE app icon is blurry on macOS with Aqua Tk 8.6

2019-03-01 Thread miss-islington


miss-islington  added the comment:


New changeset 243b2064ce4fb7f90e69f9a4fa9c7e7ec70eba17 by Miss Islington (bot) 
in branch '3.7':
bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. (GH-12031)
https://github.com/python/cpython/commit/243b2064ce4fb7f90e69f9a4fa9c7e7ec70eba17


--
nosy: +miss-islington

___
Python tracker 

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



[issue32129] IDLE app icon is blurry on macOS with Aqua Tk 8.6

2019-03-01 Thread Ned Deily


Ned Deily  added the comment:


New changeset 453100f60e3c297226eaf0b0b4eb8c817a73b5ce by Ned Deily in branch 
'2.7':
bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. Original 
patch by Kevin Walzer. (GH-12034)
https://github.com/python/cpython/commit/453100f60e3c297226eaf0b0b4eb8c817a73b5ce


--

___
Python tracker 

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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread kellena


kellena  added the comment:

Sounds good. Maybe I didn't uninstall properly. What is the correct way to 
uninstall Python 3.7 on a Mac? Should I also uninstall version 2.7, the version 
that came with the Mac? Installing version 3.7 did not over-write version 2.7.

--

___
Python tracker 

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



[issue32129] IDLE app icon is blurry on macOS with Aqua Tk 8.6

2019-03-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12136
stage: commit review -> patch review

___
Python tracker 

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



[issue32129] IDLE app icon is blurry on macOS with Aqua Tk 8.6

2019-03-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 7eebbbd5b3907447eddadf5cb7cb1cc9230d15b2 by Terry Jan Reedy (Ned 
Deily) in branch 'master':
bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. (GH-12031)
https://github.com/python/cpython/commit/7eebbbd5b3907447eddadf5cb7cb1cc9230d15b2


--

___
Python tracker 

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



[issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname)

2019-03-01 Thread Thomas Wouters


Thomas Wouters  added the comment:

Ah, looks like I missed crypt_r getting added in 3.7. Sorry about that. Yes, 
the error handling would be a behaviour change, a keyword argument may be a 
good solution. As it is, crypt() returns None, throwing away the *reason* for 
the failure (which is recorded in errno).

--

___
Python tracker 

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



[issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname)

2019-03-01 Thread Martin Panter

Martin Panter  added the comment:

In Issue 28503, “crypt_r” was added to Python 3.7 and 3.8+, and it looks like 
it is still there.

Regarding error handling for “crypt”, it is not documented, but the Python 
function returns None on error. You would have to consider backwards 
compatibility to use OSError. Perhaps add a new parameter like 
“crypt(raise_error=True)”?

--
nosy: +martin.panter

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2019-03-01 Thread Anthony Sottile


Anthony Sottile  added the comment:

I don't have time to look through the data today but I wrote a script to 
collect the usages of `.pth` from pypi.  I realized after I ran it that I 
skipped source distributions with `.zip` extension but otherwise it's pretty 
complete:

https://github.com/asottile/pth-file-investigation

There are ~132 packages using `.pth` features (not including setuptools 
namespace packages which I had to exclude since there were so many of them).  I 
was planning to classify these but didn't have time to do so.

Some "highlights" from scrolling through the list, two of them are mine 
(future-breakpoint, future-fstrings), at least one is guido's (pyxl3), ruamel's 
namespace-packaging appears to use .pth (ruamel.* (12 packages))

--

___
Python tracker 

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



[issue29539] [smtplib] collect response data for all recipients

2019-03-01 Thread sls


sls  added the comment:

I closed my PR. I'd just rename "senderrs" to "mta_status" or so as 
aforementioned change means not just storing errors. 

FirefighterBlu3, do you open a PR for this? I'd like to see this moving into 
3.8 as we don't compile Python from source but using it from deb repos.

--

___
Python tracker 

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



[issue36162] error: implicit declaration of function 'sendfile' is invalid in C99

2019-03-01 Thread muhzi


muhzi  added the comment:

Using the latest NDK r19. Here is my compilation steps for arm:

export PATH="$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH"
export CC="armv7a-linux-androideabi16-clang"
export CXX="$CC++"

export AR="arm-linux-androideabi-ar"
export LD="arm-linux-androideabi-ld"
export AS="arm-linux-androideabi-as"
export STRIP="arm-linux-androideabi-strip"
export RANLIB="arm-linux-androideabi-ranlib"
export READELF="arm-linux-androideabi-readelf"

export CFLAGS=""
export CXXFLAGS=$CFLAGS
export LDFLAGS="-pie"

export CONFIG_SITE="config.site"

./configure --host=armv7a-linux-androideabi --build=x86_64-linux-gnu 
--disable-ipv6
make
make altinstall DESTDIR=$INSTALL_DIR

--

___
Python tracker 

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



[issue36162] error: implicit declaration of function 'sendfile' is invalid in C99

2019-03-01 Thread muhzi


New submission from muhzi :

I encountered yet another issue with cross compilation on android, it so 
happens that these errors occur only when I cross compile for non 64-bit archs. 
i.e. I could cross compile just fine for arm64 & x86_64 but the 32-bit version 
of these archs produces the following error during compilation:

./Modules/posixmodule.c:8457:19: error: implicit declaration of function 
'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ret = sendfile(out, in, NULL, count);
  ^
./Modules/posixmodule.c:8457:19: warning: this function declaration is not a 
prototype [-Wstrict-prototypes]
./Modules/posixmodule.c:8470:15: error: implicit declaration of function 
'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ret = sendfile(out, in, , count);
  ^
./Modules/posixmodule.c:9057:14: error: implicit declaration of function 
'truncate' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
result = truncate(path->narrow, length);
 ^
./Modules/posixmodule.c:9057:14: note: did you mean 'ftruncate'?
/home/muhzi/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/unistd.h:220:5:
 note: 'ftruncate' declared here
int ftruncate(int __fd, off_t __length) __RENAME(ftruncate64) 
__INTRODUCED_IN(12);
^
./Modules/posixmodule.c:9057:14: warning: this function declaration is not a 
prototype [-Wstrict-prototypes]
result = truncate(path->narrow, length);


I attached pyconfig.h for reference, it seems that the configuration step went 
fine. I checked that these missing functions are able to have their 
corresponding headers included. Also figured after misplacing some include 
lines in posixmodule.c that when the preprocessor includes Python.h it fails to 
include definitions from successively included headers.

--
components: Cross-Build
files: pyconfig.h
messages: 336958
nosy: Alex.Willmer, muhzi, xdegaye
priority: normal
severity: normal
status: open
title: error: implicit declaration of function 'sendfile' is invalid in C99
versions: Python 3.7
Added file: https://bugs.python.org/file48183/pyconfig.h

___
Python tracker 

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



[issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname)

2019-03-01 Thread Thomas Wouters


New submission from Thomas Wouters :

(good first issue, I think.)

CPython currently uses a few functions that are thread-unsafe where thread-safe 
version exist, at least in glibc (crypt() and ttyname(), at least). This isn't 
an issue when looking at CPython in isolation because these calls are guarded 
by the GIL, but it can be a problem if the C functions are called from other 
code (in an extension module, or from an application embedding CPython).

I expect it to be uncommon to be the case with crypt() and ttyname(), so it's 
probably not important to fix, but I do think these would make good first 
issues. crypt(), in particular, is called from a very self-contained (and 
otherwise) module, and could do with some other enhancements (proper error 
handling, properly #including crypt.h).

I suggest a new contributor (or someone new to C) take this on and do something 
like the following, using crypt as an example:
 - Add configure.ac checks for crypt.h and crypt_r()
 - In Modules/_cryptmodule.c, if present, import crypt.h and use crypt_r.
 - Check for a NULL return and raise OSerror, but possibly only when using 
crypt_r() (for compatibility with systems where crypt() doesn't do the right 
thing on error, perhaps).
 - Add tests for the new error handling (crypt() on glibc will return an error 
on invalid salts).

For ttyname() (called from Modules/posixmodule.c), the change would be simpler 
(it already handles errors), but a choice will have to be made about the size 
of the buffer to use, and whether to use a static buffer (which would be 
protected by the GIL).

There may be other functions being used in posixmodule or other modules that 
could conflict with non-CPython uses of the thread-unsafe functions that we 
could switch to thread-safe versions, but other than manually looking I'm not 
sure yet how to find them.

--
components: Interpreter Core
keywords: easy (C)
messages: 336957
nosy: Mariatta, cheryl.sabella, twouters
priority: normal
severity: normal
stage: needs patch
status: open
title: Use thread-safe functions instead of unsafe ones (crypt, ttyname)

___
Python tracker 

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



[issue36124] Provide convenient C API for storing per-interpreter state

2019-03-01 Thread Eric Snow


Change by Eric Snow :


--
assignee:  -> eric.snow

___
Python tracker 

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



[issue36124] Provide convenient C API for storing per-interpreter state

2019-03-01 Thread Eric Snow


Change by Eric Snow :


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



[issue32387] Disallow untagged C extension import on major platforms

2019-03-01 Thread Brett Cannon


Brett Cannon  added the comment:

It's 3.8 time now. :) Should we try and resolve this?

--

___
Python tracker 

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



[issue36043] FileCookieJar constructor don't accept PathLike

2019-03-01 Thread Brett Cannon


Change by Brett Cannon :


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



[issue36043] FileCookieJar constructor don't accept PathLike

2019-03-01 Thread miss-islington

miss-islington  added the comment:


New changeset 4b219ce81ed04234648a4ce4f0cb0865818abb38 by Miss Islington (bot) 
(Stéphane Wirtel) in branch 'master':
bpo-36043: FileCookieJar supports os.PathLike (GH-11945)
https://github.com/python/cpython/commit/4b219ce81ed04234648a4ce4f0cb0865818abb38


--
nosy: +miss-islington

___
Python tracker 

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



[issue36124] Provide convenient C API for storing per-interpreter state

2019-03-01 Thread Eric Snow


Change by Eric Snow :


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue35843] importlib.util docs for namespace packages innaccurate

2019-03-01 Thread Brett Cannon


Brett Cannon  added the comment:

Anyone have an opinion about the __getitem__ proposal? I'm fine with it but I 
wanted to make sure other import + namespace folks don't disagree.

--

___
Python tracker 

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



[issue36153] Freeze support documentation is misleading.

2019-03-01 Thread Brett Cannon


Change by Brett Cannon :


--
nosy: +davin, pitrou

___
Python tracker 

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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread Brett Cannon


Brett Cannon  added the comment:

Yes, the Mac installer should have installed everything, but software isn't 
perfect. :) I would try installing again.

--
nosy: +brett.cannon, ned.deily, ronaldoussoren

___
Python tracker 

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



[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-03-01 Thread Eric Snow


Eric Snow  added the comment:

I've merged the PR for hoisting eval_breaker before the ceval loop starts.  
@Raymond, see if that addresses the performance regression you've been seeing.

I'll close this issue after I've sorted out the buildbot issues David mentioned 
(on his Windows builders).

--

___
Python tracker 

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



[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-03-01 Thread Eric Snow


Eric Snow  added the comment:


New changeset bda918bf65a88560ec453aaba0758a9c0d49b449 by Eric Snow in branch 
'master':
bpo-33608: Simplify ceval's DISPATCH by hoisting eval_breaker ahead of time. 
(gh-12062)
https://github.com/python/cpython/commit/bda918bf65a88560ec453aaba0758a9c0d49b449


--

___
Python tracker 

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



[issue36124] Provide convenient C API for storing per-interpreter state

2019-03-01 Thread Eric Snow


Eric Snow  added the comment:

Thinking about this, what is the key difference with the existing 
PyModule_GetState() function?  Is it just the return type (module-defined void 
* vs. a regular dict)?  Certainly it provides a C-only namespace that all 
extensions can share (like PyThreadState_Get() does), but I'm not sure that's 
desirable.

Anyway, I'd rather not add PyInterpreterState_GetDict() if it is essentially 
equivalent to PyModule_GetState().

--

___
Python tracker 

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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread kellena


kellena  added the comment:

There isn't much. I downloaded this and installed it from python.org with the 
install wizard. Shouldn't all of the necessary environment variables have been 
added at that time?

$ env | grep PYTHON

PYTHONHOME=/usr/local/bin/python3

--

___
Python tracker 

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



[issue36159] Modify Formatter Class to handle arbitrary objects

2019-03-01 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +eric.smith

___
Python tracker 

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



[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-03-01 Thread Eric Snow


Eric Snow  added the comment:


New changeset b05b711a2cef6c6c381e01069dedac372e0b9fb2 by Eric Snow in branch 
'master':
bpo-33608: Use _Py_AddPendingCall() in _PyCrossInterpreterData_Release(). 
(gh-12024)
https://github.com/python/cpython/commit/b05b711a2cef6c6c381e01069dedac372e0b9fb2


--

___
Python tracker 

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



[issue36160] Multiple errors in test_site.py on sysconfig._CONFIG_VARS.clear() if run on its own

2019-03-01 Thread Ivan Pozdeev


Change by Ivan Pozdeev :


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

___
Python tracker 

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



[issue36160] Multiple errors in test_site.py on sysconfig._CONFIG_VARS.clear() if run on its own

2019-03-01 Thread Ivan Pozdeev


New submission from Ivan Pozdeev :

Sample failure:

> cpython\branches\3.7>python.bat -m test.test_site

Running Debug|x64 interpreter...
E.s.
==
ERROR: test_addpackage (__main__.HelperFunctionsTests)
--
Traceback (most recent call last):
  File "C:\Users\Sasha\Documents\cpython\branches\3.7\lib\test\test_site.py", li
ne 77, in tearDown
sysconfig._CONFIG_VARS.clear()
AttributeError: 'NoneType' object has no attribute 'clear'

==
ERROR: test_addpackage_import_bad_exec (__main__.HelperFunctionsTests)
--
Traceback (most recent call last):
  File "C:\Users\Sasha\Documents\cpython\branches\3.7\lib\test\test_site.py", li
ne 77, in tearDown
sysconfig._CONFIG_VARS.clear()
AttributeError: 'NoneType' object has no attribute 'clear'



The reason is that `sysconfig._CONFIG_VARS' is None until the first call to 
`sysconfig.get_config_vars()'. When the suite is used in conjunction with the 
others, other tests have already called it by the time test_site.py gets 
control.

--
components: Tests
messages: 336947
nosy: Ivan.Pozdeev
priority: normal
severity: normal
status: open
title: Multiple errors in test_site.py on sysconfig._CONFIG_VARS.clear() if run 
on its own
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 62be763348d16ba90f96667aa0240503261393f0 by Victor Stinner in 
branch 'master':
bpo-36142: Remove _PyMain structure (GH-12120)
https://github.com/python/cpython/commit/62be763348d16ba90f96667aa0240503261393f0


--

___
Python tracker 

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



[issue36159] Modify Formatter Class to handle arbitrary objects

2019-03-01 Thread Ross Biro


New submission from Ross Biro :

The only point in the string.Formatter class that really depends on string 
output is line 245: return ''.join(result), auto_arg_index.  

I'm currently working on a problem that would be much easier if I could get 
access to the result list instead of having that join called.

I propose creating another overridable method in string.Formatter, say oformat 
that calls _vformat and is called by vformat. oformat would have the guts of 
vformat and just return the result list.  vformat would then consist of the 
call ot oformat and the join.  See Below.  The recursive call to _vformat would 
also need some slight modification.

The work would not be difficult and I'm willing to do it, provided there is 
sufficient interest.

def vformat(self, format_string, args, kwargs):
result = self.oformat(format_string, args, kwargs)
return ''.join(result)

def oformat(self, format_string, args, kwargs):
used_args = set()
result, _ = self._vformat(format_string, args, kwargs, used_args, 2)
self.check_unused_args(used_args, args, kwargs)
return result

--
components: Library (Lib)
messages: 336945
nosy: Ross Biro
priority: normal
severity: normal
status: open
title: Modify Formatter Class to handle arbitrary objects
type: enhancement
versions: Python 2.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



[issue36158] Regex search behaves differently in list comprehension

2019-03-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Can you please add a short script with data for entities to try reproducing 
this?

>>> from re import compile
>>> name_regex = compile(r'\[\"([a-zA-Z\s]*)\"{1}')
>>> [name_regex.match(a).group(1) for a in ['["a"a]']]
['a']
>>> list(map(lambda a: name_regex.match(a).group(1), ['["a"a]']))
['a']

--
nosy: +xtreak

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2019-03-01 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

On 01.03.2019 20:27, Ivan Pozdeev wrote:
> The fact that this feature is mixed up with and often supplements 
> "real packages" that a program would explicitly use is actually 
> incidental: a package with a .pth does not need to have any 
> functionality intended for explicit use.
>
Eureka! So, there are actually two kinds of packages: "functional 
packages" to be used explicitly and "environment packages" to customize 
the execution environment. The infrastructure just doesn't distinguish 
between them and allows a package to combine both types of functionality 
for convenience.

By this logic, pywin32's .pth is effectively a private import hook to 
allow for its nonstandard structure. It could be in a separate 
"environment package" that would be a dependency but that would 
complicate things for no real gain.

The caveat with "environment packages" is that there are no predefined 
dependencies between them and between them and "functional packages". 
Their required execution order rather depends on user's needs. E.g. the 
order of import hooks' registration would matter if more than one can 
serve a specific name, and the user may prefer any of the options; 
whether some import hook is required to import some installed packages 
depends on the way they are installed.

This is the same with any other plugin functionality, too. And I'm not 
aware of any general solution because a solution is very situational. 
The best we can do here that I see is to allow the user (or, you guessed 
it, yet another "environment package" for manageability) to specify load 
order dependencies between .pth's.

--

___
Python tracker 

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



[issue35178] Typo/trivial mistake in warnings.py (may be related to 2.x to 3.x conversion)

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Tashrif Billah and  Karthikeyan Singaravelan for the fix!

Sadly, Python 3.6 now only accept security fixes, and so this bug cannot be 
fixed in the 3.6 branch anymore.

The workaround is the rename the last parameter of your customer formatmsg 
function to 'line' ;-)

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, 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



[issue35178] Typo/trivial mistake in warnings.py (may be related to 2.x to 3.x conversion)

2019-03-01 Thread miss-islington


miss-islington  added the comment:


New changeset b94874f7e27cbc92e0aec8779ee98bcb16efb257 by Miss Islington (bot) 
in branch '3.7':
bpo-35178: Fix warnings._formatwarnmsg() (GH-12033)
https://github.com/python/cpython/commit/b94874f7e27cbc92e0aec8779ee98bcb16efb257


--
nosy: +miss-islington

___
Python tracker 

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



[issue35478] multiprocessing: ApplyResult.get() hangs if the pool is terminated

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:

Pablo: since you worked on multiprocessing recently, did you see this bug? I'm 
not sure about my PR 11139...

If someone else wants to work on a fix, ignore my PR ;-)

--
nosy: +davin, pitrou

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2019-03-01 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

On 01.03.2019 3:58, Steve Dower wrote
> Import hooks can always be injected by a package __init__.py before the 
> importer will try and resolve the module, so nothing is needed there.

I thought the flaw in this reasoning in 
https://bugs.python.org/issue33944#msg320277 was obvious and didn't want 
to bother people refuting it. Apparently not.

To do anything in __init__.py, that __init__.py itself needs to be 
already importable. This very well may not be the case -- in fact, 
import hooks were designed specifically for the scenarios where this is 
not the case.

Imagine e.g. loading modules from a cloud storage (why not?) -- so 
nothing on the system at all except the hook. Or, suggested earlier in 
this ticket, a union namespace where the code to import needs to be 
constructed on the fly.

> .pth files really only satisfy the "run at startup because I'm a dependency 
> of something that my user wants and don't make them opt-in to my changed 
> behaviour"

Startup code (custom or not) is not a dependency of anything. It rather 
customizes the environment in which the program specified by the user would 
run, _before_ any user code could be allowed to get control. It is not a part 
of the program to be run but rather of the environment that the user wants, and 
it needs to be implicit so the user can use the same commands and code (compare 
venv). This is a required feature because the stock Python startup logic cannot 
possibly provide all the customizations that a user may need (compare initrd).

.pth's are equivalent to sitecustomize but allow the user to manage the set of 
code chunks automatically using the packaging infrastructure (compare .d 
directories in UNIX). The fact that this feature is mixed up with and often 
supplements "real packages" that a program would explicitly use is actually 
incidental: a package with a .pth does not need to have any functionality 
intended for explicit use.

> which I don't like 

If you don't like something, there's always a specific reason -- though you may 
not understand it consciously. So the way to go is dig into it, find out what 
specific speck is putting you off -- only then can you be sure that you are 
concentrating on the right thing and won't throw the baby out with the 
bathwater. Try to change one trait in your mind's eye leaving all else intact 
-- will the feeling go away? If it will, you are on the right track; can the 
trait you chose be split further? You know you found it when you can't change 
any further part and change the feeling and you can say with confidence how 
exactly what it's doing misaligns with your moral compass.

We already identified a few real reasons: hard to see, hard to debug, 
encourages unreadable code, run in arbitrary order when the order matters (and 
IIRC I provided fixes for all). What else?

--

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, I splitted my giant PR 12068 into multiple small commits. So they are 
easier to review and understand ;-) I close the issue.

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



[issue27640] add the '--disable-test-suite' option to configure

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:

I modified setup.py to add a new TEST_EXTENSIONS which allows to not build test 
extensions:

New changeset cfe172dc6bd0a02d36db31ffabcc38f9320a4510 by Victor Stinner in 
branch 'master':
bpo-36146: Add TEST_EXTENSIONS to setup.py (GH-12129)
https://github.com/python/cpython/commit/cfe172dc6bd0a02d36db31ffabcc38f9320a4510

setup.py should be modified manually, but it's a small step towards be able to 
build Python without tests ;-)

--

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset cfe172dc6bd0a02d36db31ffabcc38f9320a4510 by Victor Stinner in 
branch 'master':
bpo-36146: Add TEST_EXTENSIONS to setup.py (GH-12129)
https://github.com/python/cpython/commit/cfe172dc6bd0a02d36db31ffabcc38f9320a4510


--

___
Python tracker 

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



[issue36158] Regex search behaves differently in list comprehension

2019-03-01 Thread Matthew Drago


New submission from Matthew Drago :

Say for example i want to apply a regex on a list of strings. 

Using list comprehension as such results in the group method not being found.
```
name_regex = compile(r'\[\"([a-zA-Z\s]*)\"{1}')

named_entities = [name_regex.match(entity.trigger).group(1) for entity in 
entities[0]]
```
This unexpected behavior can also be observed when implementing this using a 
map.

```
list(map(lambda x: name_regex.search(x.trigger).group(), entities[0])) 
```

However using the traditional for loop implementation the group method is 
resolved.
```
named_entities = []
for entity in entities[0]:
   named_entities.append(name_regex.match(entity.trigger).group(1))
```

--
components: Regular Expressions
messages: 336936
nosy: Matthew Drago, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: Regex search behaves differently in list comprehension
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue35178] Typo/trivial mistake in warnings.py (may be related to 2.x to 3.x conversion)

2019-03-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12133

___
Python tracker 

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



[issue35178] Typo/trivial mistake in warnings.py (may be related to 2.x to 3.x conversion)

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset be7c460fb50efe3b88a00281025d76acc62ad2fd by Victor Stinner 
(Xtreak) in branch 'master':
bpo-35178: Fix warnings._formatwarnmsg() (GH-12033)
https://github.com/python/cpython/commit/be7c460fb50efe3b88a00281025d76acc62ad2fd


--

___
Python tracker 

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



[issue31689] random.choices does not work with negative weights

2019-03-01 Thread Ted Whalen


Ted Whalen  added the comment:

I think this should be reopened, as the behavior doesn't always raise an error, 
and, in fact, does something very unexpected:

Python 3.7.2 (default, Jan 13 2019, 12:50:01)
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import Counter
>>> from random import choices
>>> Counter(choices("abcdefg", weights=(1,1,-1,1,1,0,1), k=1))
Counter({'a': 2569, 'b': 2514, 'e': 2487, 'g': 2430})

It's really not clear to me why supplying a negative weight for "c" should have 
any effect on "d".

--
nosy: +Ted Whalen

___
Python tracker 

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



[issue36153] Freeze support documentation is misleading.

2019-03-01 Thread Sridhar Iyer


Sridhar Iyer  added the comment:

Please find the attached python file where the issue is seen.
The cli to create an executable was:
$pyinstaller run_server_min.spec

Here are the contents of the file (this doesn't support multiple file uploads):

# -*- mode: python ; coding: utf-8 -*-

block_cipher = None


a = Analysis(['run_server_min.py'],
 pathex=[''],
 binaries=[],
 datas=[],
 hiddenimports=['sklearn.neighbors.typedefs', 
'sklearn.neighbors.quad_tree', 'sklearn.tree._utils', 'xgboost', 
'xgboost.libpath'],
 hookspath=['pyhooks'],
 runtime_hooks=[],
 excludes=[],
 win_no_prefer_redirects=False,
 win_private_assemblies=False,
 cipher=block_cipher,
 noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
 cipher=block_cipher)
exe = EXE(pyz,
  a.scripts,
  a.binaries,
  a.zipfiles,
  a.datas,
  [],
  name='run_server_min',
  debug=False,
  bootloader_ignore_signals=False,
  strip=False,
  upx=False,
  runtime_tmpdir=None,
  console=True )
=

$ pyinstaller run_server_min.spec
69 INFO: PyInstaller: 3.5.dev0+cb8d10af6
69 INFO: Python: 3.6.7
70 INFO: Platform: Linux-3.16.0-77-generic-x86_64-with-debian-jessie-sid
...

When your run ./dist/run_server_min that is generated, it'll spawn the process 
multiple times. The issue goes away when you add freeze_support on the top.

--
Added file: https://bugs.python.org/file48182/run_server_min.py

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 91b9ecf82c3287b45f39158c5134a87414ff26bc by Victor Stinner in 
branch 'master':
bpo-36142: Add preconfig.c (GH-12128)
https://github.com/python/cpython/commit/91b9ecf82c3287b45f39158c5134a87414ff26bc


--

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12132

___
Python tracker 

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



[issue27321] Email parser creates a message object that can't be flattened

2019-03-01 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

@r.david.murray, it appears that all your requested changes have been addressed 
on the PR.  Please re-review this when you get a chance.  Thanks!

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

___
Python tracker 

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



[issue36157] Document PyInterpreterState_Main().

2019-03-01 Thread Eric Snow


New submission from Eric Snow :

PyInterpreterState_Main() is a function in the public C-API that returns a 
pointer to the main interpreter's state.  The main interpreter is the first one 
created by the CPython runtime during startup (e.g. when the "python" command 
is run).

Documentation for PyInterpreterState_Main() should be on the "Initialization, 
Finalization, and Threads" page of the C-API docs, probably in the 
"Sub-interpreter support" section. [1]  It could also possibly go in the 
"Advanced Debugger Support" section. [2]

FYI, I added PyInterpreterState_Main() at PyCon US 2017 (commit 
f5df46d701d29baf738365da6fcf1b8a3ceabb71) when I merged Nick Coghlan's internal 
implementation of PEP 432.  So it has been available since 3.7.


[1] https://docs.python.org/3/c-api/init.html#sub-interpreter-support
[2] https://docs.python.org/3/c-api/init.html#advanced-debugger-support

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 336929
nosy: docs@python, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Document PyInterpreterState_Main().
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12131

___
Python tracker 

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



[issue36116] test_multiprocessing_spawn fails on AMD64 Windows8 3.x

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:

https://buildbot.python.org/all/#/builders/32/builds/2219

FAIL: test_mymanager_context_prestarted 
(test.test_multiprocessing_spawn.WithManagerTestMyManager)
Re-running failed tests in verbose mode
Re-running test 'test_multiprocessing_spawn' in verbose mode
FAIL: test_mymanager_context_prestarted 
(test.test_multiprocessing_spawn.WithManagerTestMyManager)

--

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c991f2415d4eef663039a83125aa6aad81672680 by Victor Stinner in 
branch 'master':
bpo-36146: Don't run code at setup.py top level (GH-12127)
https://github.com/python/cpython/commit/c991f2415d4eef663039a83125aa6aad81672680


--

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12130

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5ec33a1c25a586552751ca35c85ab7ecb6b06ec3 by Victor Stinner in 
branch 'master':
bpo-36146: Split setup.py into subfunctions (GH-12125)
https://github.com/python/cpython/commit/5ec33a1c25a586552751ca35c85ab7ecb6b06ec3


--

___
Python tracker 

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



[issue13055] Distutils tries to handle null versions but fails

2019-03-01 Thread Roundup Robot


Change by Roundup Robot :


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



[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-03-01 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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread Inada Naoki


Inada Naoki  added the comment:

> Fatal Python error: initfsencoding: unable to load the file system codec
>
> ModuleNotFoundError: No module named 'encodings'

OK, this is the important part which describes what Python failed.

In this case, Python can't find it's very important standard library; 
'encodings'.

You may remove it, or you configured Python badly via environment variables.
Try `env | grep PYTHON` in your terminal.  Any environment variables
relating to Python is configured?

--

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 95e2cbf32f8156c239b27dae558ba058d0f2d496 by Victor Stinner in 
branch 'master':
bpo-36142: Move command line parsing to coreconfig.c (GH-12123)
https://github.com/python/cpython/commit/95e2cbf32f8156c239b27dae558ba058d0f2d496


--

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12128

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 625dbf2567533e6001d57e5969fba75c1b6ece43 by Victor Stinner in 
branch 'master':
bpo-36146: Refactor setup.py: Add PyBuildExt.srcdir (GH-12124)
https://github.com/python/cpython/commit/625dbf2567533e6001d57e5969fba75c1b6ece43


--

___
Python tracker 

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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread kellena


kellena  added the comment:

When I run python3 in a terminal window, I get the same pop-up window with 
"Python quit unexpectedly error." In the terminal, I get:

Fatal Python error: initfsencoding: unable to load the file system codec

ModuleNotFoundError: No module named 'encodings'


Current thread 0x00011422c5c0 (most recent call first):

Abort trap: 6

--

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12127

___
Python tracker 

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



  1   2   >