[issue34377] Update valgrind suppressions

2018-08-11 Thread miss-islington


miss-islington  added the comment:


New changeset 39c1253bd12d253d8d6d009a1ee1c3729c5ebde4 by Miss Islington (bot) 
in branch '3.7':
closes bpo-34377: Update Valgrind suppressions. (GH-8729)
https://github.com/python/cpython/commit/39c1253bd12d253d8d6d009a1ee1c3729c5ebde4


--
nosy: +miss-islington

___
Python tracker 

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



[issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section

2018-08-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8222

___
Python tracker 

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



[issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section

2018-08-11 Thread INADA Naoki


INADA Naoki  added the comment:


New changeset 9e840848510d20e644a19c723b803877377d3765 by INADA Naoki (Evan 
Allrich) in branch 'master':
bpo-34379: Doc: Move note for json.dump (GH-8730)
https://github.com/python/cpython/commit/9e840848510d20e644a19c723b803877377d3765


--
nosy: +inada.naoki

___
Python tracker 

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



[issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section

2018-08-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8223

___
Python tracker 

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



[issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section

2018-08-11 Thread miss-islington


miss-islington  added the comment:


New changeset 6b145085225d4b114b4422f6d3c6e859e75b97d7 by Miss Islington (bot) 
in branch '3.7':
bpo-34379: Doc: Move note for json.dump (GH-8730)
https://github.com/python/cpython/commit/6b145085225d4b114b4422f6d3c6e859e75b97d7


--
nosy: +miss-islington

___
Python tracker 

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



[issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section

2018-08-11 Thread INADA Naoki


INADA Naoki  added the comment:


New changeset eb6ed12f486f184cb00fc35662d012dbb1f30d2e by INADA Naoki (Miss 
Islington (bot)) in branch '3.6':
bpo-34379: Doc: Move note for json.dump (GH-8730)
https://github.com/python/cpython/commit/eb6ed12f486f184cb00fc35662d012dbb1f30d2e


--

___
Python tracker 

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



[issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section

2018-08-11 Thread INADA Naoki


Change by INADA Naoki :


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

___
Python tracker 

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



[issue34380] Relax Restrictions on await?

2018-08-11 Thread Steven Silvester


New submission from Steven Silvester :

When writing an `async` function, we often want to `await` a method call that 
may or may not be `async`.  For instance, it may be synchronous in the base 
class, but asynchronous in the subclass on the instance we have been given.  It 
would be nice for `await foo` to be a no-op if `foo` does not have an 
`__await__` method.  For instance, the following works in EMCAScript 2017:  
`async function foo () { let bar = await 1; console.log(bar); }`.  As a 
workaround, we have been using `await force_async(foo.bar)`, where 
`force_async` is the following:

```python
async def force_async(obj):
"""Force an object to be asynchronous"""
if hasattr(obj, '__await__'):
return await obj
async def inner():
return obj
return await inner()
```

This functionality is roughly equivalent to `gen.maybe_future` for coroutines, 
that is now deprecated in Tornado.  cf 
http://www.tornadoweb.org/en/stable/gen.html#tornado.gen.maybe_future

--
components: asyncio
messages: 323410
nosy: Steven Silvester, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Relax Restrictions on await?
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



[issue30545] Enum equality across modules: comparing objects instead of values

2018-08-11 Thread Markus Wegmann


Markus Wegmann  added the comment:

Hi there!

I came as well in contact with this kind of bug. Sadly, I could not replicate 
it with a simplified toy example.

You can experience the bug, if checkout

https://github.com/Atokulus/flora_tools/tree/56bb17ea33c910915875214e916ab73f567b3b0c

and run

`python3.7 main.py generate_code -d ..`

You find the crucial part where the identity check fails at 'radio_math.py:102' 
in function `get_message_toa`. The program then fails, due to the wrong program 
flow.

`
C:\Users\marku\AppData\Local\Programs\Python\Python37\python.exe 
C:/Users/marku/PycharmProjects/flora_tools/flora_tools/__main__.py 
generate_code -d C:\Users\marku\Documents\flora
Traceback (most recent call last):
  File "C:/Users/marku/PycharmProjects/flora_tools/flora_tools/__main__.py", 
line 110, in 
main()
  File "C:/Users/marku/PycharmProjects/flora_tools/flora_tools/__main__.py", 
line 104, in main
generate_code(args.path)
  File "C:/Users/marku/PycharmProjects/flora_tools/flora_tools/__main__.py", 
line 58, in generate_code
code_gen = CodeGen(flora_path)
  File 
"C:\Users\marku\PycharmProjects\flora_tools\flora_tools\codegen\codegen.py", 
line 37, in __init__
self.generate_all()
  File 
"C:\Users\marku\PycharmProjects\flora_tools\flora_tools\codegen\codegen.py", 
line 40, in generate_all
self.generate_radio_constants()
  File 
"C:\Users\marku\PycharmProjects\flora_tools\flora_tools\codegen\codegen.py", 
line 72, in generate_radio_constants
radio_toas.append([math.get_message_toa(payload) for payload in payloads])
  File 
"C:\Users\marku\PycharmProjects\flora_tools\flora_tools\codegen\codegen.py", 
line 72, in 
radio_toas.append([math.get_message_toa(payload) for payload in payloads])
  File "C:\Users\marku\PycharmProjects\flora_tools\flora_tools\radio_math.py", 
line 130, in get_message_toa
) / self.configuration.bitrate
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

Process finished with exit code 1
`

In the appendix, you find a toy project with similar structure, which in 
contrast to `flora_tools` works flawlessly.

I hope there is somebody out there with a little more experience in spotting 
the cause. If there is a bug in Python or CPython, it might have quite a 
security & safety impact.

Meanwhile I will hotfix my program by comparing the unerlying enum values.

Best regards
Atokulus

--
nosy: +Markus Wegmann
Added file: https://bugs.python.org/file47747/enum_bug-flawless_example.zip

___
Python tracker 

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



[issue30271] Make sqlite3 statement cache optional

2018-08-11 Thread Aviv Palivoda


Aviv Palivoda  added the comment:

I don't have any specific use case for making the statement cache optional. I 
expected that by changing the cache size to 0 there will be no statement cache. 
I think that this is a common assumption as can be seen in 
https://github.com/ghaering/pysqlite/issues/126#issue-346189937.

rogerbinns did give a use case where we would like to disable the statement 
cache in 
https://github.com/ghaering/pysqlite/issues/126#issuecomment-410030910. I think 
that statement cache should be disable implicitly in that case as you suggest. 
The code change will be very similar and I do believe we should allow the user 
to disable the cache. I will be happy to open a new PR once this is merged that 
will disable the statement cache implicitly when calling `set_authorizer()`

--

___
Python tracker 

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



[issue34381] Make tests with outbound connection optional

2018-08-11 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

I am currently trying investigate tests failures on HP-UX to port some 
engineering applications away from Fortran to Python, but a bunch of tests 
require outbound connection which I do not have. I do have an HTTP proxy only.

Please add something to TESTOPTS, e.g., '-o' (offline) to skip test. I'd like 
to focus on the real test failures.

--
components: Tests
messages: 323413
nosy: michael-o
priority: normal
severity: normal
status: open
title: Make tests with outbound connection optional
type: enhancement
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



[issue34382] test_os.test_mode fails when directory base directory has g+s set

2018-08-11 Thread Michael Felt


New submission from Michael Felt :

test_mode assumes that the SGID bit is not set in the parent directory. If it 
is set the assertEqual() tests fail.

This PR checks the mode of 'base' to see if the SGID bit is set, or not, and 
compares results accordingly.

Back-porting requested.

--
components: Tests
messages: 323414
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: test_os.test_mode fails when directory base directory has g+s set
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue34382] test_os.test_mode fails when directory base directory has g+s set

2018-08-11 Thread Michael Felt


Change by Michael Felt :


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

___
Python tracker 

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



[issue34151] use malloc() for better performance of some list operations

2018-08-11 Thread Xiang Zhang


Xiang Zhang  added the comment:


New changeset 2fc46979b8c802675ca7fd51c6f2108a305001c8 by Xiang Zhang (Sergey 
Fedoseev) in branch 'master':
bpo-34151: Improve performance of some list operations (GH-8332)
https://github.com/python/cpython/commit/2fc46979b8c802675ca7fd51c6f2108a305001c8


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue34151] use malloc() for better performance of some list operations

2018-08-11 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



[issue34380] Relax Restrictions on await?

2018-08-11 Thread Yury Selivanov

Yury Selivanov  added the comment:

This isn't something we want to do in Python.  We have a dynamic but strict 
type system. 1 + '1' is an error in Python, but works just fine in JavaScript.  
Likewise, in 'await foo' foo is expected to be an awaitable in Python and not 
anything else.  This has been discussed multiple times during PEP 492 approval 
process.

I've been beaten myself by lose semantics of await in JS by awaiting a function 
that returned null—a simple bug that turned out to be a nightmare to identify 
in a complex system.

So unfortunately I have to close this one as "won't fix", sorry. Thank you for 
suggesting the idea though.

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



[issue34380] Relax Restrictions on await?

2018-08-11 Thread Steven Silvester


Steven Silvester  added the comment:

Thanks for your consideration and for implementing the original feature!

--

___
Python tracker 

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



[issue30545] Enum equality across modules: comparing objects instead of values

2018-08-11 Thread Ethan Furman


Ethan Furman  added the comment:

Markus Wegmann said:

> In the appendix, you find a toy project with similar structure, which > in 
> contrast to `flora_tools` works flawlessly.

I appreciate your attempt to reproduce the problem, but since you weren't able 
to, the issue is probably somewhere else and not in Enum.

> TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

Your Enum example in flawless is not an IntEnum, so the error (unable to add an 
integer to None) seems entirely unrelated.

--

___
Python tracker 

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



[issue31874] [feature] runpy.run_module should mimic script launch behavior for sys.path

2018-08-11 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

In [setuptools 1453](https://github.com/pypa/setuptools/issues/1453), this 
issue hit the project hard. Tox 3.2 changed the default invocation of pip from 
the script-based invocation to the runpy based implementation (python -m pip), 
which causes pip to be unable to uninstall the setuptools in the environment.

This use case also reveals that the heuristic of "retain '' in sys.path if the 
module being executed is in a subdirectory of a current directory" wouldn't 
address the issue, as `.tox/python/lib/python3.7/site-packages/pip/__main__.py` 
is in a subdirectory of the current directory, but one would still expect '' 
not to be in sys.path in this case.

But basing on __main__.__spec__, that would probably do what is expected.

--

___
Python tracker 

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



[issue34376] Improve accuracy of math.hypot() and math.dist()

2018-08-11 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Applied in: 
https://mail.python.org/pipermail/python-checkins/2018-August/156572.html   
Note, the BPO number was left off the checkin message.

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



[issue34383] asyncio passes SSL certificate error to loop.call_exception_handler()

2018-08-11 Thread Andrei


New submission from Andrei :

I'm using 3.7, but it's an issue that I've found in the old github repo for 3.6.

When using asyncio, SSL certificate errors don't get suppressed.

I've tried:
- with contextlib.suppress(Exception)
- except & pass

Original ticket:
https://github.com/python/asyncio/issues/404

--
components: asyncio
messages: 323421
nosy: DanAndrei, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio passes SSL certificate error to loop.call_exception_handler()
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



[issue34377] Update valgrind suppressions

2018-08-11 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset fe62d3664431dcd01a4421256ff700f0daab4e3c by Benjamin Peterson 
(Miss Islington (bot)) in branch '3.6':
closes bpo-34377: Update Valgrind suppressions. (GH-8734)
https://github.com/python/cpython/commit/fe62d3664431dcd01a4421256ff700f0daab4e3c


--

___
Python tracker 

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



[issue34376] Improve accuracy of math.hypot() and math.dist()

2018-08-11 Thread Tim Peters


Tim Peters  added the comment:

Thanks for doing the "real ulp" calc, Raymond!  It was intended to make the 
Kahan gimmick look better, and it succeeded ;-)  I don't personally care 
whether adding 10K things ends up with 50 ulp error, but to each their own.

Division can be mostly removed from scaling, but it's a bit delicate.  The 
obvious stab would be to multiply by 1/max instead of dividing by max.  That 
introduces another rounding error, but as you've already discovered this 
computation as a whole is relatively insensitive to rounding errors in scaling. 
 The real problem is that 1/max can overflow (when max is subnormal - the IEEE 
range isn't symmetric).

Instead a power of 2 could be used, chosen so that it and its reciprocal are 
both representable.  There's no particular virtue in scaling the largest value 
to 1.0 - the real point is to avoid spurious overflow/underflow when squaring 
the scaled x.  Code like the following could work.  Scaling would introduce 
essentially no rounding errors then.

But I bet a call to `ldexp()` is even more expensive than division on most 
platforms.  So it may well be slower when there are few points.

def hyp_ps(xs):
b = max(map(abs, xs))
_, exp = frexp(b)
exp = -3 * exp // 4
# scale and invscale are exact.
# Multiplying by scale is exact, except when
# the result becomes subnormal (in which case
# |x| is insignifcant compared to |b|).
# invscale isn't needed until the loop ends,
# so the division time should overlap with the
# loop body.
scale = ldexp(1.0, exp) # exact
invscale = 1.0 / scale  # exact
# and `x * scale` is exact except for underflow
s = fsum((x * scale)**2 for x in xs)
return invscale * sqrt(s)

--

___
Python tracker 

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



[issue33300] Bad usage example in id() DocString

2018-08-11 Thread Martin Panter


Change by Martin Panter :


--
resolution:  -> duplicate
status: open -> pending

___
Python tracker 

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



[issue24111] Valgrind suppression file should be updated

2018-08-11 Thread Zackery Spytz


Zackery Spytz  added the comment:

This was fixed in #34377.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX

2018-08-11 Thread Matt Pruitt


Matt Pruitt  added the comment:

Also ran into this issue while building Python in an isolated environment.  
Realized that libffi is installing into the $EPREFIX/lib64 directory of our 
build environment.

Despite pkg-config returning the correct directory for linking libffi, it took 
explicitly setting LDFLAGS to the correct lib64 directory in my build process 
for the Python build to succeed.

I noticed from your build.log that you don't explicitly add your lib64 to your 
LDFLAGS.  Perhaps give that a shot?

--
nosy: +mhpruitt

___
Python tracker 

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



[issue34369] kqueue.control() documentation and implementation mismatch

2018-08-11 Thread Martin Panter


Martin Panter  added the comment:

I think this was an attempt to specify a positional-only parameter (by using 
square brackets), and include a default value in the signature. The usual 
approach in this situation is to use square brackets, but only mention the 
default value in the text:

control(changelist, max_events[, timeout])
. . .
The default for "timeout" is None, to wait forever.

In Issue 13386 Ezio suggested against showing both square brackets and a 
default value, and I agree.

Berker: your "select" and "poll" cases all include the PEP 457 slash "/" 
notation, which was supposed to indicate positional-only parameters. See Issue 
21314 about explaining this notation in the documentation somewhere.

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python, martin.panter
versions: +Python 2.7

___
Python tracker 

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



[issue34384] os.readlink does not accept pathlib.Path on Windows

2018-08-11 Thread Girts Folkmanis


New submission from Girts Folkmanis :

Documentation for os.readlink says "Changed in version 3.6: Accepts a path-like 
object.". This works fine on macOS, but blows up on Windows:

Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import pathlib
>>> os.readlink(pathlib.Path('foo'))
Traceback (most recent call last):
  File "", line 1, in 
TypeError: readlink() argument 1 must be str, not WindowsPath

--
components: Library (Lib)
messages: 323427
nosy: girtsf
priority: normal
severity: normal
status: open
title: os.readlink does not accept pathlib.Path on Windows
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



[issue34323] False timeout log message on proactor close

2018-08-11 Thread John Nelson


John Nelson  added the comment:

Python 3.5.4 (v3.5.4:3f56838, Aug  8 2017, 02:17:05) [MSC v.1900 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform, sys
>>> platform.win32_ver()
('2012ServerR2', '6.3.9600', 'SP0', 'Multiprocessor Free')
>>> sys.version_info
sys.version_info(major=3, minor=5, micro=4, releaselevel='final', serial=0)

--
nosy: +John Nelson2

___
Python tracker 

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



[issue34385] Failed to build these modules: _ctypes on Solaris 10

2018-08-11 Thread LarBob Doomer


New submission from LarBob Doomer :

I am compiling with GNU binutils 2.24, GCC 5.5.0, GNU make 4.2.1. 

When attempting to build 3.6.x, the build is successful except for the fact 
that the _ctypes module fails to build. This of course causes the install to 
fail.

Failed to build these modules:
_ctypes

I do have libffi-dev installed through OpenCSW.

--
components: ctypes
messages: 323429
nosy: LarBob Doomer
priority: normal
severity: normal
status: open
title: Failed to build these modules: _ctypes on Solaris 10
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



[issue34384] os.readlink does not accept pathlib.Path on Windows

2018-08-11 Thread Berker Peksag


Change by Berker Peksag :


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

___
Python tracker 

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



[issue34376] Improve accuracy of math.hypot() and math.dist()

2018-08-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think that in most real cases (unless max is too large or too small) we can 
get rid of scaling at all.

--

___
Python tracker 

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



[issue22602] UTF-7 codec decodes ill-formed sequences starting with "+"

2018-08-11 Thread Zackery Spytz


Change by Zackery Spytz :


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



[issue22602] UTF-7 codec decodes ill-formed sequences starting with "+"

2018-08-11 Thread Zackery Spytz


Zackery Spytz  added the comment:

This was also mentioned in #24848.

--
nosy: +ZackerySpytz
versions: +Python 3.8 -Python 2.7, 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



[issue30545] Enum equality across modules: comparing objects instead of values

2018-08-11 Thread Markus Wegmann


Markus Wegmann  added the comment:

Hi Ethan

> Your Enum example in flawless is not an IntEnum, so the error (unable to add 
> an integer to None) seems entirely unrelated.

The TypeError is just a consequence of the faulty Enum identity comparison some 
lines before. I mentioned the TypeError so you can verify whether your Python 
version takes the same program flow.


I also did further research. The Enum's are definitely different regarding the 
module path -- the instance comparison will therefore return False. I checked 
__module__ + __qualname__:

`flora_tools.radio_configuration.RadioModem.LORA`

vs.

`radio_configuration.RadioModem.LORA`


The cause is the wrong import statement in `flora_tools/codegen/codegen.py`:

`from radio_configuration import RadioConfiguration,\ 
RADIO_CONFIGURATIONS`

It should have been

`from flora_tools.radio_configuration import RadioConfiguration\
RADIO_CONFIGURATIONS`

The real deal here is why I was allowed to directly import from 
`radio_configuration` in the first place. I'm not allowed to directly import a 
submodule in the toy project without the proper root module name appended. 
Maybe I don't see the big picture, or have some crude options/monkey_patching 
enabled.

Nevertheless, the behaviour regarding Enum comparisons and different import 
paths seems to me quite misleading.

Best regards
Atokulus

--

___
Python tracker 

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



[issue34384] os.readlink does not accept pathlib.Path on Windows

2018-08-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
versions: +Python 3.6, Python 3.8

___
Python tracker 

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



[issue34384] os.readlink does not accept pathlib.Path on Windows

2018-08-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +Windows
nosy: +berker.peksag, paul.moore, serhiy.storchaka, steve.dower, tim.golden, 
zach.ware

___
Python tracker 

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