[issue34447] ttk.TreeView (and maybe other functions) is overzealous in converting item values to ints

2018-08-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29620] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size

2018-08-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
versions: +Python 2.7, Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue29620] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size

2018-08-20 Thread William Schwartz


William Schwartz  added the comment:

I am also running into this problem. I'm not 100%, but I'm pretty sure that 
looping over sys.modules and accessing __warningregistry__ on each module 
triggers one of my module's __getattr__ functions (PEP 562), which in turn uses 
setuptools entry points to import an arbitrary set of other modules.

Bizarrely, however, I cannot reproduce on macOS, only Linux. Presumably there's 
something platform dependent about how the default unittest test runner orders 
my tests, and hence which modules have already been loaded by the time I call 
assertWarnsRegex.

--
nosy: +William.Schwartz

___
Python tracker 

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



[issue34417] imp.find_module reacts badly to iterator

2018-08-20 Thread Phillip M. Feldman


Phillip M. Feldman  added the comment:

It appears that the `importlib` package has the same issue: One can't
provide an iterator for the path.  When searching a large folder tree for
an item that is likely to be found early in the search process (i.e., at a
high level in the folder tree), the available functionality is massively
inefficient.  So, I wrote my own wrapper for `imp.find_module` to do this
job, and will eventually modify this code to use `importlib` instead of
`imp`.

On Fri, Aug 17, 2018 at 9:05 AM Eric Snow  wrote:

>
> Eric Snow  added the comment:
>
> There are several issues at hand here, Phillip.  I'll enumerate them below.
>
> Thanks for taking the time to let us know about this.  However, I'm
> closing this issue since realistically the behavior of imp.find_module()
> isn't going to change, particularly in Python 2.7.  Even though the issue
> is closed, feel free to reply, particularly about how you are using
> imp.find_module() (we may be able to point you toward how to use importlib
> instead).
>
> Also, I've changed this issue's type to "enhancement".  imp.find_module()
> is working as designed, so what you are looking for is a feature request.
> Consequently there's a much higher bar for justifying a change.  Here are
> reasons why the requested change doesn't reach that bar:
>
> 1. Python 2.7 is closed to new features.
>
> So imp.find_module() is not going to change.
>
> 2. Python 2.7 is nearing EOL.
>
> We highly recommend that everyone move to Python 3 as soon as possible.
> Hopefully you are in a position to do so.  If you're stuck on Python 2.7
> then you miss the advantages of importlib, along with a ton of other
> benefits.
>
> If you are not going to be able to migrate before 2020 then send an email
> to python-l...@python.org asking for recommendations on what to do.
>
> 3. Starting in Python 3.4, using the imp module is discouraged/deprecated.
>
>   "Deprecated since version 3.4: The imp package is pending deprecation in
> favor of importlib." [1]
>
> The importlib package should have everything you need.  What are you using
> imp.find_module() for?  We should be able to demonstrate the equivalent
> using importlib.
>
> 4. The import machinery is designed around using a list (the builtin type,
> not the concept) for the "module search path".
>
> * imp.find_module(): "the list of directory names given by sys.path is
> searched" [2]
> * imp.find_module(): "Otherwise, path must be a list of directory names"
> [2]
> * importlib.find_loader() (deprecated): "optionally within the specified
> path" (which defaults to sys.path) [3]
> * importlib.util.find_spec(): doesn't even have a "path" parameter [4]
> * ModuleSpec.submodule_search_locations: "List of strings for where to
> find submodules" [5]
> * sys.path: "A list of strings that specifies the search path for modules.
> ... Only strings and bytes should be added to sys.path; all other data
> types are ignored during import." [6]
>
>
> [1] https://docs.python.org/3/library/imp.html#module-imp
> [2] https://docs.python.org/3/library/imp.html#imp.find_module
> [3] https://docs.python.org/3/library/importlib.html#importlib.find_loader
> [4]
> https://docs.python.org/3/library/importlib.html#importlib.util.find_spec
> [5]
> https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec.submodule_search_locations
> [6] https://docs.python.org/3/library/sys.html#sys.path
>
> --
> nosy: +brett.cannon, eric.snow
> resolution:  -> wont fix
> stage:  -> resolved
> status: open -> closed
> type: behavior -> enhancement
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue34447] ttk.TreeView (and maybe other functions) is overzealous in converting item values to ints

2018-08-20 Thread Andrew Barnert


New submission from Andrew Barnert :

See this StackOverflow question for a repro case: 
https://stackoverflow.com/questions/51941260/

If you store a string that looks like an int in a TreeView's values, then call 
widget.item(row), the dict's 'values' value has that string converted to an int.

This seems reasonable, because it's legal to store an int in a TreeView, and if 
tkinter didn't convert the values, you'd store 123 and get back '123'.

However, I think it should only be converting strings that could be a valid Tcl 
int. If you store the int 123_456, Tcl of course gives you back '123456', not 
'123_456', so there's no reason for tkinter to convert '123_456' to an int. But 
it does, because ttk._tclobj_to_py just does a try: return int(s).

---

