[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Perhaps it is worth to backport warnings to 2.7 in Py3k mode. This could help 
to detect some issues earlier.

In 3.6 fields could be converted to lists silently, without warnings.

--

___
Python tracker 

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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-12-02 Thread Warwick Chapman

Warwick Chapman  added the comment:

Will this be released in 2.x as suggested by inada.naoki?

--
nosy: +Warwick Chapman

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

I like Nick's idea of calling list() to fix the argument.  I've created a PR 
that implements it.  I also generate a RuntimeWarning since if we document them 
as needing to be lists, we should at least warn for invalid types.  The 
RuntimeWarning will be seen if you call setup.py directly which should have the 
effect of eventually pushing package authors to fix their code.

--
keywords: +needs review -patch

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Neil Schemenauer

Change by Neil Schemenauer :


--
pull_requests: +4598
stage: resolved -> patch review

___
Python tracker 

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



[issue29710] Incorrect representation caveat on bitwise operation docs

2017-12-02 Thread Tim Peters

Tim Peters  added the comment:

To answer the old accusation ;-), no, this isn't my wording.  I _always_ 
explain that Python's integer bit operations act as if the integers were stored 
in 2's-complement representation but with an infinite number of sign bits.  
That's all.  That provides insight.

For example, then it's dead obvious that `-1 == ~0` (both an infinite solid 
string of 1 bits); that for any integer `i`, `-1 ^ i == ~i" (both flip each bit 
in `i`); and that for any positive integers `i` and `j` it's necessarily the 
case that `-i ^ -j` is positive (because the infinite strings of sign bits 
cancel out).

The reference manual is under no obligation to explain how to _implement_ this 
illusion, and I don't think it's helpful to try.  People here are struggling to 
explain how to pick a number of bits "big enough" to make it all work out on a 
case by case basis, but the single answer "infinity" is big enough to apply in 
all cases ;-)

--

___
Python tracker 

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



[issue32200] Full docs build of 3.6 and 3.7 failing since 2017-10-15

2017-12-02 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

I verified that the download links for Python 3.7.0a2  (English) are now 
working.

The French and Japanese docs downloads are still 404.

--
nosy: +Mariatta

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Nick Coghlan

Nick Coghlan  added the comment:

I'd prefer to see this change go in the other direction: instead of enforcing 
eager type checks, we should be unconditionally wrapping the given values in a 
"list(arg)" call, such that more typical iterable duck-typing behaviour applies.

That will transparently fix any code that isn't already passing a list, will 
ensure that internal code can safely assume that the instance *attributes* are 
always lists (no matter what the caller passes in), and means that even when 
the caller is passing in a list, the instance will have its own copy (rather 
than retaining a reference to the caller's copy).

--

___
Python tracker 

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



[issue29710] Incorrect representation caveat on bitwise operation docs

2017-12-02 Thread Nick Coghlan

Nick Coghlan  added the comment:

I like Mark's phrasing as well. For precision, I'd still like to give an exact 
algorithmic formulation of what "large enough" means in this context, though.

Something like:

Each bitwise operation has the same result as though carried out in two's 
complement using a bit-width that's large enough to represent the inputs. 
("Large enough" for this purpose is ``1 + max(x.bit_length(), y
.bit_length()``, with the extra bit being needed to handle sign extension 
appropriately)

--

___
Python tracker 

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



[issue32192] Provide importlib.util.lazy_import helper function

2017-12-02 Thread Nick Coghlan

Nick Coghlan  added the comment:

Maintaining the actual implementation as a third party module seems like a good 
idea to me, so I'm marking this as a documentation issue instead.

The idea would be to add this as an example of a very basic lazy importer under 
https://docs.python.org/3/library/importlib.html#examples

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python

___
Python tracker 

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



[issue32176] Zero argument super is broken in 3.6 for methods with a hacked __class__ cell

2017-12-02 Thread Nick Coghlan

Change by Nick Coghlan :


--
pull_requests: +4597

___
Python tracker 

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



[issue32176] Zero argument super is broken in 3.6 for methods with a hacked __class__ cell

2017-12-02 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 078f1814f1a4413a2a0fdb8cf4490ee0fc98ef34 by Nick Coghlan in 
branch 'master':
bpo-32176: Set CO_NOFREE in the code object constructor (GH-4675)
https://github.com/python/cpython/commit/078f1814f1a4413a2a0fdb8cf4490ee0fc98ef34


--

___
Python tracker 

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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-02 Thread Nick Coghlan

Nick Coghlan  added the comment:

While there are some good comments in line in the PR, I think it would be 
helpful if these changes were accompanied by some additions to 
https://devguide.python.org/compiler/ that explain how the various pieces of 
the solution work together to manage the execution stack.

--

___
Python tracker 

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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-02 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

At this point in the release cycle, it would be nice to get this PR applied 
soon so that there is more time see if there are any minor follow-on issues.

--

___
Python tracker 

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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-02 Thread Nick Coghlan

Nick Coghlan  added the comment:

I like this change, and think we should go ahead with it, but just wanted to 
note that I suspect it may make the "Badly timed signals may lead to __exit__ 
being skipped even after __enter__ succeeded" problem slightly easier to hit: 
https://bugs.python.org/issue29988

That's not a new problem though, and this change should make it easier to apply 
the conventional solutions (i.e. only checking for signals when execution jumps 
backwards within a function, as well as in function pre-or-post-ambles)

--
nosy: +ncoghlan

___
Python tracker 

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



[issue25054] Capturing start of line '^'

2017-12-02 Thread Matthew Barnett

Matthew Barnett  added the comment:

findall() and finditer() consist of multiple uses of search(), basically, as do 
sub() and split(), so we want the same rule to apply to them all.

--

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

> Thank you, but I don't need a lecture from you. Feel free to propose our 
> solution in the form of pull request instead of acting like a project manager 
> and telling people what to do.

I'm sorry you are offended.  My pull request would consist of the patch being 
reverted.  It is not ready to go in.  If a change breaks a significant amount 
of previously working Python code, it needs very careful consideration and 
should be introduced in a way to minimize breakage and allow people time to fix 
their code.

Repeatably pointing to the documentation and saying that existing code is 
broken because it doesn't respect documented requirements is not okay.

--

___
Python tracker 

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



[issue32200] Full docs build of 3.6 and 3.7 failing since 2017-10-15

2017-12-02 Thread Ned Deily

Ned Deily  added the comment:

OK, thanks.  I've pushed PR 3940 to master and backported it to 3.6.  I'll keep 
this open until we've seen the next full doc build complete successfully.

--

___
Python tracker 

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



[issue31589] Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters?

2017-12-02 Thread Ned Deily

Ned Deily  added the comment:


New changeset 2ad350a713360e89ae6d264924cd28f519b8b22c by Ned Deily (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-31589 : Build PDF using xelatex for better UTF8 support. (GH-3940) 
(#4683)
https://github.com/python/cpython/commit/2ad350a713360e89ae6d264924cd28f519b8b22c


--

___
Python tracker 

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



[issue32200] Full docs build of 3.6 and 3.7 failing since 2017-10-15

2017-12-02 Thread Ned Deily

Ned Deily  added the comment:


New changeset 2ad350a713360e89ae6d264924cd28f519b8b22c by Ned Deily (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-31589 : Build PDF using xelatex for better UTF8 support. (GH-3940) 
(#4683)
https://github.com/python/cpython/commit/2ad350a713360e89ae6d264924cd28f519b8b22c


--

___
Python tracker 

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



[issue29710] Incorrect representation caveat on bitwise operation docs

2017-12-02 Thread Martin Panter

Martin Panter  added the comment:

FWIW I find Mark’s suggestion pretty good:

“Each bitwise operation has the same result as though carried out in two's 
complement using a bit-width that's large enough to represent the inputs.”

--

___
Python tracker 

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



[issue32200] Full docs build of 3.6 and 3.7 failing since 2017-10-15

2017-12-02 Thread Roundup Robot

Change by Roundup Robot :


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

___
Python tracker 

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



[issue31589] Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters?

2017-12-02 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4595

___
Python tracker 

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



[issue31589] Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters?

2017-12-02 Thread Ned Deily

Ned Deily  added the comment:


New changeset 7324b5ce8e7c031a0a3832a6a8d7c639111ae0ff by Ned Deily (Julien 
Palard) in branch 'master':
bpo-31589 : Build PDF using xelatex for better UTF8 support. (#3940)
https://github.com/python/cpython/commit/7324b5ce8e7c031a0a3832a6a8d7c639111ae0ff


--
nosy: +ned.deily

___
Python tracker 

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



[issue32200] Full docs build of 3.6 and 3.7 failing since 2017-10-15

2017-12-02 Thread Ned Deily

Ned Deily  added the comment:


New changeset 7324b5ce8e7c031a0a3832a6a8d7c639111ae0ff by Ned Deily (Julien 
Palard) in branch 'master':
bpo-31589 : Build PDF using xelatex for better UTF8 support. (#3940)
https://github.com/python/cpython/commit/7324b5ce8e7c031a0a3832a6a8d7c639111ae0ff


--

___
Python tracker 

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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-02 Thread Neil Schemenauer

Change by Neil Schemenauer :


--
pull_requests: +4594

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Berker Peksag

Berker Peksag  added the comment:

> Filed a bug https://github.com/simplejson/simplejson/issues/198 for
> simplejson.

I've opened https://github.com/simplejson/simplejson/pull/197 to make 
CLASSIFIERS a list.

I've also opened https://github.com/ianare/exif-py/pull/80 to create a 
universal wheel for exifread.

> That's not how we develop Python.

Thank you, but I don't need a lecture from you. Feel free to propose your 
solution in the form of pull request instead of acting like a project manager 
and telling people what to do.

--

___
Python tracker 

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



[issue25054] Capturing start of line '^'

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Avoiding ZWM after a NWM in re.sub() is explicitly documented (and the 
documentation is correct in this case). This follows the behavior in the 
ancient RE implementation. Once it was broken in sre, but then fixed (see 
21009b9c6fc40b25fcb30ee60d6108f235733e40, issue462270). Changing this behavior 
doesn't break anything in the stdlib except the specially purposed test. I 
think it is better to keep this behavior, but maybe discuss its changing (for 
making matching the behavior of other RE engines) in the separate issue.

I don't know how the behavior of findall() and finditer() is related to this.

--

___
Python tracker 

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



[issue462270] sub-tle difference between pre and sre

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

For history, this was fixed by 21009b9c6fc40b25fcb30ee60d6108f235733e40.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

> Classifiers were always documented as lists (msg214915) and passing a 
> non-list type was raised a cryptic exception message as already reported in 
> my first message

That doesn't matter.  You can't break a bunch of packages in a 3.x release with 
no warning just because people are doing something against what the 
documentation says.  That's not how we develop Python. How is a user of a 3rd 
party package going to fix this?  They have to ask the 3rd party package author 
to fix their setup.py code.  Until then, they cannot use Python 3.7.  This 
patch needs to be reverted and reworked, IMHO.

I trying installing the top packages listed on https://pythonwheels.com .  A 
number of them fail because of this change, see attached text file.

--
Added file: https://bugs.python.org/file47312/pip-errors.txt

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Filed a bug https://github.com/simplejson/simplejson/issues/198 for simplejson.

--

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

In simplejson classifiers is a result of filter(). This is a list in Python 2 
and an iterator in Python 3. It can be uploaded using Python 2.

--

___
Python tracker 

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



[issue32200] Full docs build of 3.6 and 3.7 failing since 2017-10-15

2017-12-02 Thread Julien Palard

Julien Palard  added the comment:

I recommand PR 3940, as it's simple, and as I'm still unable to fix issue32200 
with PR 4069 (I still don't understand how to write those latex macros).

I'm open to follow the discussion about PR 4069, if one find a nice 
documentable reproductible protocol to update the list of latex macros to allow 
for a new character to be added.

Please not the french and japanese documentation may still fail (French should 
succeed with xelatex, japanese will still fail), which is expected, it's the 
origigin of PR 3940 and PR 4069, I'm still working on it, also see: 
https://github.com/python/docsbuild-scripts/pull/34.

--

___
Python tracker 

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



[issue32174] nonASCII punctuation characters can not display in python363.chm.

2017-12-02 Thread Ned Deily

Change by Ned Deily :


--
nosy: +mdk

___
Python tracker 

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



[issue25054] Capturing start of line '^'

2017-12-02 Thread Matthew Barnett

Matthew Barnett  added the comment:

The pattern:

\b|:+

will match a word boundary (zero-width) before colons, so if there's a word 
followed by colons, finditer will find the boundary and then the colons. You 
_can_ get a zero-width match (ZWM) joined to the start of a nonzero-width match 
(NWM). That's not really surprising.

If you wanted to avoid a ZWM joined to either end of a NWM, you'd need to keep 
looking for another match at a position even after you'd already found a match 
if what you'd found was zero-width. That would also affect re.search and 
re.match.

For regex on Python 3.7, I'm going with avoiding a ZWM joined to the end of a 
NWM, unless re's going a different way, in which case I have more work to do to 
remain compatible! The change I did for Python 3.7+ was trivial.

--

___
Python tracker 

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



[issue32174] nonASCII punctuation characters can not display in python363.chm.

2017-12-02 Thread R. David Murray

R. David Murray  added the comment:

The doc source files do not contain smart quotes, and as far as I know, sphinx 
does produce correct utf-8.

Recently there was a bug where incorrect smart quotes were leaking out of the 
internationalization of the docs, so this might be a problem that is already 
fixed.  On the other hand, there might be something broken about the chm 
production process.  I have no idea who would be the right person to 
investigate that, since I think Steve just spins the wheel on existing tools to 
get them generated :)

On the gripping hand, could there be something broken about your local charset 
configuration?  Does anyone else see this problem?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue32172] Add length counter for iterables

2017-12-02 Thread R. David Murray

R. David Murray  added the comment:

Guido specifically rejected __len__ for iterators when the iteration protocol 
was designed.  This has become a FREQ in recent times (Frequently Rejected 
Enhancement Request :)

The rationale, as I understand it, is that an iterator object should always 
evaluate to True in a boolean context, but I don't know why.  There is also a 
consistency argument: since not all iterators *can* have a len, then none 
should, because if some did and some didn't you couldn't use iterators 
interchangeably in code the way you can now.  In other words, you can't make 
__len__ part of the iterator protocol, so iterators don't have a __len__.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Ned Deily

Change by Ned Deily :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Berker Peksag

Berker Peksag  added the comment:

(Sorry, I messed up fields in the issue.)

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Berker Peksag

Berker Peksag  added the comment:

Classifiers were always documented as lists (msg214915) and passing a non-list 
type was raised a cryptic exception message as already reported in my first 
message, https://github.com/pypa/setuptools/issues/1163 and 
https://reinbach.com/blog/setuptools-classifiers-upload-python3-5/

Any usage of classifiers=(...,) is already broken in Python 3 in some way (see 
the setup.py I attached or 
https://reinbach.com/blog/setuptools-classifiers-upload-python3-5/ for a quick 
reproducer) since they can't upload a new release.

Also, this is only an issue when sdist is the only way to install the project. 
exifread only provides a wheel for Python 2. I cloned it and add

[wheel]
universal = 1

then I created a universal wheel and tried to install it in Python 3.7.0a2+:

Processing 
/home/berker/projects/test/exif-py/dist/ExifRead-2.1.2-py2.py3-none-any.whl
Installing collected packages: ExifRead
Successfully installed ExifRead-2.1.2

--
nosy:  -ned.deily
priority: release blocker -> normal

___
Python tracker 

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



[issue32168] Mutable instance variables don't get new references with args.

2017-12-02 Thread R. David Murray

R. David Murray  added the comment:

For the record: https://docs.python.org/3/faq/programming.html#id13

--
nosy: +r.david.murray

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

I tried building the top packages from python3wos.appspot.com.  Only 
simplejson-3.13.2.tar.gz fails to build due to this change.  However, given 
that it is the top downloaded module, I think think making a change to Python 
that makes it uninstallable by "pip" is a bad idea.  There needs to be a 
transition process.  I'm setting priority to "release blocker".  People can 
downgrade if they disagree with me.

I tried changing the TypeError raises with Deprecation warnings.  That doesn't 
have any effect because DeprecationWarning is filtered by default.  Enabling it 
still has no effect because apparently pip filters it out.

So, I think some other way to warn people would need to be implemented.  E.g. 
have distutils print to stderr.  Change pip to warn as well.

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



[issue25054] Capturing start of line '^'

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The clause "Empty matches are included in the result unless they touch the 
beginning of another match" was added in 
2f3e5483a3324b44fa5dbbb98859dc0ac42b6070 (issue732120) and I suppose it never 
was correct. So we can ignore it in the context of this issue.

--

___
Python tracker 

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



[issue32197] Compiling against master branch fails; error: expected expression SET_DECODE_ERROR

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 13badcbc60cdbfae1dba1683fd2fae9d70717143 by Serhiy Storchaka in 
branch 'master':
bpo-32197: Try to fix a compiler error on OS X introduced in bpo-32030. (#4681)
https://github.com/python/cpython/commit/13badcbc60cdbfae1dba1683fd2fae9d70717143


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 13badcbc60cdbfae1dba1683fd2fae9d70717143 by Serhiy Storchaka in 
branch 'master':
bpo-32197: Try to fix a compiler error on OS X introduced in bpo-32030. (#4681)
https://github.com/python/cpython/commit/13badcbc60cdbfae1dba1683fd2fae9d70717143


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32200] Full docs build of 3.6 and 3.7 failing since 2017-10-15

2017-12-02 Thread Ned Deily

Ned Deily  added the comment:

Thanks, Julien.  To be clear, are you recommending applying just PR 3940 or 
also the unique part of PR 4069?  At this point, I am not concerned about the 
apparent minor difference in appearance; I would just like the downloadable 
docs to build and be usable.

--

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-12-02 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

I don't see a good reason to add this check.  I would guess there could be lots 
of 3rd party packages that are no uninstallable on Python 3.7.  E.g. 

python3 -m pip install exifread
...
TypeError: 'classifiers' should be a 'list', not 'tuple'

If people are determined to add extra type checking, make it a warning for 3.7 
so setup.py files can be fixed.

--
nosy: +nascheme
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-12-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
status: open -> closed

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 65d1887170fb278c10a836e9e4319cae4707f524 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-10544: Deprecate "yield" in comprehensions and generator expressions 
in Py3k mode. (GH-4579) (#4676)
https://github.com/python/cpython/commit/65d1887170fb278c10a836e9e4319cae4707f524


--

___
Python tracker 

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



[issue32197] Compiling against master branch fails; error: expected expression SET_DECODE_ERROR

2017-12-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4592

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-12-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4593

___
Python tracker 

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



[issue32107] Improve MAC address calculation and fix test_uuid.py

2017-12-02 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

> Sorry, but I can't understand how 23df2d1304ece169d7e0dfc843dfb8026b413d9f 
> could break getnode() on Android and how your changes can fix this. The only 
> effect of this change is that an error in _random_getnode() no longer 
> silenced. But this is not the case, because if _random_getnode() raises an 
> exception you can't get two different results (you can't get even the single 
> result) for comparison.

I concur.  Your test appears to be failing because it wants two successive 
calls to getnode() to return the same value.  But the proposed change doesn’t 
change the fact that if you fall back to _random_getnode() you’re going to get 
a different random value every time.  I think you need to look into the problem 
more deeply.  (It doesn’t help that the code swallows all exceptions from the 
other getters - I pointed that out in my previous PRs.  I’ll bet the clue to 
your problem is being hidden by that bare except.)

--

___
Python tracker 

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



[issue32107] Improve MAC address calculation and fix test_uuid.py

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Sorry, but I can't understand how 23df2d1304ece169d7e0dfc843dfb8026b413d9f 
could break getnode() on Android and how your changes can fix this. The only 
effect of this change is that an error in _random_getnode() no longer silenced. 
But this is not the case, because if _random_getnode() raises an exception you 
can't get two different results (you can't get even the single result) for 
comparison.

--

___
Python tracker 

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



[issue32199] uuid.getnode() should return the MAC address on Android

2017-12-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +easy
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32198] \b reports false-positives in Indic strings involving combining marks

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This is a known issue. See also issue1693050, issue12731, issue25743. I hope it 
will be solved in 3.7 and maybe the solution will be backported to 2.7 and 3.6 
(but not to 3.5, 3.5 takes only security fixes).

As a workaround I suggest you to use the third-party regex module. This is a 
mature module mostly compatible with re, but with better support of Unicode and 
additional features.

--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.5

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-12-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4591

___
Python tracker 

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



[issue32197] Compiling against master branch fails; error: expected expression SET_DECODE_ERROR

2017-12-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue32200] Full docs build of 3.6 and 3.7 failing since 2017-10-15

2017-12-02 Thread Julien Palard

Julien Palard  added the comment:

It works with xelatex (https://github.com/python/cpython/pull/3940), here's the 
difference:

https://screenshots.firefox.com/wSn4a8WyFMNzXgKm/null
https://screenshots.firefox.com/WmUNljwcO8mImchP/null

The "bold" one is the xelatex one.

In case we want this to be merged, xelatex have already been installed on the 
build server (https://github.com/python/psf-salt/pull/122).

--

___
Python tracker 

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



[issue32197] Compiling against master branch fails; error: expected expression SET_DECODE_ERROR

2017-12-02 Thread Sanyam Khurana

Sanyam Khurana  added the comment:

Even a simple use of ternary operator instead of using if-else inside do-while 
to handle the macro like:

#define SET_DECODE_ERROR(NAME, LEN) \
pymain->err = ((LEN) == (size_t)-2) \
? _Py_INIT_USER_ERR("cannot decode " #NAME) \
: _Py_INIT_NO_MEMORY()

, throws the error `undeclared identifier pymain`:

gcc -c -Wno-unused-result -Wsign-compare -g -O0 -Wall -Wstrict-prototypes
-std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -Werror=implicit-function-declaration   -I. 
-I./Include-DPy_BUILD_CORE -o Modules/main.o Modules/main.c
Modules/main.c:899:20: error: use of undeclared identifier 'pymain'
return SET_DECODE_ERROR("PYTHONEXECUTABLE environment "
   ^
Modules/main.c:46:5: note: expanded from macro 'SET_DECODE_ERROR'
pymain->err = ((LEN) == (size_t)-2) \
^
1 error generated.
make: *** [Modules/main.o] Error 1

I'm still trying to figure out a solution for this.

--

___
Python tracker 

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



[issue32197] Compiling against master branch fails; error: expected expression SET_DECODE_ERROR

2017-12-02 Thread Sanyam Khurana

Sanyam Khurana  added the comment:

I tried to resolve the issue by trying to figure out the syntax for the 
SET_DECODE_ERROR macro.

I tried to call a function from the macro, and eventually do the checking in 
that function.

Second way I tried was to replace statement for macro instead of using do-while 
for placing the if-else clause.

I was stuck at the issue that at the point when the compiler tries to replace 
the macro with actual code, `pymain` wasn't defined.

If someone could provide a pointer on this, it would be really helpful and I'll 
try to work on a patch.

One simplest possible solution would be not use macro and simply use the code 
at the 3 places where it is being used. But I'll defer this anti-DRY approach 
if we can have a better solution.

--

___
Python tracker 

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



[issue32200] Full docs build of 3.6 and 3.7 failing since 2017-10-15

2017-12-02 Thread Julien Palard

Julien Palard  added the comment:

Yes, it's related to:
- https://github.com/python/cpython/pull/3940
- https://github.com/python/cpython/pull/4069

Idea is: Unicode characters are not well supported by pdflatex which what's 
we're using to build our PDF files.

There's two solutions:

- Use xelatex which just works but does not use the same fonts, and the output 
style is slightly different
- Use hard handcrafted latex macros to make pdflatex work

I'm personally in favor of the xelatex solution (The simple one: the patch even 
remove some lines from the sphinx conf).

But the handcrafted latex macro have some advantages: they only "whitelist" the 
actually used characters, so typos are easily spotted, by the cost of adding a 
new macro each time we use a new out of the recognized set unicode character.

My point of view is: Documentation people should not have to care about Latex, 
they should not even know we're using latex in the background to build PDFs, so 
the xelatex looks the right solution to me.

I'm currently running a test build of an un-to-date Python 3.6 with PR 3940 
applied to check if it succeed as expected. (I'm personally unable to type the 
macro to allow "Latin small letter dotless i" to work, so I won't test PR 
31589).

It it succeed, I'll also provide screenshot showing the differences between the 
current PDF (pdflatex) and the xelatex one.

--

___
Python tracker 

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



[issue25054] Capturing start of line '^'

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Good point. Neither old nor new (which matches regex) behaviors conform the 
documentation: "Empty matches are included in the result unless they touch the 
beginning of another match." It is easy to exclude empty matches that touch the 
*ending* of another match. This would be consistent with the new behavior of 
split() and sub().

But this would break a one existing test for issue817234. Though that issue 
shouldn't rely on this detail. The test should just test that iterating doesn't 
hang.

And this would break a regular expression in pprint.

PR 4678 implements this version. I don't know what version is better.

>>> list(re.finditer(r"\b|:+", "a::bc"))
[, , , ]
>>> re.sub(r"(\b|:+)", r"[\1]", "a::bc")
'[]a[][::]bc[]'

With PR 4471 the result of re.sub() is the same, but the result of 
re.finditer() is as in msg307424.

--

___
Python tracker 

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



[issue32200] Full docs build of 3.6 and 3.7 failing since 2017-10-15

2017-12-02 Thread Julien Palard

Change by Julien Palard :


--
nosy: +jfbu

___
Python tracker 

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



[issue3262] re.split doesn't split with zero-width regex

2017-12-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4589

___
Python tracker 

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



[issue852532] ^$ won't split on empty line

2017-12-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4588

___
Python tracker 

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



[issue25054] Capturing start of line '^'

2017-12-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4586

___
Python tracker 

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



[issue1647489] zero-length match confuses re.finditer()

2017-12-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4587

___
Python tracker 

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



[issue32203] [ctypes] test_struct_by_value fails on android-24-arm64

2017-12-02 Thread Xavier de Gaye

New submission from Xavier de Gaye :

test_struct_by_value is ok on Android API 24 on the armv7, x86 and x86_64 
architectures.

==
FAIL: test_struct_by_value (ctypes.test.test_win32.Structures)
--
Traceback (most recent call last):
  File "/sdcard/org.python/lib/python3.7/ctypes/test/test_win32.py", line 137, 
in test_struct_by_value
self.assertEqual(ret.left, left.value)
AssertionError: -200 != 10

--
Ran 1 test in 0.204s

--
components: Extension Modules, Tests
messages: 307440
nosy: xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: [ctypes] test_struct_by_value fails on android-24-arm64
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



[issue32202] [ctypes] all long double tests fail on android-24-x86_64

2017-12-02 Thread Xavier de Gaye

New submission from Xavier de Gaye :

These tests are ok on Android API 24 on the armv7, x86 and arm64 architectures.

==
FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks)
--
Traceback (most recent call last):
  File "/sdcard/org.python/lib/python3.7/ctypes/test/test_callbacks.py", line 
83, in test_longdouble
self.check_type(c_longdouble, 3.14)
  File "/sdcard/org.python/lib/python3.7/ctypes/test/test_callbacks.py", line 
25, in check_type
self.assertEqual(result, arg)
AssertionError: 0.0 != 3.14

==
FAIL: test_longdouble (ctypes.test.test_cfuncs.CFunctions)
--
Traceback (most recent call last):
  File "/sdcard/org.python/lib/python3.7/ctypes/test/test_cfuncs.py", line 165, 
in test_longdouble
self.assertEqual(self._dll.tf_D(42.), 14.)
AssertionError: 0.0 != 14.0

==
FAIL: test_longdouble_plus (ctypes.test.test_cfuncs.CFunctions)
--
Traceback (most recent call last):
  File "/sdcard/org.python/lib/python3.7/ctypes/test/test_cfuncs.py", line 171, 
in test_longdouble_p
lus
self.assertEqual(self._dll.tf_bD(0, 42.), 14.)
AssertionError: 0.0 != 14.0

==
FAIL: test_longdoubleresult (ctypes.test.test_functions.FunctionTestCase)
--
Traceback (most recent call last):
  File "/sdcard/org.python/lib/python3.7/ctypes/test/test_functions.py", line 
146, in test_longdoubl
eresult
self.assertEqual(result, 21)
AssertionError: 0.0 != 21

--
Ran 468 tests in 1.815s

FAILED (failures=4, skipped=92)
test test_ctypes failed
test_ctypes failed

1 test failed:
test_ctypes

--
components: Extension Modules, Tests
messages: 307439
nosy: xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: [ctypes] all long double tests fail on android-24-x86_64
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



[issue32174] nonASCII punctuation characters can not display in python363.chm.

2017-12-02 Thread Steve Dower

Steve Dower  added the comment:

I'm not sure there will be any good fix for this. We might be able to coerce 
proper utf-8 output from Sphinx, and if it also adds the encoding tags required 
by whatever ancient version of Internet Explorer is used then it should be fine

It's likely just best to avoid special punctuation in doc source files though.

--

___
Python tracker 

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



[issue32201] Python uuids may not be persistent across time

2017-12-02 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Hum, I misunderstood the meaning of persistency in this context. It is the 
uniqueness that is persistent. Sorry for the noise, closing now.

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



[issue32200] Full docs build of 3.6 and 3.7 failing since 2017-10-15

2017-12-02 Thread Ned Deily

Ned Deily  added the comment:

It looks like the 3.6 and 3.7 full doc build has been failing since 2017-10-15. 
 Seen in /var/log/docsbuild/python37-en.log:

[...]
[3] [4] [5] [6] [7] (/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-1.def
) (/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uninames.dat)
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-1.def)

! Package ucs Error: Unknown Unicode character 383 = U+017F,
(ucs)possibly declared in uni-1.def.
(ucs)Type H to see if it is available with options.

See the ucs package documentation for explanation.
Type  H   for immediate help.
 ...  
  
l.781 Latin small letter dotless i), ‘ſ
  ’ (U+017F, Latin small letter lo...

? 
! Emergency stop.
 ...  
  
l.781 Latin small letter dotless i), ‘ſ
  ’ (U+017F, Latin small letter lo...

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on howto-regex.log.
Latexmk: Index file 'howto-regex.idx' was written
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 256
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs of latex/pdflatex.
Latexmk: Errors, so I did not complete making targets
make[2]: *** [howto-regex.pdf] Error 12
make[2]: Leaving directory `/srv/docsbuild/python37/Doc/build/latex'
make[1]: *** [dist] Error 2
make[1]: Leaving directory `/srv/docsbuild/python37/Doc'
make: *** [autobuild-dev] Error 2

Julien, can you take a look please?

--
nosy: +mdk, ned.deily
title: Download of 3.7.0a2 docs giving a 404 error -> Full docs build of 3.6 
and 3.7 failing since 2017-10-15
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



[issue32201] Python uuids may not be persistent across time

2017-12-02 Thread Xavier de Gaye

New submission from Xavier de Gaye :

UUIDs are unique and persistent across time and space.

UUIDs generated using the getnode() function of the uuid module on a plaform 
where getnode() cannot use the MAC address are based on a random number created 
for that purpose and are therefore transient and only valid during the life 
time of the python process. This seems to be a bug.

My understanding of RFC 4122 is that in that case, the random number is 
generated only once, otherwise the usefulness of this method is not obvious. In 
any case the user should be made aware of the transientness of the result of 
getnode() since persistency is a key feature of UUIDs.

--
components: Library (Lib)
messages: 307435
nosy: barry, ned.deily, serhiy.storchaka, vstinner, xdegaye
priority: normal
severity: normal
status: open
title: Python uuids may not be persistent across time
type: behavior
versions: Python 2.7, Python 3.6, Python 3.7

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-12-02 Thread Ned Deily

Ned Deily  added the comment:

main.c now has compile errors on macOS:

../../source/Modules/main.c:904:20: error: expected expression
return SET_DECODE_ERROR("PYTHONEXECUTABLE environment "
   ^
../../source/Modules/main.c:46:5: note: expanded from macro 'SET_DECODE_ERROR'
do { \
^
../../source/Modules/main.c:919:24: error: expected expression
return SET_DECODE_ERROR("__PYVENV_LAUNCHER__ environment "
   ^
../../source/Modules/main.c:46:5: note: expanded from macro 'SET_DECODE_ERROR'
do { \
^
2 errors generated.

--
nosy: +ned.deily

___
Python tracker 

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



[issue32200] Download of 3.7.0a2 docs giving a 404 error

2017-12-02 Thread Carol Willing

New submission from Carol Willing :

Currently, the 3.7.0a2 doc links are giving 404 errors. 3.6 docs are working 
just fine.

https://docs.python.org/3.7/archives/python-3.7.0a2-docs-pdf-letter.tar.bz2 
results in a 404.

I wasn't sure if I should report here or in python.org issue tracker.

--
assignee: docs@python
components: Documentation
messages: 307433
nosy: docs@python, willingc
priority: normal
severity: normal
status: open
title: Download of 3.7.0a2 docs giving a 404 error
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



[issue32199] uuid.getnode() should return the MAC address on Android

2017-12-02 Thread Xavier de Gaye

New submission from Xavier de Gaye :

Currently uuid.getnode() returns a random 48-bit number and so the UUIDs are 
not persistent across time. The reason is that on Android the 'ip link list' 
command fails.

uuid._ip_getnode() should invoke the 'ip link' command instead.

--
components: Library (Lib)
messages: 307432
nosy: xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: uuid.getnode() should return the MAC address on Android
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



[issue32107] Improve MAC address calculation and fix test_uuid.py

2017-12-02 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

> I don't know how the proposed change can help.

It helps by fixing the regression introduced by a change made in  
23df2d1304ece169d7e0dfc843dfb8026b413d9f in this issue, a change that has been 
made only in the master branch. Before that change, successive calls to 
getnode() returned the same value on Android. The proposed PR 4677 does not fix 
that regression and hides that regression instead in the test suite.

The fact that getnode() should always return the same value or should not, must 
be discussed in another issue in the case where that point needs to be raised.

--

___
Python tracker 

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



[issue32198] \b reports false-positives in Indic strings involving combining marks

2017-12-02 Thread Shriramana Sharma

New submission from Shriramana Sharma :

Code:

import re
cons_taml = "[கஙசஞடணதநபமயரலவழளறன]"
print(re.findall("\\b" + cons_taml + "ை|ஐ", "ஐவர் பையன் இசை சிவிகை இல்லை இவ்ஐ"))
cons_deva = "[कखगघङचछजझञटठडढणतथदधनपफबभमयरलवशषसह]"
print(re.findall("\\b" + cons_deva + "ै|ऐ", "ऐषमः तैलम् ईडै समीशै ईक्षै ईक्ऐ"))

Specs:
Kubuntu Xenial 64 bit
Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609] on linux

Actual Output:
['ஐ', 'பை', 'கை', 'லை', 'ஐ']
['ऐ', 'तै', 'शै', 'षै', 'ऐ']

Expected Output:
['ஐ', 'பை']
['ऐ', 'तै']

Rationale:

The formulated RE desires to identify words *starting* with the vowel /ai/ 
(\u0BC8 ை in Tamil script and \u0948 ै in Devanagari as vowel sign or \u0B90 ஐ 
\u0910 ऐ as independent vowel). ஐவர் பையன் and ऐषमः तैलम् are the only words 
fitting this criterion. \b is defined to mark a word boundary and is here 
applied at the beginning of the RE.

Observation:

There seems to be some assumption that only GC=Lo characters constitute words. 
Hence the false positives at ச ி வ ி (க ை) and स म ी (श ै) where the ி and ी 
are vowel signs, and இ ல ் (ல ை) and ई क ् (ष ै) where the ் and ् are virama 
characters or vowel cancelling signs.

In Indic, such GC=Mc and GC=Mn characters are inalienable parts of words. They 
should be properly identified as parts of words and no word boundary answering 
to \b should be generated at their positions.

--
components: Regular Expressions
messages: 307430
nosy: ezio.melotti, jamadagni, mrabarnett
priority: normal
severity: normal
status: open
title: \b reports false-positives in Indic strings involving combining marks
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue32197] Compiling against master branch fails; error: expected expression SET_DECODE_ERROR

2017-12-02 Thread Sanyam Khurana

Sanyam Khurana  added the comment:

I used git bisect to track down the commit that broke the build.

Seems like this is the SHA: ebac19dad6263141d5db0a2c923efe049dba99d2

ebac19dad6263141d5db0a2c923efe049dba99d2 is the first bad commit
commit ebac19dad6263141d5db0a2c923efe049dba99d2
Author: Victor Stinner 
Date:   Fri Dec 1 20:09:52 2017 +0100

bpo-32030: Don't call _PyPathConfig_Fini() in Py_FinalizeEx() (#4667)

Changes:

* _PyPathConfig_Fini() cannot be called in Py_FinalizeEx().
  Py_Initialize() and Py_Finalize() can be called multiple times, but
  it must not "forget" parameters set by Py_SetProgramName(),
  Py_SetPath() or Py_SetPythonHome(), whereas _PyPathConfig_Fini()
  clear all these parameters.
* config_get_program_name() and calculate_program_full_path() now
  also decode paths using Py_DecodeLocale() to use the
  surrogateescape error handler, rather than decoding using
  mbstowcs() which is strict.
* Change _Py_CheckPython3() prototype: () => (void)
* Truncate a few lines which were too long

:04 04 de4ec929ff3fcd3c6455d8dae4d16e47fdd32ad5 
8b289341f1b5e68757ac3b111a7f11808f5de1ec M  Include
:04 04 ecddc93b37f74818d85f6d8e8ab0e0c57e893c03 
c51971a3af2b6f163e625505265277410bb9eedd M  Modules
:04 04 b92d30ac6375b7dde865a878e701684dd400e742 
7d5d8810407060f32c9cbce20dcfc6f9d425524f M  PC
:04 04 537f9e0e6a27b41178fe7b828a8da99c63cc2d9b 
b14940c66180023a3704ad3949367db3e82ca832 M  Python

--

___
Python tracker 

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



[issue32197] Compiling against master branch fails; error: expected expression SET_DECODE_ERROR

2017-12-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +vstinner
type: crash -> compile error

___
Python tracker 

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



[issue32197] Compiling against master branch fails; error: expected expression SET_DECODE_ERROR

2017-12-02 Thread Sanyam Khurana

New submission from Sanyam Khurana :

The current master branch at commit af5a895073c24637c094772b27526b94a12ec897

fails while building the interpreter.

The following is the traceback while running `make` after `./configure 
--with-pydebug`

gcc -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv 
-O3 -Wall -Wstrict-prototypes-std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration   -I. -I./Include-DPy_BUILD_CORE -o 
Modules/main.o Modules/main.c
Modules/main.c:904:20: error: expected expression
return SET_DECODE_ERROR("PYTHONEXECUTABLE environment "
   ^
Modules/main.c:46:5: note: expanded from macro 'SET_DECODE_ERROR'
do { \
^
1 error generated.
make: *** [Modules/main.o] Error 1

--
messages: 307427
nosy: CuriousLearner
priority: normal
severity: normal
status: open
title: Compiling against master branch fails; error: expected expression 
SET_DECODE_ERROR
type: crash
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



[issue32107] Improve MAC address calculation and fix test_uuid.py

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I don't know how the proposed change can help.

PR 4677 makes the test more lenient.

--
stage: patch review -> needs patch

___
Python tracker 

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



[issue32107] Improve MAC address calculation and fix test_uuid.py

2017-12-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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



[issue10544] yield expression inside generator expression does nothing

2017-12-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

PR 4676 backports warnings to 2.7 in Py3k mode.

--
status: closed -> open

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-12-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4584

___
Python tracker 

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



[issue32176] Zero argument super is broken in 3.6 for methods with a hacked __class__ cell

2017-12-02 Thread Nick Coghlan

Change by Nick Coghlan :


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

___
Python tracker 

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



[issue25910] Fixing links in documentation

2017-12-02 Thread Sanyam Khurana

Change by Sanyam Khurana :


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

___
Python tracker 

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



[issue32107] Improve MAC address calculation and fix test_uuid.py

2017-12-02 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

test_uuid fails now on android-24-armv7 on the master branch:

==
FAIL: test_getnode (test.test_uuid.TestUUIDWithoutExtModule)
--
Traceback (most recent call last):
  File "/sdcard/org.python/lib/python3.7/test/test_uuid.py", line 312, in 
test_getnode
self.assertEqual(node1, node2, '%012x != %012x' % (node1, node2))
AssertionError: 237015144408656 != 105397654869517 : d790637d2650 != 
5fdbcdc7560d

Some context:
* There is no _uuid extension module.
* All the getters in uuid.getnode() fail: _ip_getnode() fails because the 'ip 
link list' command fails on Android while 'ip link' would have succeeded (and 
would have hidden the above bug), 'ifconfig' does not print MAC addresses and 
the commands of the other getters do not exist.

The following patch fixes the problem:

diff --git a/Lib/uuid.py b/Lib/uuid.py
index cb2bc092bd..be06a6eff3 100644
--- a/Lib/uuid.py
+++ b/Lib/uuid.py
@@ -674,14 +674,14 @@ def getnode():
 getters = [_unix_getnode, _ifconfig_getnode, _ip_getnode,
_arp_getnode, _lanscan_getnode, _netstat_getnode]
 
-for getter in getters:
+for getter in getters + [_random_getnode]:
 try:
 _node = getter()
 except:
 continue
 if _node is not None:
 return _node
-return _random_getnode()
+assert False, '_random_getnode() returned None'

--
nosy: +xdegaye
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

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



[issue25054] Capturing start of line '^'

2017-12-02 Thread Martin Panter

Martin Panter  added the comment:

The new “finditer” behaviour seems to contradict the documentation about 
excluding empty matches if they touch the start of another match.

>>> list(re.finditer(r"\b|:+", "a::bc"))
[, , , , ]

An empty match at (1, 1) is included, despite it touching the beginning of the 
match at (1, 3). My best guess is that when an empty match is found, searching 
continues at the same position for the first non-empty match.

--
nosy: +martin.panter

___
Python tracker 

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



[issue29151] test_asyncore.TestAPI_UseIPv4Select / test_asyncore.TestAPI_UseIPv6Select fails test_handle_close_after_conn_broken

2017-12-02 Thread patrila

patrila  added the comment:

Adding a 'time.sleep(0.01)' before the 'send()' statement in 
test.test_asyncore.BaseTestAPI.test_handle_close_after_conn_broken.TestClient.handle_write
 works around this problem. Unsure if this a fix or just a workaround.

Patch attached.

--
keywords: +patch
Added file: 
https://bugs.python.org/file47311/python-3.6.3-Fix_test_asyncore_test_handle_close_after_conn_broken.patch

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-12-02 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset af5a895073c24637c094772b27526b94a12ec897 by Victor Stinner in 
branch 'master':
bpo-32030: _PyPathConfig_Init() sets home and program_name (#4673)
https://github.com/python/cpython/commit/af5a895073c24637c094772b27526b94a12ec897


--

___
Python tracker 

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



[issue9924] sqlite3 SELECT does not BEGIN a transaction, but should according to spec

2017-12-02 Thread Allen Li

Change by Allen Li :


--
nosy: +Allen Li

___
Python tracker 

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