Maeanwhile, if you instead call widget.item(row, options='values'), the string 
is left alone. 

At first glance, that made sense. But looking into what tkinter is getting back 
from Tcl, there's really no difference here. The tuple ('180518-23', 
'23/06/18') is no more or less conversion-worthy than the same tuple inside the 
list (, '', , '', , ('180518-23', '23/06/18'), , 0, 
, ''). It's just that ttk._val_or_dict doesn't call 
_tclobj_to_py on the value when it gets back a key-value pair, and I don't see 
why it shouldn't.

However, that turns out to be a handy workaround for the Stack Overflow user 
who ran into this problem, so maybe it's better not to change that.

--
components: Tkinter
messages: 323819
nosy: abarnert
priority: normal
severity: normal
status: open
title: ttk.TreeView (and maybe other functions) is overzealous in converting 
item values to ints
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue33187] Document ElementInclude (XInclude) support in ElementTree

2018-08-20 Thread underscore_asterisk


underscore_asterisk  added the comment:

Hello,

Can I take this up? I will create a PR either later today or tomorrow.

--
nosy: +underscore_asterisk

___
Python tracker 

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



[issue34410] Segfault/TimeoutError: itertools.tee of multiprocessing.pool.imap_unordered

2018-08-20 Thread Xiang Zhang


Xiang Zhang  added the comment:

It seems to me the problem is tee objects might encounter race conditions while 
 `PyIter_Next` in `teedataobject_getitem` releases GIL. Other threads then 
might get into the same branch since `tdo->numread` haven't been updated yet. 
NULL slots are generated then, 2 objects are read from the underlying iterator 
and `tdo->numread` is updated twice while only one slot is set.

As for multiprocessing.pool, there is a background task handling thread 
consuming one tee object and main thread consuming another one. The underlying 
iterator is `IMapIterator` which `next` method would block on a condition.

While trying, I find the following snippet would also crash:

import threading
import itertools

class C:
def __iter__(self):
return self
def __next__(self):
return 1

def test(i):
print(list(i))

i1, i2 = itertools.tee(C())
threading.Thread(target=test, args=(i1,)).start()
print(list(i2))

GDB shows it crashs in `teedataobject_dealloc` -> `teedataobject_clear`. I 
haven't understood what happened.

--

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-08-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I'll merge it if it looks good to you.

--

___
Python tracker 

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



[issue34400] Undefined behavior in Parser/parsetok.c

2018-08-20 Thread miss-islington


miss-islington  added the comment:


New changeset e496b2b57a7b6e2633b741b1d5a934a7004ea3da by Miss Islington (bot) 
in branch '3.6':
bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833)
https://github.com/python/cpython/commit/e496b2b57a7b6e2633b741b1d5a934a7004ea3da


--

___
Python tracker 

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



[issue34400] Undefined behavior in Parser/parsetok.c

2018-08-20 Thread miss-islington


miss-islington  added the comment:


New changeset 985dcd49cab44bba63ffebe413a9ef17b3da5fa7 by Miss Islington (bot) 
in branch '3.7':
bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833)
https://github.com/python/cpython/commit/985dcd49cab44bba63ffebe413a9ef17b3da5fa7


--

___
Python tracker 

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



[issue34400] Undefined behavior in Parser/parsetok.c

2018-08-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8317

___
Python tracker 

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



[issue34400] Undefined behavior in Parser/parsetok.c

2018-08-20 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 3e26e42c905852394fa136f1cc564dac98b56166 by Benjamin Peterson 
(Zackery Spytz) in branch 'master':
bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833)
https://github.com/python/cpython/commit/3e26e42c905852394fa136f1cc564dac98b56166


--

___
Python tracker 

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



[issue34400] Undefined behavior in Parser/parsetok.c

2018-08-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8316

___
Python tracker 

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



[issue34171] Lib/trace.cover not removed by the clean target

2018-08-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue34171] Lib/trace.cover not removed by the clean target

2018-08-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PR 8841 prevents creating Lib/trace.cover when run the trace module.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34171] Lib/trace.cover not removed by the clean target

2018-08-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +8315

___
Python tracker 

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



[issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__

2018-08-20 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


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



[issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__

2018-08-20 Thread miss-islington


miss-islington  added the comment:


New changeset d1f0ccc7e65ef7abeab779f5d0aca2f18eb9b2a4 by Miss Islington (bot) 
in branch '3.7':
bpo-34441: Fix ABC.__subclasscheck__ crash on classes with invalid 
__subclasses__ (GH-8835)
https://github.com/python/cpython/commit/d1f0ccc7e65ef7abeab779f5d0aca2f18eb9b2a4


--
nosy: +miss-islington

___
Python tracker 

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



[issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__

2018-08-20 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset cdbf50cba1664f72ae6621a89c324a32fea70377 by Berker Peksag (Alexey 
Izbyshev) in branch 'master':
bpo-34441: Fix ABC.__subclasscheck__ crash on classes with invalid 
__subclasses__ (GH-8835)
https://github.com/python/cpython/commit/cdbf50cba1664f72ae6621a89c324a32fea70377


--
nosy: +berker.peksag

___
Python tracker 

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



[issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__

2018-08-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8314

___
Python tracker 

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



[issue34446] ambiguous _max_size parameter in SpooledTemporaryFile

2018-08-20 Thread jcc2220


New submission from jcc2220 :

When _max_size is set to 0, the _check method will never call rollover, as the 
conditional for a rollover is never satisfied.  However, in the truncate 
method, the _max_size is not checked against 0, and so a rollover could be 
called when it is 0.  This is more of an issue of consistency - should 0 mean 
that it will never rollover?  If so, truncate should be modified.  Should 0 be 
interpreted as 'always rollover'?  If so, the _check should be modified.  
Personally, I'd rather have something like -1 mean never, 0 mean always, and >0 
mean only when greater than specified size.


John

--
components: Library (Lib)
messages: 323809
nosy: jcc2220
priority: normal
severity: normal
status: open
title: ambiguous _max_size parameter in SpooledTemporaryFile
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



[issue34007] test_gdb fails in s390x SLES buildbots

2018-08-20 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This failure seems related to the issue:

https://buildbot.python.org/all/#/builders/139/builds/74

=
FAIL: test_threads (test.test_gdb.PyBtTests)
Verify that "py-bt" indicates threads that are waiting for the GIL
--
Traceback (most recent call last):
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_gdb.py", 
line 808, in test_threads
self.assertIn('Waiting for the GIL', gdb_output)
test test_gdb failed -- Traceback (most recent call last):
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_gdb.py", 
line 808, in test_threads
self.assertIn('Waiting for the GIL', gdb_output)
AssertionError: 'Waiting for the GIL' not found in 'Breakpoint 1 
(PyObject_Print) pending.\n.

--

___
Python tracker 

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



[issue34404] test_time incorrectly defined

2018-08-20 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
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-08-20 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue34365] datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses"

2018-08-20 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue34407] datetime.time.isoformat function has inconsistent behavior with timezone

2018-08-20 Thread Paul Ganssle


Paul Ganssle  added the comment:

For one thing, this is not how pytz is supposed to be used. You have fallen 
prey to one of the most common errors when using pytz. See my blog post: 
https://blog.ganssle.io/articles/2018/03/pytz-fastest-footgun.html

The issue at hand is also more about what `pytz`'s time zones do than anything 
to do with `datetime.time`. If you use the correct `pytz` interface, you get:

>>> pytz.timezone('Asia/Seoul').localize(time(**t))
pytz/tzinfo.py in localize(self, dt, is_dst)
321 possible_loc_dt = set()
322 for delta in [timedelta(days=-1), timedelta(days=1)]:
--> 323 loc_dt = dt + delta
324 idx = max(0, bisect_right(
325 self._utc_transition_times, loc_dt) - 1)

TypeError: unsupported operand type(s) for +: 'datetime.time' and 
'datetime.timedelta'

Though this could rightly be called a bug in `pytz`. However, even using 
`dateutil`, you will find that this doesn't work:

>time(**t, tzinfo=tz.gettz('Asia/Seoul')).isoformat()
'12:31:21.213456'

The reason is that attaching a `tzinfo` to `datetime.time` barely makes sense, 
and doesn't work if the time zone depends on the day (e.g. anything with DST), 
because you don't *know* what day it is, so you can't get an offset. As a 
result, when `isoformat` attempts to query the datetime for `utcoffset()` it 
gets `None`, and thus has nothing to print.

It works for some of the ones you mentioned because those ones are fixed 
offsets that never change, and so there *is* a valid value for it, even if no 
date component is present. See:

>>> time(**t, tzinfo=tz.tzoffset("EST", -18000))
datetime.time(12, 31, 21, 213456, tzinfo=tzoffset('EST', -18000))

>>> time(**t, tzinfo=tz.tzoffset("EST", -18000)).isoformat()
'12:31:21.213456-05:00'

I believe this issue can be closed.

--
nosy: +p-ganssle

___
Python tracker 

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



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

2018-08-20 Thread Brett Cannon


Brett Cannon  added the comment:

Any interest in submitting a pull request to update the documentation?

--
assignee:  -> docs@python
components: +Documentation
nosy: +brett.cannon, docs@python
title: Removal of kwargs for int() etc not described as change -> Removal of 
kwargs for built-in types not covered with "changed in Python" note in 
documentation

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-08-20 Thread Matthias Klose


Matthias Klose  added the comment:

fine! what prevents merging and backporting this issue?

--

___
Python tracker 

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



[issue33569] dataclasses InitVar does not maintain any type info

2018-08-20 Thread Augusto Hack


Augusto Hack  added the comment:

I have made some changes to expose the InitVar type, they are available here:

https://github.com/hackaugusto/dataclasses/tree/initvar_type

Are these changes sufficient?

--
nosy: +hack.augusto

___
Python tracker 

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



[issue34443] enum repr should use __qualname__

2018-08-20 Thread Ethan Furman


Change by Ethan Furman :


--
assignee:  -> ethan.furman

___
Python tracker 

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



[issue34445] asyncio support in doctests

2018-08-20 Thread Stefan Tjarks


New submission from Stefan Tjarks :

When writing a docstring for an async function I wrote a doctest for it.

```
async def hello_world():
"""
Will great the world with a friendly hello.

>>> await hello_world()
"hello world"
"""
return "hello world"
```

I kind of expected an error that no event loop is running but actually get a 
SyntaxError.

```
**
File "asyncdoctest.py", line 5, in __main__.hello_world
Failed example:
await hello_world()
Exception raised:
Traceback (most recent call last):
  File "/usr/lib/python3.6/doctest.py", line 1330, in __run
compileflags, 1), test.globs)
  File "", line 1
await hello_world()
^
SyntaxError: invalid syntax
**
1 items had failures:
   1 of   1 in __main__.hello_world
***Test Failed*** 1 failures.
```

Is the SyntaxError intentional or does doctest simply not support asyncio 
syntax?

--
components: Library (Lib), asyncio
files: asyncdoctest.py
messages: 323803
nosy: Stefan Tjarks, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio support in doctests
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file47756/asyncdoctest.py

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-08-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

platform-no-distutils.diff restores the original bug: "2.9" > "2.10".

PR 8356 removes the dependency from distutils and use a sophisticated function 
for parsing versions.

--

___
Python tracker 

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



[issue34443] enum repr should use __qualname__

2018-08-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

__qualname__ should be used only together with __module__.

I agree that the repr of enum should be more consistent with the repr of class.

--
nosy: +barry, eli.bendersky, ethan.furman, serhiy.storchaka
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



[issue34444] Module's __file__ should be absolute always ("." in sys.path)

2018-08-20 Thread daniel hahler


New submission from daniel hahler :

With "." in sys.path the "__file__" attribute will be a relative path, and 
therefore cannot be used after "chdir".

This likely affects relative paths in general, but have not tested it.

```
import os
import sys

sys.path.insert(0, '.')

# Importing it before chdir already causes failure.
import imported

os.chdir('/')
print(imported.__file__)  # ./imported.py
assert imported.__file__ == os.path.abspath(imported.__file__)
```

It works for "" in sys.path (https://bugs.python.org/issue18416).

--
components: Interpreter Core
messages: 323800
nosy: blueyed
priority: normal
severity: normal
status: open
title: Module's __file__ should be absolute always ("." in sys.path)
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



[issue31715] Add mimetype for extension .mjs

2018-08-20 Thread Mariatta Wijaya


Change by Mariatta Wijaya :


--
nosy: +barry, r.david.murray

___
Python tracker 

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



[issue34443] enum repr should use __qualname__

2018-08-20 Thread Walter Dörwald

Change by Walter Dörwald :


--
keywords: +easy

___
Python tracker 

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



[issue34443] enum repr should use __qualname__

2018-08-20 Thread Walter Dörwald

New submission from Walter Dörwald :

The __repr__ output of an enum class should use __qualname__ instead of 
__name__. The following example shows the problem:

import enum

class X:
   class I:
  pass

class Y:
   class I(enum.Enum):
  pass

print(X.I)
print(Y.I)

This prints:




I would have expected it to print




or even for maximum consistency




--
components: Library (Lib)
messages: 323799
nosy: doerwalter
priority: normal
severity: normal
status: open
title: enum repr should use __qualname__
type: enhancement

___
Python tracker 

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



[issue34425] :s formatting broken for objects without __format__

2018-08-20 Thread Jason Spencer


Jason Spencer  added the comment:

Then I would argue that it is at least a documentation bug.  The 3.6 format
spec mini language still claims that {} is equivalent to {:s}, which now is
only conditionally true.

I would also argue that having different behavior for {} and {:s}, which
are semantically the same in the client's eye, forces the client code to
understand more about the object they are stringifying than should be
necessary.  If one works, so should the other by all descriptions of the
format spec.  If the format spec is *just* ':s', the library should call
the target's __str__ if __format__ is not defined.  The library seems
willing to do this for the empty format string, but not when the client
code specifically asks for a string

On Sat, Aug 18, 2018 at 10:12 AM Eric V. Smith 
wrote:

>
> Eric V. Smith  added the comment:
>
> I agree this is the desired behavior, and not a bug.
>
> Because you are not specifying a __format__ in your class,
> object.__format__ is being called. By design, it does not understand any
> formatting specifiers, instead reserving them for your class to implement.
> "!s" is the correct way to convert your type to a string. Either that, or
> add a __format__ that understands "s".
>
> Note that not all types understand "s", for example, datetime.
>
> --
> assignee:  -> eric.smith
> nosy: +eric.smith
> stage:  -> resolved
> status: pending -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-20 Thread Michael Felt


Michael Felt  added the comment:

Although the default is different (i.e., roman8 versus latin1 (iso8859-1)) both 
HP-UX and AIX (like Windows, cp1252) this issue and issue 33347 are related.

As I mentioned in https://bugs.python.org/issue34347#msg323319 the string seen 
by self.get_output() is not the same string as "expected".

If I recall, there may be a way to almost get the two be the same - excect 
"expected" is a bytes object and the value returned as CLI output is a regular 
string.

I am thinking, maybe the "easy" way will be to add AIX, HP-UX, and others to 
skip this test. Rather than hard-code, do a query to see what the default is, 
and it it is not UTF-8 - skip the test.

In any case, it seems to be broken for any system that does not have UTF-8 as 
default.

--
nosy: +Michael.Felt

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-08-20 Thread Matthias Klose


Change by Matthias Klose :


Added file: https://bugs.python.org/file47755/platform-no-distutils.diff

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-08-20 Thread Matthias Klose


Matthias Klose  added the comment:

proposed patch attached

--

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-08-20 Thread Matthias Klose


Matthias Klose  added the comment:

no, it's not fixed at all. Setting as a release blocker for 3.6 and 3.7.

--
keywords: +3.6regression, 3.7regression
nosy: +benjamin.peterson, ned.deily
priority: normal -> release blocker

___
Python tracker 

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



[issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac

2018-08-20 Thread Xiang Zhang


Change by Xiang Zhang :


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



[issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac

2018-08-20 Thread Xiang Zhang


Xiang Zhang  added the comment:


New changeset 95f9e14e33b713f35f5368acf7be56750bbdb5a8 by Xiang Zhang in branch 
'2.7':
[2.7] bpo-30411: Use --git-dir instead of -C to make git work under version 
below 1.8.5. (GH-8744) (GH-8838)
https://github.com/python/cpython/commit/95f9e14e33b713f35f5368acf7be56750bbdb5a8


--

___
Python tracker 

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



[issue34442] zlib module not built on windows

2018-08-20 Thread Zachary Ware


Zachary Ware  added the comment:

Hi Stephen,

zlib is built into the core binary (pythonXY.dll) when you build with 
`IncludeExternals`; see PCbuild/pythoncore.vcxproj.  Using PCbuild/build.bat 
should do that automatically (unless you tell it not to), but if it's not we 
may need to fix something.

--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
stage:  -> test needed

___
Python tracker 

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



[issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac

2018-08-20 Thread miss-islington


miss-islington  added the comment:


New changeset 2011dd77b6bd6f02f54ceef9a80a22bd373b66e2 by Miss Islington (bot) 
in branch '3.7':
bpo-30411: Use --git-dir instead of -C to make git work under version below 
1.8.5. (GH-8744)
https://github.com/python/cpython/commit/2011dd77b6bd6f02f54ceef9a80a22bd373b66e2


--
nosy: +miss-islington

___
Python tracker 

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



[issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac

2018-08-20 Thread Xiang Zhang


Change by Xiang Zhang :


--
pull_requests: +8313

___
Python tracker 

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



[issue34442] zlib module not built on windows

2018-08-20 Thread Stephen Kelly


New submission from Stephen Kelly :

I tried to build python 3.7.0 from source.

I ran the PCBuild/build.bat script. That downloaded zlib to the external/ 
directory.

However, it does not seem to be built. When running I get:

python\3.7.0\lib\zipfile.py", line 646, in _check_compression   

"Compression requires the (missing) zlib module")   

 
RuntimeError: Compression requires the (missing) zlib module  

I examined PCBuild/pcbuild.proj. It makes no mention of zlib, though it 
mentions other externals.

I notice that Python 3.6.1 contained zlib in Modules/zlib instead of coming 
from external/.

Presumably that source was moved, but the Windows-related scripts were not 
updated.

--
components: Extension Modules
messages: 323791
nosy: steveire
priority: normal
severity: normal
status: open
title: zlib module not built on windows
type: compile error
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



[issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac

2018-08-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8312

___
Python tracker 

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



[issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac

2018-08-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8311

___
Python tracker 

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



[issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac

2018-08-20 Thread Xiang Zhang


Xiang Zhang  added the comment:


New changeset 4c8555773a801f957297132a92c0acb382d640e4 by Xiang Zhang in branch 
'master':
bpo-30411: Use --git-dir instead of -C to make git work under version below 
1.8.5. (GH-8744)
https://github.com/python/cpython/commit/4c8555773a801f957297132a92c0acb382d640e4


--

___
Python tracker 

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



[issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__

2018-08-20 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


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

___
Python tracker 

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



[issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__

2018-08-20 Thread Alexey Izbyshev


New submission from Alexey Izbyshev :

>>> from abc import ABCMeta
>>> class S(metaclass=ABCMeta):
...   __subclasses__ = None
... 
>>> issubclass(int, S)
Segmentation fault (core dumped)

This is the result of missing NULL check for 'subclasses' in 
_abc__abc_subclasscheck_impl (Modules/_abc.c):

/* 6. Check if it's a subclass of a subclass (recursive). */
subclasses = PyObject_CallMethod(self, "__subclasses__", NULL);
if (!PyList_Check(subclasses)) {
PyErr_SetString(PyExc_TypeError, "__subclasses__() must return a list");
goto end;
}

Reported by Svace static analyzer.

--
components: Extension Modules
messages: 323789
nosy: inada.naoki, izbyshev, levkivskyi, serhiy.storchaka
priority: normal
severity: normal
status: open
title: NULL dereference when issubclass() is called on a class with bogus 
__subclasses__
type: crash
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



[issue34440] Certificate verify failed (works fine in 3.6)

2018-08-20 Thread Lennart Grahl


Lennart Grahl  added the comment:

Cheers!

--

___
Python tracker 

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



[issue34438] do_handshake stuck in ssl.py

2018-08-20 Thread Christian Heimes


Christian Heimes  added the comment:

It's hard to say what the culprit is. A blocked handshake often indicates a 
network or a server problem. Either something went wrong between the client and 
the server or the server refuses to finalize the handshake.

I suggest that you add a timeout and handle the timeout from our application. 
There is nothing I can do from Python's ssl module.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue34400] Undefined behavior in Parser/parsetok.c

2018-08-20 Thread Zackery Spytz


Change by Zackery Spytz :


--
pull_requests: +8309

___
Python tracker 

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



[issue34440] Certificate verify failed (works fine in 3.6)

2018-08-20 Thread Christian Heimes


Christian Heimes  added the comment:

Python 3.6 is a little more forgiving than Python 3.7. Python 3.7 uses 
OpenSSL's hostname verification algorithms, which interpret the RFCs more 
strictly. You have to include a SAN field of type IP address. Matching against 
CN has been deprecated for more than 15 years, see 
https://bugs.chromium.org/p/chromium/issues/detail?id=308330

--

___
Python tracker 

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



[issue34440] Certificate verify failed (works fine in 3.6)

2018-08-20 Thread Lennart Grahl


Lennart Grahl  added the comment:

Hi.

I don't see why the certificate would not be valid for that address. Python 3.6 
also accepts it without any modifications to the script. 

Output of openssl x509 -in cert.pem -noout -text

Certificate:
Data:
Version: 3 (0x2)
Serial Number:
bc:28:67:9a:b0:fe:d6:b8
Signature Algorithm: ecdsa-with-SHA256
Issuer: CN = 127.0.0.1
Validity
Not Before: Mar 23 16:52:01 2017 GMT
Not After : Mar 21 16:52:01 2027 GMT
Subject: CN = 127.0.0.1
Subject Public Key Info:
Public Key Algorithm: id-ecPublicKey
Public-Key: (256 bit)
pub:
04:9d:e3:f2:f6:e2:8c:f3:25:82:3e:9e:bc:c5:69:
27:34:be:45:89:4a:51:ce:67:4e:b8:a0:b1:a2:bd:
fa:39:f9:38:85:a3:9c:a6:c4:c9:78:24:c7:17:5c:
2b:00:af:7f:73:e2:49:68:9c:37:29:ae:69:bf:b5:
49:06:a8:b8:1d
ASN1 OID: prime256v1
NIST CURVE: P-256
X509v3 extensions:
X509v3 Subject Key Identifier: 
17:66:86:40:B1:C4:BF:77:09:C7:DC:9F:4D:78:4A:BF:07:19:AD:8C
X509v3 Authority Key Identifier: 

keyid:17:66:86:40:B1:C4:BF:77:09:C7:DC:9F:4D:78:4A:BF:07:19:AD:8C

X509v3 Basic Constraints: 
CA:TRUE
Signature Algorithm: ecdsa-with-SHA256
 30:44:02:20:09:d2:c1:85:f9:c5:7f:78:3e:cc:90:78:25:dc:
 9e:76:ef:62:7a:e5:38:0a:a1:6c:c6:27:af:ed:ec:1d:12:06:
 02:20:5d:d0:de:8e:46:ee:e3:67:35:66:fe:11:6e:56:b5:70:
 72:16:33:92:66:0f:6c:da:51:0c:74:d8:c1:b8:8f:b5

--

___
Python tracker 

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



[issue34440] Certificate verify failed (works fine in 3.6)

2018-08-20 Thread Christian Heimes


Christian Heimes  added the comment:

The exception message is:

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
verify failed: IP address mismatch, certificate is not valid for '127.0.0.1'. 
(_ssl.c:1045)

The certificate is not valid for the URL. You are connection to a server by IP 
address, but the certificate is not valid for that IP address.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue34440] Certificate verify failed (works fine in 3.6)

2018-08-20 Thread Lennart Grahl


New submission from Lennart Grahl :

When running the attached script with the attached cert, Python 3.7 raises an 
exception (see https://paste.pound-python.org/show/VLr84Yn2Fnz6RSKEq3ui/). In 
Python 3.6, the certificate is being accepted.

I don't see anything wrong with the self-signed certificate.

You can (hopefully) reproduce this by running minimal_server.py

--
assignee: christian.heimes
components: SSL
files: minimal_server.zip
messages: 323783
nosy: Lennart Grahl, christian.heimes
priority: normal
severity: normal
status: open
title: Certificate verify failed (works fine in 3.6)
versions: Python 3.7
Added file: https://bugs.python.org/file47754/minimal_server.zip

___
Python tracker 

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



[issue34439] Expose venv --prompt value to an environment value

2018-08-20 Thread Tomer Keren


New submission from Tomer Keren :

In the same way the $VIRTUAL_ENV variable tells the virtual environment 
directory, A variable such as $VENV_NAME or $VENV_PROMPT should tell the value 
given to the venv `--prompt` option (Introduced in Issue22829).

An individual could override the EnvBuilder class like the docs say, but that 
wouldn't insure any user will have the variable set. This is crucial for usage 
in custom libraries that want to display the given prompt.

--
components: Library (Lib)
messages: 323782
nosy: Tomer
priority: normal
severity: normal
status: open
title: Expose venv --prompt value to an environment value
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue14568] HP-UX local libraries not included

2018-08-20 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
pull_requests: +8308
stage:  -> patch review

___
Python tracker 

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



[issue34217] windows: cross compilation fails due to headers with uppercase

2018-08-20 Thread INADA Naoki


INADA Naoki  added the comment:

I'm sorry about that.  I won't merge PR like that next time.

--

___
Python tracker 

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



[issue34246] Gentoo Refleaks 3.7: test_smtplib has dangling threads

2018-08-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See also issue32657.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32657] Mutable Objects in SMTP send_message Signature

2018-08-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See also issue34246.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue16533] HPUX: Unable to fork() in thread

2018-08-20 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Runs perfectly:
== CPython 3.8.0a0 (heads/bpo-34412:f1331c0e83, Aug 20 2018, 10:14:16) [C]
== HP-UX-B.11.31-ia64-32bit-ELF big-endian
== cwd: /var/osipovmi/cpython/build/test_python_22868
== CPU count: 4
== encodings: locale=utf8, FS=utf-8
Using random seed 4813536
Run tests in parallel using 6 child processes
0:00:02 [1/1] test_thread passed
test_barrier (test.test_thread.BarrierTest) ... waiting for tasks to end
task 0 will run for 0us
task 0 entering 0
task 1 will run for 12us
task 2 will run for 61us
task 3 will run for 31us
task 4 will run for 17us
task 7 will run for 9us
task 6 will run for 77us
task 8 will run for 95us
task 9 will run for 43us
task 5 will run for 48us
task 1 entering 0
task 2 entering 0
task 3 entering 0
task 4 entering 0
task 5 entering 0
task 7 entering 0
task 6 entering 0
task 8 entering 0
task 9 entering 0
task 9 leaving barrier
task 9 will run for 86us
task 0 leaving barrier
task 0 will run for 0us
task 0 entering 1
task 1 leaving barrier
task 1 will run for 25us
task 2 leaving barrier
task 2 will run for 59us
task 3 leaving barrier
task 3 will run for 67us
task 4 leaving barrier
task 4 will run for 91us
task 5 leaving barrier
task 5 will run for 84us
task 7 leaving barrier
task 7 will run for 22us
task 6 leaving barrier
task 6 will run for 31us
task 8 leaving barrier
task 8 will run for 12us
task 9 entering 1
task 1 entering 1
task 2 entering 1
task 3 entering 1
task 4 entering 1
task 5 entering 1
task 7 entering 1
task 6 entering 1
task 8 entering 1
task 8 leaving barrier
task 8 will run for 28us
task 0 leaving barrier
task 0 will run for 0us
task 0 entering 2
task 9 leaving barrier
task 9 will run for 87us
task 1 leaving barrier
task 1 will run for 59us
task 2 leaving barrier
task 2 will run for 82us
task 3 leaving barrier
task 3 will run for 73us
task 4 leaving barrier
task 4 will run for 11us
task 5 leaving barrier
task 5 will run for 17us
task 7 leaving barrier
task 7 will run for 98us
task 6 leaving barrier
task 6 will run for 63us
task 8 entering 2
task 9 entering 2
task 1 entering 2
task 2 entering 2
task 3 entering 2
task 4 entering 2
task 5 entering 2
task 7 entering 2
task 6 entering 2
task 6 leaving barrier
task 0 leaving barrier
task 8 leaving barrier
task 9 leaving barrier
task 1 leaving barrier
task 2 leaving barrier
task 3 leaving barrier
task 4 leaving barrier
task 5 leaving barrier
task 7 leaving barrier
tasks done
ok
test_acquire_contended (test.test_thread.LockTests) ... ok
test_acquire_destroy (test.test_thread.LockTests) ... ok
test_acquire_release (test.test_thread.LockTests) ... ok
test_constructor (test.test_thread.LockTests) ... ok
test_different_thread (test.test_thread.LockTests) ... ok
test_locked_repr (test.test_thread.LockTests) ... ok
test_reacquire (test.test_thread.LockTests) ... ok
test_repr (test.test_thread.LockTests) ... ok
test_state_after_timeout (test.test_thread.LockTests) ... ok
test_thread_leak (test.test_thread.LockTests) ... ok
test_timeout (test.test_thread.LockTests) ... ok
test_try_acquire (test.test_thread.LockTests) ... ok
test_try_acquire_contended (test.test_thread.LockTests) ... ok
test_weakref_deleted (test.test_thread.LockTests) ... ok
test_weakref_exists (test.test_thread.LockTests) ... ok
test_with (test.test_thread.LockTests) ... ok
test_forkinthread (test.test_thread.TestForkInThread) ... ok
test__count (test.test_thread.ThreadRunningTests) ... ok
test_nt_and_posix_stack_size (test.test_thread.ThreadRunningTests) ... caught 
expected ValueError setting stack_size(4096)
successfully set stack_size(262144)
successfully set stack_size(1048576)
successfully set stack_size(0)
trying stack_size = (262144)
creating task 1
creating task 2
creating task 3
creating task 4
creating task 5
creating task 6
creating task 7
creating task 8
creating task 9
creating task 10
waiting for all tasks to complete
task 1 will run for 86us
task 2 will run for 62us
task 3 will run for 67us
task 4 will run for 61us
task 5 will run for 52us
task 6 will run for 2us
task 7 will run for 1us
task 8 will run for 31us
task 9 will run for 12us
task 10 will run for 22us
task 1 done
task 2 done
task 3 done
task 4 done
task 5 done
task 6 done
task 7 done
task 8 done
task 9 done
task 10 done
all tasks done
trying stack_size = (1048576)
creating task 1
creating task 2
creating task 3
creating task 4
creating task 5
creating task 6
creating task 7
creating task 8
creating task 9
creating task 10
waiting for all tasks to complete
task 1 will run for 15us
task 2 will run for 37us
task 3 will run for 12us
task 4 will run for 93us
task 5 will run for 15us
task 6 will run for 45us
task 7 will run for 67us
task 8 will run for 19us
task 9 will run for 89us
task 10 will run for 58us
task 1 done
task 2 done
task 3 done
task 4 done
task 5 done
task 6 done
task 7 done
task 8 done
task 9 done
task 10 done
all tasks done
ok
test_save_exception_state_on_error (test.test_thread.ThreadRunningTests) ... ok

[issue1648957] HP-UX: _ctypes/libffi/src/ia64/ffi/__attribute__/native cc

2018-08-20 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Cannot verify:
$ file ./build/lib.hp-ux-B.11.31-ia64-3.8-pydebug/_ctypes.so
./build/lib.hp-ux-B.11.31-ia64-3.8-pydebug/_ctypes.so:  ELF-32 shared object 
file - IA64
$ ldd ./build/lib.hp-ux-B.11.31-ia64-3.8-pydebug/_ctypes.so

./build/lib.hp-ux-B.11.31-ia64-3.8-pydebug/_ctypes.so:
libffi.so =>/usr/local/lib/hpux32/libffi.so
libdl.so.1 =>   /usr/lib/hpux32/libdl.so.1
libc.so.1 =>/usr/lib/hpux32/libc.so.1


This issue can be closed.

--
nosy: +michael-o

___
Python tracker 

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



[issue12991] Python 64-bit build on HP Itanium - Executable built successfully but modules failed with HP Compiler

2018-08-20 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Cannot reproduced on master:
export LDFLAGS="-L/usr/local/lib/hpux64 +DD64"
export CFLAGS=+DD64

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2  _curses_panel _gdbm
_lzma _sqlite3  _tkinter
_uuid ossaudiodev   readline
spwd  zlib
To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc  atexitpwd
time


Failed to build these modules:
_ctypes   _dbm  _elementtree
cmath math  pyexpat


Following modules built successfully but were removed because they could not be 
imported:
_asyncio

running build_scripts
copying and adjusting /var/osipovmi/cpython/Tools/scripts/pydoc3 -> 
build/scripts-3.8
copying and adjusting /var/osipovmi/cpython/Tools/scripts/idle3 -> 
build/scripts-3.8
copying and adjusting /var/osipovmi/cpython/Tools/scripts/2to3 -> 
build/scripts-3.8
changing mode of build/scripts-3.8/pydoc3 from 640 to 755
changing mode of build/scripts-3.8/idle3 from 640 to 755
changing mode of build/scripts-3.8/2to3 from 640 to 755
renaming build/scripts-3.8/pydoc3 to build/scripts-3.8/pydoc3.8
renaming build/scripts-3.8/idle3 to build/scripts-3.8/idle3.8
renaming build/scripts-3.8/2to3 to build/scripts-3.8/2to3-3.8

$ file ./python
./python:   ELF-64 executable object file - IA64
$ ./python
Python 3.8.0a0 (heads/bpo-34412:f1331c0e83, Aug 20 2018, 09:53:38) [C] on 
hp-ux11
Type "help", "copyright", "credits" or "license" for more information.
>>>

The necessary bits are libraries in 64 bit which I have only in 32 bit.
This issue can be closed.

--
nosy: +michael-o

___
Python tracker 

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



[issue34401] Make test_gdb work on HP-UX

2018-08-20 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
pull_requests: +8307
stage:  -> patch review

___
Python tracker 

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



[issue34410] Segfault/TimeoutError: itertools.tee of multiprocessing.pool.imap_unordered

2018-08-20 Thread Xiang Zhang


Change by Xiang Zhang :


--
nosy: +xiang.zhang

___
Python tracker 

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