[issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream

2018-06-21 Thread Deniz Bozyigit


Deniz Bozyigit  added the comment:

Hi, thank you for looking into this. I'm aware that the shown patch is not the 
ideal solution and a mere fix to get my jupyter operational. 

An indication on a workable solution could be the _samefile function in shutil 
that wraps os.path.samefile:

def _samefile(src, dst):
# Macintosh, Unix.
if hasattr(os.path, 'samefile'):
try:
return os.path.samefile(src, dst)
except OSError:
return False

# All other platforms: check for same pathname.
return (os.path.normcase(os.path.abspath(src)) ==
os.path.normcase(os.path.abspath(dst)))


I understand that the implicit platform differentiation that is done here (see 
the comment line) is not valid anymore since os.path.samefile is now available 
on windows systems. It seems that for a windows system the here implemented 
file name comparison could be workable (even moving it into os.path.samefile?), 
if the platform is identified correctly.

--

___
Python tracker 

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



Re: Feeding the trolls

2018-06-21 Thread Gregory Ewing

Steven D'Aprano wrote:

On Thu, 21 Jun 2018 21:49:15 +0100, mm0fmf wrote:


Design requirements for python newsreader client:

1. Block all top posters


I think it would be far more useful to block bottom-posters who don't 
snip irrelevant quoted text.


In the early days of Usenet, it was common for news servers to
refuse posts that didn't have a high enough ratio of new to
quoted text.
.
.
.
.
.
.
.
.
.
.
.
.
.
It was easily defeated, of course. :-) But at least it forced you
to think about the issue.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


[issue33876] doc Mention relevant pythonesque implementations

2018-06-21 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:

Thanks for the PR, and thanks everyone for the feedback.

But I don't think we should be the one maintaining a list of all available 
alternative Python implementation out there.

There is already a good list: 
https://wiki.python.org/moin/PythonImplementations which is the top result when 
people search for "Python implementation".

I'm inclined to close this issue.

--
nosy: +Mariatta
resolution:  -> rejected
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



Re: Feeding the trolls

2018-06-21 Thread Abdur-Rahmaan Janhangeer
aie maybe we can learn then warn ! mail sender is top poster

Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ

Design requirements for python newsreader client:
>
> 1. Block all top posters
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33936] OPENSSL_VERSION_1_1 never defined in _hashopenssl.c

2018-06-21 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue33905] IDLE: Test stackbrowser.Stackbrowser

2018-06-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

(My initial messages contained a mistaken idea based on a mis-remembering the 
details sys.last values and exceptions.)

If an exception is not caught and a traceback is printed, sys.last_type, 
sys.last_value, and sys.last_traceback are set.  When an exception is caught, 
the last_ x values are not touched, but the same are available by calling 
sys.exc_info.  Stackview accessed all 3 sys.last_x values, but they are not 
normally set when testing because exception are caught.  The test sets them 
from a sys.exc_info after catching an exception.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: IDLE: stackbrowser.Stackbrowser should accept exception. -> IDLE: Test 
stackbrowser.Stackbrowser
type: behavior -> enhancement

___
Python tracker 

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



[issue33936] OPENSSL_VERSION_1_1 never defined in _hashopenssl.c

2018-06-21 Thread Quentin Minster


New submission from Quentin Minster :

I'm getting a compile error in Modules/_hashopenssl.c because the file uses 
some pre-1.1.0 APIs even though I'm running OpenSSL 1.1.0.

This is because this file doesn't define the OPENSSL_VERSION_1_1 macro, like 
Modules/_ssl.c does.

--
components: Extension Modules
messages: 320207
nosy: laomaiweng
priority: normal
severity: normal
status: open
title: OPENSSL_VERSION_1_1 never defined in _hashopenssl.c
type: compile error

___
Python tracker 

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



[issue33905] IDLE: stackbrowser.Stackbrowser should accept exception.

2018-06-21 Thread miss-islington


miss-islington  added the comment:


New changeset d554414d981a8bfe38cc5df5751bc3efcb0c36c3 by Miss Islington (bot) 
in branch '3.7':
bpo-33905: Add test for idlelib.stackview.StackBrowser. (GH-7852)
https://github.com/python/cpython/commit/d554414d981a8bfe38cc5df5751bc3efcb0c36c3


--
nosy: +miss-islington

___
Python tracker 

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



[issue33905] IDLE: stackbrowser.Stackbrowser should accept exception.

2018-06-21 Thread miss-islington


miss-islington  added the comment:


New changeset a0622f1071164bc67a307cfec1173c295901c4b9 by Miss Islington (bot) 
in branch '3.6':
bpo-33905: Add test for idlelib.stackview.StackBrowser. (GH-7852)
https://github.com/python/cpython/commit/a0622f1071164bc67a307cfec1173c295901c4b9


--

___
Python tracker 

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



[issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream

2018-06-21 Thread R. David Murray


R. David Murray  added the comment:

OK.  Finding a solution for this (other than never raising samefile on such 
systems and documenting it as a limitation) may be difficult.

--

___
Python tracker 

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



[issue33905] IDLE: stackbrowser.Stackbrowser should accept exception.

2018-06-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7465

___
Python tracker 

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



[issue33905] IDLE: stackbrowser.Stackbrowser should accept exception.

2018-06-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7464

___
Python tracker 

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



[issue33905] IDLE: stackbrowser.Stackbrowser should accept exception.

2018-06-21 Thread Terry J. Reedy


New submission from Terry J. Reedy :


New changeset bcd3a1a18d841338f57c39f6a7de8cf14d0c3e03 by Terry Jan Reedy in 
branch 'master':
bpo-33905: Add test for idlelib.stackview.StackBrowser. (GH-7852)
https://github.com/python/cpython/commit/bcd3a1a18d841338f57c39f6a7de8cf14d0c3e03


--

___
Python tracker 

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



[issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream

2018-06-21 Thread Eryk Sun


Eryk Sun  added the comment:

David, this is a bug in Python, and the proposed patch is insufficient. We use 
the volume serial number as st_dev, and this is not guaranteed to be unique in 
Windows, and may be 0, just as a file's index number is also allowed to be 0. 
Both possibilities are well documented. With a WebDAV volume you will find that 
both numbers are 0. Using the VSN and file index as if they're the same as 
POSIX st_dev and st_ino is technically wrong. There is no guarantee that this 
tuple uniquely identifies a file in Windows.

--
nosy: +eryksun

___
Python tracker 

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



[issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream

2018-06-21 Thread R. David Murray


R. David Murray  added the comment:

That patch would cause references to the same file on a google drive to report 
that the files were different.

I'd say this is a bug in Google Drive's posix emulation.

I'm not sure there's a good answer here, because even if every other element of 
the stat were equal, that wouldn't mean it was the same file: if you use 
copystat as well as copyfile the stats would otherwise be equal.

I think we should close this as a third party bug.

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



[issue26440] tarfile._FileInFile.seekable is broken in stream mode

2018-06-21 Thread Charmander


Change by Charmander <~@charmander.me>:


--
nosy: +charmander

___
Python tracker 

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



[issue33905] IDLE: stackbrowser.Stackbrowser should accept exception.

2018-06-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +7463
stage: test needed -> patch review

___
Python tracker 

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



[issue1617161] Instance methods compare equal when their self's are equal

2018-06-21 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

If [].append == [].append is True in the "unique set of callbacks" scenario, 
that implies that it's perfectly fine to not call one of them when both are 
registered. But this means that only one list ends up getting updated, when you 
tried to register both for updates. That's definitely surprising, and not in a 
good way.

--
nosy: +josh.r

___
Python tracker 

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



[issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream

2018-06-21 Thread Deniz Bozyigit


Change by Deniz Bozyigit :


--
title: shutil.copyfile throws incorrect SameFileError -> shutil.copyfile throws 
incorrect SameFileError on Google Drive File Stream

___
Python tracker 

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



Re: translating foreign data

2018-06-21 Thread Cameron Simpson

On 21Jun2018 10:12, Ethan Furman  wrote:
I need to translate numeric data in a string format into a binary 
format.  I know there are at least two different methods of 
representing parts less that 1, such as "10.5" and "10,5".  The data 
is encoded using code pages, and can vary depending on the file being 
read (so I can't rely on current locale settings).


I'm sure this is a solved problem, but I'm not finding those solutions.  Any 
pointers?


It sounds like you're conflating two problems:

- the file character data encoding

- the numeric representation

Can't you just read the file as a text file using the correct 
codepage->decoding setting to get strings, _then_ parse numbers either with 
some clunky regexp based approach or some flexible external library for common 
numeric forms? (Someone suggested babel, I've never used it.)


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


[issue33935] shutil.copyfile throws incorrect SameFileError

2018-06-21 Thread Deniz Bozyigit


New submission from Deniz Bozyigit :

When using shutil.copyfile on the Google Drive File Stream file system, a 
incorrect SameFileError can occur. 

MWE (assuming foo.txt exists in your google drive G:\\):
>>> f1 = 'G:\\My Drive\\foo.txt'
>>> f2 = 'G:\\My Drive\\foo2.txt'
>>> import shutil
>>> shutil.copyfile(f1, f2)
>>> shutil.copyfile(f1, f2)

--> Last line throws incorrect SameFileError. In comparison, executing the same 
code on a different file system (e.g. local hard drive) will result in no 
errors.

More details described here: https://github.com/jupyter/notebook/issues/3615

The error originates in the library in generalpath.py in the function samestat: 
Google Drive File Stream reports inode==0 which makes os.path.samefile(f1, f2) 
== True for any files f1 and f2 on Google File Stream.

I propose the following patch, which currently works for me:

--- genericpath.py  2018-06-22 02:14:27.145744900 +0200
+++ genericpath_new.py  2018-06-22 02:10:44.485961100 +0200
@@ -86,8 +86,11 @@
 # describing the same file?
 def samestat(s1, s2):
 """Test whether two stat buffers reference the same file"""
-return (s1.st_ino == s2.st_ino and
-s1.st_dev == s2.st_dev)
+return (s1.st_ino != 0 and
+   s2.st_ino != 0 and
+   s1.st_ino == s2.st_ino and
+s1.st_dev == s2.st_dev)
+


 # Are two filenames really pointing to the same file?

--
components: Library (Lib), Windows
messages: 320199
nosy: Deniz Bozyigit, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: shutil.copyfile throws incorrect SameFileError
type: crash
versions: Python 3.4, 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



Re: Feeding the trolls

2018-06-21 Thread Steven D'Aprano
On Thu, 21 Jun 2018 21:49:15 +0100, mm0fmf wrote:

[snip unnecessary quoting]
> Design requirements for python newsreader client:
> 
> 1. Block all top posters

I think it would be far more useful to block bottom-posters who don't 
snip irrelevant quoted text.



-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33919] Expose _PyCoreConfig structure to Python

2018-06-21 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

I think the basic implementation problem is that by the time you get to 
get_hash_info() in sysmodule.c, you no longer have access to the _PyCoreConfig 
object, nor the _PyMain object that it's generally attached to.

--

___
Python tracker 

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



[issue33905] IDLE: stackbrowser.Stackbrowser should accept exception.

2018-06-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
Removed message: https://bugs.python.org/msg320028

___
Python tracker 

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



[issue33905] IDLE: stackbrowser.Stackbrowser should accept exception.

2018-06-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
Removed message: https://bugs.python.org/msg320002

___
Python tracker 

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



Re: translating foreign data

2018-06-21 Thread Gregory Ewing

George Fischhof wrote:


- if you found only one type, then that is the decimal


Only if you're sure that all numbers contain a decimal separator.
Otherwise there's no way to be sure in general.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


[issue33460] ... used to indicate many different things in chapter 3, some are confusing

2018-06-21 Thread Lew Kurtz


Change by Lew Kurtz :


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

___
Python tracker 

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



[issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error

2018-06-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



Re: translating foreign data

2018-06-21 Thread George Fischhof
Peter Otten <__pete...@web.de> ezt írta (időpont: 2018. jún. 21., Cs,
22:45):

> Ethan Furman wrote:
>
> > I need to translate numeric data in a string format into a binary
> format.
> > I know there are at least two different
> > methods of representing parts less that 1, such as "10.5" and "10,5".
> The
> > data is encoded using code pages, and can vary depending on the file
> being
> > read (so I can't rely on current locale settings).
> >
> > I'm sure this is a solved problem, but I'm not finding those solutions.
> > Any pointers?
>
> There's babel
>
> http://babel.pocoo.org/en/latest/numbers.html#parsing-numbers
>
> though I'm not sure what to think of the note below the linked paragraph.
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list


Hi,

if you have several values in a file, then you probably you can check the
delimiters: there is only one decimal separator,
- so if you find a number with 2 separators, then a rightmost is a the
decimal
- if you found only one type, then that is the decimal
- try to check the separator from right to left
- if you found 4 digits right to a separator, then that is the decimal
separator
etc (maybe wikipedia should be checked for other separators.
Other thousand separators used: space, apostrophe, and in India after the
first thousand separator the separation is done with two numbers, not three

And if you are able to identify the encoding codepage, then you should
follow what the codepage says

Another help can be if know the possible value range of the numbers (maybe
it should be asked ...)


George
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Feeding the trolls

2018-06-21 Thread mm0fmf

On 21/06/2018 05:02, Abdur-Rahmaan Janhangeer wrote:

by building a custom py-based mail client maybe ^^_

Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ

On Wed, 20 Jun 2018, 17:18 D'Arcy Cain,  wrote:


On 2018-06-20 08:10 AM, Tim Golden wrote:

[... snip discussions about Bart's language ...]

Wearing my moderator hat

Can we take the "Bart's language vs Python Show" to some other forum,
please? We've already gone over this ground again and again and it isn't
helping the signal-to-noise ratio here on the Python list /
comp.lang.python


Thank you.  Many of us have blocked rick and bart years ago.  If you are
just going to feed the trolls we have to see their nonsense anyway.
Just email them privately if you really feel the need to vent.

One of these days I will have to figure out how to block replies to the
trolls as well.

--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com
--
https://mail.python.org/mailman/listinfo/python-list



Design requirements for python newsreader client:

1. Block all top posters

--
https://mail.python.org/mailman/listinfo/python-list


Re: translating foreign data

2018-06-21 Thread Peter Otten
Ethan Furman wrote:

> I need to translate numeric data in a string format into a binary format. 
> I know there are at least two different
> methods of representing parts less that 1, such as "10.5" and "10,5".  The
> data is encoded using code pages, and can vary depending on the file being
> read (so I can't rely on current locale settings).
> 
> I'm sure this is a solved problem, but I'm not finding those solutions. 
> Any pointers?

There's babel

http://babel.pocoo.org/en/latest/numbers.html#parsing-numbers

though I'm not sure what to think of the note below the linked paragraph.


-- 
https://mail.python.org/mailman/listinfo/python-list


[issue1617161] Instance methods compare equal when their self's are equal

2018-06-21 Thread Armin Rigo


Change by Armin Rigo :


--
nosy:  -arigo

___
Python tracker 

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



Re: translating foreign data

2018-06-21 Thread Ben Bacarisse
Ethan Furman  writes:
 
> I need to translate numeric data in a string format into a binary
> format.  I know there are at least two different methods of
> representing parts less that 1, such as "10.5" and "10,5".  The data
> is encoded using code pages, and can vary depending on the file being
> read (so I can't rely on current locale settings).
>
> I'm sure this is a solved problem, but I'm not finding those
> solutions.  Any pointers?

You say "at least two" and give two but not knowing the others will hamper
anyone trying to help.  (I appreciate that you may not yet know if there
are to be any others.)

You say in a followup that you don't need to worry about digit grouping
marks (like thousands separators) so I'm not sure what the problem is.
Can't you just replace ',' with '.' a proceed as if you had only one
representation?

The code page remark is curious.  Will some "code pages" have digits
that are not ASCII digits?

-- 
Ben.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: syntax difference

2018-06-21 Thread bart4858
Alister:
==
which can be implemented in python by putting function calls as members 
of a list or dictionary 

switch=[case1,case2,case3] 
switch[a]() 
==
This is the approach you might use when you don't have a proper switch. It 
could be done in C that way.

Problems: the code for the different cases is not localised. You have to think 
up function names. The cases must be listed in that order. If the first case is 
not zero, you have to deal with that. Gaps in the sequence are problematical. 
You need a way of detecting the default case. There is no association between 
case number and its entry. The case numbers may be named values, so won't know 
what order they need to be in.

Using a dict will solve some of that, but its not clear what overheads there 
are in setting up the dict.

A proper switch also allows lists, ranges and scalars, or any mix, for each 
case block. It's not clear how a dict can be used for that, without adding 
another layer of processing which defeats part of the purpose in having switch.

Above all, you lose the clarity of a proper switch construct.

Alister:
==
(although i personally would still like to see a switch if anyone can 
come up with a suitable syntax that does not break the rest of the python 
philosophy wtr indentation.) 
==

The syntax is a minor detail. The biggest problem with adding an int-based 
switch to Python that uses a jump-table is that that requires the case values 
to be known at compile-time. Usually they won't be.

I came up with a way around this which used tentative byte code which is fixed 
up the first time it is executed. But that is rather hairy, and it means case 
values are fixed: if A is a case value of 10, then if later on it is 20, it 
will be treated as 10 still.

For such reasons it is unlikely to make it into Python in that form.

However a switch statement can still be useful for its expressiveness, and 
implemented as sequential tests.

-- 
Bart
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: translating foreign data

2018-06-21 Thread Ethan Furman

On 06/21/2018 12:07 PM, codewiz...@gmail.com wrote:

On Thursday, June 21, 2018 at 1:08:35 PM UTC-4, Ethan Furman wrote:



I need to translate numeric data in a string format into a binary format.  I 
know there are at least two different
methods of representing parts less that 1, such as "10.5" and "10,5".  The data 
is encoded using code pages, and can
vary depending on the file being read (so I can't rely on current locale 
settings).

I'm sure this is a solved problem, but I'm not finding those solutions.  Any 
pointers?


Try this StackOverflow answer: https://stackoverflow.com/a/17815252


--> import locale
--> a = u'545,545.'
--> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
'en_US.UTF-8'

The problem there is it sets the locale for the entire process -- I just need the conversion step for individual pieces 
of data without modifying the user's settings.


--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list


Re: translating foreign data

2018-06-21 Thread Ethan Furman

On 06/21/2018 10:36 AM, Peter Pearson wrote:

On Thu, 21 Jun 2018 10:12:27 -0700, Ethan Furman  wrote:

I need to translate numeric data in a string format into a binary
format.  I know there are at least two different methods of
representing parts less that 1, such as "10.5" and "10,5".  The data
is encoded using code pages, and can vary depending on the file being
read (so I can't rely on current locale settings).

I'm sure this is a solved problem, but I'm not finding those
solutions.  Any pointers?


Do you also have to accommodate the possibility that one thousand
might be written "1,000" or "1.000"?


Nope, just the decimal character.

--
~Ethan~


--
https://mail.python.org/mailman/listinfo/python-list


Re: translating foreign data

2018-06-21 Thread codewizard
On Thursday, June 21, 2018 at 1:08:35 PM UTC-4, Ethan Furman wrote:
> I need to translate numeric data in a string format into a binary format.  I 
> know there are at least two different 
> methods of representing parts less that 1, such as "10.5" and "10,5".  The 
> data is encoded using code pages, and can 
> vary depending on the file being read (so I can't rely on current locale 
> settings).
> 
> I'm sure this is a solved problem, but I'm not finding those solutions.  Any 
> pointers?
> 
> --
> ~Ethan~

Try this StackOverflow answer: https://stackoverflow.com/a/17815252

Regards,
Igor.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33922] Enforce 64bit Python by Launcher

2018-06-21 Thread Robert


Robert  added the comment:

I extended the documentation and created a pullrequest:

https://github.com/python/cpython/pull/7849

--

___
Python tracker 

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



[issue33922] Enforce 64bit Python by Launcher

2018-06-21 Thread Robert


Change by Robert :


--
pull_requests: +7459

___
Python tracker 

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



[issue30291] Allow windows launcher to specify bit lengths with & without minor version

2018-06-21 Thread Robert


Change by Robert :


--
pull_requests: +7460

___
Python tracker 

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



[issue1617161] Instance methods compare equal when their self's are equal

2018-06-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



Re: syntax difference

2018-06-21 Thread Alister via Python-list
On Wed, 20 Jun 2018 11:41:23 -0700, bart4858 wrote:

> The actual interpreter code is irrelevant. Switch would be a feature of
> the language being interpreted, not of the interpreter.
> 
> If the task is to match an expression X against a variety of values,
> then expressing that as a switch means the interpreter /could/ use a
> jump table (of labels within the byte code), rather than execute a chain
> of X==Y tests within byte code. So, evaluate X once then it could be a
> single byte code op.
> 
> At least, it will know that exactly the same X value is being tested. So
> you evaluate it once then keep it on the stack.
> 
> Think of Switch as another kind if hint.

which can be implemented in python by putting function calls as members 
of a list or dictionary

switch=[case1,case2,case3]
switch[a]()

(although i personally would still like to see a switch if anyone can 
come up with a suitable syntax that does not break the rest of the python 
philosophy wtr indentation.)



-- 
There are more things in heaven and earth,
Horatio, than are dreamt of in your philosophy.
-- Wm. Shakespeare, "Hamlet"
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: write the values of an ordered dictionary into a file

2018-06-21 Thread Peter Otten
Ganesh Pal wrote:

> Hi Team

There is no team, just some random guys on the net. Sorry to disappoint 
you...

> I need to write the values of an ordered dictionary into a file . All
> values should be in a single row with a header list
> 
> 
> 
> *Example:*
> 
> 
> 
> *student = [("NAME", "John"),*
> 
> *   ("AGE", 28),*
> 
> *   ("SCORE", 13),*
> 
> *   ("YEAR", 2018),*
> 
> *   ("FEE", 250)]*
> 
> *student = OrderedDict(student)*
> 
> 
> 
> *The OrderedDict Should be append at the end of the file as as shown
> below.*
> 
> 
> *# tail -2  /tmp/student_record.txt *
> 
> *.*
> 
> *||STUDENT NAME||STUDENT AGE||MARKS SCORED||PASSED YEAR||FEES PAID||*
> 
> *||John||  28   ||  13|| 2018  || 250 ||*


Here's one way, written in Python 3.

widths = [len(ch) for ch in header_list]

def print_row(values, widths=widths, file=None):
print(
"||",
"||".join("{:^{}}".format(v, w) for v, w in zip(values, widths)),
"||", sep="", file=file
)

print_row(header_list)
print_row(student.values())

In Python 2 it should work after

from __future__ import print_function

or by replacing print() with a few file.write() calls.


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: write the values of an ordered dictionary into a file

2018-06-21 Thread MRAB

On 2018-06-21 18:11, Ganesh Pal wrote:
> Hi Team
>
> I need to write the values of an ordered dictionary into a file . All
> values should be in a single row with a header list
>
> *Example:*
>
> *student = [("NAME", "John"),*
> *   ("AGE", 28),*
> *   ("SCORE", 13),*
> *   ("YEAR", 2018),*
> *   ("FEE", 250)]*
> *student = OrderedDict(student)*
>
> *The OrderedDict Should be append at the end of the file as as shown 
below.*

>
> *# tail -2  /tmp/student_record.txt *
> *.*
> *||STUDENT NAME||STUDENT AGE||MARKS SCORED||PASSED YEAR||FEES PAID||*
> *||John||  28   ||  13|| 2018  || 250 ||*
>
>
> Questions:
>
> (1) Below is my partial solution , any comments and suggestions ( I 
am not

> to get the “||” delimiter correctly, trying it )
>
> #!/usr/bin/python
>
> # A Python program to write the values of an OderedDict into a file
> # The values should be formatted correctly under its headers
>
> from collections import OrderedDict
> tmp = '/tmp/student_record.txt'
>
> student = [("NAME", "John"),
> ("AGE", 28),
> ("SCORE", 13),
> ("YEAR", 2018),
> ("FEE", 250)]
>
> student = OrderedDict(student)
>
> header_list = ["STUDENT NAME", "STUDENT AGE", "MARKS SCORED", "PASSED 
YEAR",

>  "FEES PAID"]
>
> header_string = '||' + '||'.join(header_list) + '||'
>
> with open(tmp, 'a') as fd:

header_string is already a string, so here you're just iterating over 
the characters of that string:


>   for item in header_string:
>   fd.write("%s" % (item))
>
You can write it more simple like this:

fd.write("%s\n" % header_string)

Here you're writing a newline before each of the fields/columns:

>   for value in student.values():
>   fd.write("\n")
>   fd.write("||")
>   fd.write("%s" % (value))
>
>
> *output:*
>
> *root@X1:/Play_ground/SPECIAL_TYPES# cat /tmp/student_record.txt*
> *||STUDENT NAME||STUDENT AGE||MARKS SCORED||PASSED YEAR||FEES PAID||*
> *||John*
> *||28*
> *||13*
> *||2018*
>
>
> (2)Any alternative way to solve this easily and store the data  in the
> requested format (can I still use cvs writer to format this)
>
>
> I am a Linux user with Python 2.7
>
What I would do is measure the widths of the each heading and of each 
value and then pad them out to the longest:



header_list = ["STUDENT NAME", "STUDENT AGE", "MARKS SCORED", "PASSED 
YEAR", "FEES PAID"]

header_widths = [len(header) for header in header_list]

value_list = [str(value) for value in student.values()]
value_widths = [len(value) for value in value_list]

column_widths = [max(header_width, value_width) for header_width, 
value_width in zip(header_widths, value_widths)]


with open(tmp, 'a') as fd:
fd.write('||' + '||'.join(header.ljust(width) for header, width in 
zip(header_list, column_widths)) + '||\n')
fd.write('||' + '||'.join(value.ljust(width) for value, width in 
zip(value_list, column_widths)) + '||\n')

--
https://mail.python.org/mailman/listinfo/python-list


Re: translating foreign data

2018-06-21 Thread Peter Pearson
On Thu, 21 Jun 2018 10:12:27 -0700, Ethan Furman  wrote:
> I need to translate numeric data in a string format into a binary
> format.  I know there are at least two different methods of
> representing parts less that 1, such as "10.5" and "10,5".  The data
> is encoded using code pages, and can vary depending on the file being
> read (so I can't rely on current locale settings).
>
> I'm sure this is a solved problem, but I'm not finding those
> solutions.  Any pointers?

Do you also have to accommodate the possibility that one thousand
might be written "1,000" or "1.000"?

-- 
To email me, substitute nowhere->runbox, invalid->com.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: write the values of an ordered dictionary into a file

2018-06-21 Thread Peter Pearson
On Thu, 21 Jun 2018 22:41:48 +0530, Ganesh Pal  wrote:
[snip]
[what I think OP wants:]
>
> *.*
>
> *||STUDENT NAME||STUDENT AGE||MARKS SCORED||PASSED YEAR||FEES PAID||*
>
> *||John||  28   ||  13|| 2018  || 250 ||*
>
>
> Questions:
>
> (1) Below is my partial solution , any comments and suggestions ( I am not
> to get the “||” delimiter correctly, trying it )
>
> #!/usr/bin/python
> # A Python program to write the values of an OderedDict into a file
> # The values should be formatted correctly under its headers
>
> from collections import OrderedDict
>
> tmp = '/tmp/student_record.txt'
> student = [("NAME", "John"),
>("AGE", 28),
>("SCORE", 13),
>("YEAR", 2018),
>("FEE", 250)]
>
> student = OrderedDict(student)
> header_list = ["STUDENT NAME", "STUDENT AGE", "MARKS SCORED", "PASSED YEAR",
> "FEES PAID"]
>
> header_string = '||' + '||'.join(header_list) + '||'
> with open(tmp, 'a') as fd:
>  for item in header_string:
>  fd.write("%s" % (item))
>
>  for value in student.values():
>  fd.write("\n")
>  fd.write("||")
>  fd.write("%s" % (value))
>
> *output:*
> *root@X1:/Play_ground/SPECIAL_TYPES# cat /tmp/student_record.txt*
> *||STUDENT NAME||STUDENT AGE||MARKS SCORED||PASSED YEAR||FEES PAID||*
> *||John*
> *||28*
> *||13*
> *||2018*
[snip]

You don't say which aspects of this output you find unsatisfactory and
want help with, but . . .

 - You're writing "\n" in front of every *field*, when you only want to
   write it in front of every line; and

 - To make the columns line up right, you'll want to specify the widths
   of the character strings being written, e.g., using "%10s" in place
   of "%s".

-- 
To email me, substitute nowhere->runbox, invalid->com.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33897] Add a restart option to logging.basicConfig()

2018-06-21 Thread Dong-hee Na


Dong-hee Na  added the comment:

Can I take a look at this issue?

One question, if we pass the restart keyword as true, should we clear all 
handlers before we call basicConfig?, or should we maintain it?

--
nosy: +corona10

___
Python tracker 

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



write the values of an ordered dictionary into a file

2018-06-21 Thread Ganesh Pal
Hi Team



I need to write the values of an ordered dictionary into a file . All
values should be in a single row with a header list



*Example:*



*student = [("NAME", "John"),*

*   ("AGE", 28),*

*   ("SCORE", 13),*

*   ("YEAR", 2018),*

*   ("FEE", 250)]*

*student = OrderedDict(student)*



*The OrderedDict Should be append at the end of the file as as shown below.*


*# tail -2  /tmp/student_record.txt *

*.*

*||STUDENT NAME||STUDENT AGE||MARKS SCORED||PASSED YEAR||FEES PAID||*

*||John||  28   ||  13|| 2018  || 250 ||*





Questions:


(1) Below is my partial solution , any comments and suggestions ( I am not
to get the “||” delimiter correctly, trying it )



#!/usr/bin/python



# A Python program to write the values of an OderedDict into a file

# The values should be formatted correctly under its headers



from collections import OrderedDict

tmp = '/tmp/student_record.txt'



student = [("NAME", "John"),

   ("AGE", 28),

   ("SCORE", 13),

   ("YEAR", 2018),

   ("FEE", 250)]

student = OrderedDict(student)



header_list = ["STUDENT NAME", "STUDENT AGE", "MARKS SCORED", "PASSED YEAR",

"FEES PAID"]

header_string = '||' + '||'.join(header_list) + '||'



with open(tmp, 'a') as fd:

 for item in header_string:

 fd.write("%s" % (item))



 for value in student.values():

 fd.write("\n")

 fd.write("||")

 fd.write("%s" % (value))





*output:*



*root@X1:/Play_ground/SPECIAL_TYPES# cat /tmp/student_record.txt*

*||STUDENT NAME||STUDENT AGE||MARKS SCORED||PASSED YEAR||FEES PAID||*

*||John*

*||28*

*||13*

*||2018*





(2)Any alternative way to solve this easily and store the data  in the
requested format (can I still use cvs writer to format this)





I am a Linux user with Python 2.7



Regards,
Ganesh
-- 
https://mail.python.org/mailman/listinfo/python-list


translating foreign data

2018-06-21 Thread Ethan Furman
I need to translate numeric data in a string format into a binary format.  I know there are at least two different 
methods of representing parts less that 1, such as "10.5" and "10,5".  The data is encoded using code pages, and can 
vary depending on the file being read (so I can't rely on current locale settings).


I'm sure this is a solved problem, but I'm not finding those solutions.  Any 
pointers?

--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list


[issue33912] [EASY] test_warnings: test_exec_filename() fails when run with -Werror

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

Thank you Christopher Frederickson for your contribution! I merged your PR. I 
confirm that it fixes the issue.

Thanks Thomas Kluyver for the hints ;-)

--

___
Python tracker 

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



[issue33912] [EASY] test_warnings: test_exec_filename() fails when run with -Werror

2018-06-21 Thread STINNER Victor


Change by STINNER Victor :


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



[issue33912] [EASY] test_warnings: test_exec_filename() fails when run with -Werror

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 419e88d18ccc83e182afca124d42f46794022aab by Victor Stinner 
(Christopher Frederickson) in branch 'master':
bpo-33912: Fix test_warnings when run with -Werror (GH-7839)
https://github.com/python/cpython/commit/419e88d18ccc83e182afca124d42f46794022aab


--

___
Python tracker 

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



[issue33928] _Py_DecodeUTF8Ex() creates surrogate pairs on Windows

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

> I don't see anything wrong.

I write a C function to test _Py_DecodeUTF8Ex():

* surrogateescape=0 fails with a decoding error as expected
* surrogateescape=1 escapes the bytes as expected as: '\udced\udcb2\udc80'

Ok, I just misunderstood the code: the decoder is fine!

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



[issue33934] locale.getlocale() seems wrong when the locale is yet unset (python3 on linux)

2018-06-21 Thread Nicolas Hainaux


New submission from Nicolas Hainaux :

Expected behaviour:

When unset, the locale in use is `C` (as stated in python documentation) and 
`locale.getlocale()` returns  `(None, None)` on Linux with python2.7 or on 
Windows with python2.7 and python 3.6 (at least):


$ python2
Python 2.7.15 (default, May  1 2018, 20:16:04) 
[GCC 7.3.1 20180406] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getlocale()
(None, None)
>>> 


Issue:

But when using python3.4+ on Linux, instead of `(None, None)`, 
`locale.getlocale()` returns the same value as `locale.getdefaultlocale()`:


$ python
Python 3.6.3 (default, Oct 24 2017, 14:48:20) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getlocale()
('fr_FR', 'UTF-8')
>>> locale.localeconv()
{'int_curr_symbol': '', 'currency_symbol': '', 'mon_decimal_point': '', 
'mon_thousands_sep': '', 'mon_grouping': [], 'positive_sign': '', 
'negative_sign': '', 'int_frac_digits': 127, 'frac_digits': 127, 
'p_cs_precedes': 127, 'p_sep_by_space': 127, 'n_cs_precedes': 127, 
'n_sep_by_space': 127, 'p_sign_posn': 127, 'n_sign_posn': 127, 'decimal_point': 
'.', 'thousands_sep': '', 'grouping': []}
>>> locale.str(2.5)
'2.5'


Though the locale actually in use is still `C` (as shown above by the output of 
`locale.localeconv()` and confirmed by the result of `locale.str(2.5)`, which 
shows a dot as decimal point and not a comma (as expected with `fr_FR.UTF-8`)).

I could observe this confusing behaviour on Linux with python3.4, 3.5, 3.6 and 
3.7 (rc1). (Also on FreeBSD with python3.6.1).

A problematic consequence of this behaviour is that it becomes impossible to 
detect whether the locale has already been set by the user, or not.

I could not find any other similar issue and hope this is not a duplicate.

--
components: Library (Lib)
messages: 320192
nosy: zezollo
priority: normal
severity: normal
status: open
title: locale.getlocale() seems wrong when the locale is yet unset (python3 on 
linux)
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue33809] Expose `capture_locals` parameter in `traceback` convenience functions

2018-06-21 Thread Farhaan Bukhsh


Farhaan Bukhsh  added the comment:

Hahah! Let me try to put this on the IRC channel may be someone can help us 
there.

--

___
Python tracker 

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



[issue31530] CVE-2018-1000030: Python 2.7 readahead feature of file objects is not thread safe

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

I added this issue to my python-security page since the issue got a CVE number: 
CVE-2018-130

* 
http://python-security.readthedocs.io/vuln/cve-2018-130_python_2.7_readahead_is_not_thread_safe.html
* https://access.redhat.com/security/cve/cve-2018-130

--
title: Python 2.7 readahead feature of file objects is not thread safe -> 
CVE-2018-130: Python 2.7 readahead feature of file objects is not thread 
safe
type:  -> security

___
Python tracker 

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



[issue31530] Python 2.7 readahead feature of file objects is not thread safe

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

This bug has been fixed in Python 2.7.15.

--

___
Python tracker 

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



[issue33855] IDLE: Minimally test every non-startup module.

2018-06-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue33855] IDLE: Minimally test every non-startup module.

2018-06-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue33855] IDLE: Minimally test every non-startup module.

2018-06-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: test needed -> resolved
status: open -> closed
versions: +Python 2.7, Python 3.5 -Python 3.8

___
Python tracker 

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



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

2018-06-21 Thread Nicolas Noé

Change by Nicolas Noé :


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

___
Python tracker 

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



[issue32500] PySequence_Length() raises TypeError on dict type

2018-06-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I agree that error messages sometimes is misleading if use the C API.

PR 7846 fixes this, although I'm not sure this is the best wording.

--
assignee: docs@python -> serhiy.storchaka
components: +Interpreter Core
resolution: fixed -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

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



[issue32500] PySequence_Length() raises TypeError on dict type

2018-06-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7456

___
Python tracker 

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



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

2018-06-21 Thread Nicolas Noé

Nicolas Noé  added the comment:

I'm willing to try solving this!

--
nosy: +niconoe

___
Python tracker 

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



[issue33931] Building 2.7 on Windows with PC\VS9.0 is broken

2018-06-21 Thread Zachary Ware


Zachary Ware  added the comment:

Thanks, Anselm!  I'll leave this open until our VS9 buildbots [1] confirm that 
they're happy with it, but I suspect since they weren't broken before they 
won't be affected by this anyway.

[1] http://buildbot.python.org/all/#/builders?tags=%2Bvs9

--
assignee: christian.heimes -> zach.ware
resolution:  -> fixed
status: open -> pending

___
Python tracker 

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



[issue33931] Building 2.7 on Windows with PC\VS9.0 is broken

2018-06-21 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset 7b383a57145046a6a6ad6cd26f3139163df07885 by Zachary Ware (Anselm 
Kruis) in branch '2.7':
bpo-33931: Fix building using PC\VS9.0\build.bat -e (GH-7844)
https://github.com/python/cpython/commit/7b383a57145046a6a6ad6cd26f3139163df07885


--

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

Note: the doc doesn't say that the function must only be called once, nor 
document the (current) new Python 3.7 restriction (must only be called once):
https://docs.python.org/dev/c-api/init.html#c.Py_Initialize

--

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

Attached PR 7845 restores the Python 3.6 behaviour: calling Py_Initialize() 
twice does nothing.

--

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

The behaviour changed has been introduced by bpo-22257:

commit 1abcf6700b4da6207fe859de40c6c1bada6b4fec
Author: Eric Snow 
Date:   Tue May 23 21:46:51 2017 -0700

bpo-22257: Private C-API for core runtime initialization (PEP 432). (#1772)

(patch by Nick Coghlan)

Simplified change:

-if (initialized)
-return;
-initialized = 1;

+if (_Py_Initialized) {
+Py_FatalError("Py_InitializeCore: main interpreter already 
initialized");
+}

--
components: +Interpreter Core -Documentation

___
Python tracker 

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



[issue33925] builtin_function_or_method compares __self__ by identity instead of equality

2018-06-21 Thread R. David Murray


R. David Murray  added the comment:

This is still a duplicate issue, though, you are just arguing for a different 
resolution of the other one :)

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-21 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

I set the priority to release blocker to make sure that someone looks at this 
issue, even if I'm not sure that it's a huge regression.

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



[issue32500] PySequence_Length() raises TypeError on dict type

2018-06-21 Thread Vedran Čačić

Vedran Čačić  added the comment:

Sure, here it is: https://bugs.python.org/issue33933

--

___
Python tracker 

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



[issue33933] Error message says dict has no len

2018-06-21 Thread Vedran Čačić

New submission from Vedran Čačić :

Look at this:

>>> import bisect
>>> bisect.bisect({}, None)
Traceback (most recent call last):
  File "", line 1, in 
bisect.bisect({}, None)
TypeError: object of type 'dict' has no len()

Of course, objects of type 'dict' do have len. The problem is that bisect 
considers its first argument a sequence, which is very sensible to do 
(although, with ordered dicts, it's not the only sensible choice), but it gives 
a very wrong error message given that context.

At https://bugs.python.org/issue32500, R. David Murray told me to open this.

--
components: Interpreter Core
messages: 320178
nosy: veky
priority: normal
severity: normal
status: open
title: Error message says dict has no len
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



[issue32500] PySequence_Length() raises TypeError on dict type

2018-06-21 Thread R. David Murray


R. David Murray  added the comment:

IIUC that error message came from pypy, not CPython.  If you have a reproducer 
for CPython, you can open a new issue with a request to fix the error message.

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



[issue33931] Building 2.7 on Windows with PC\VS9.0 is broken

2018-06-21 Thread Anselm Kruis


Change by Anselm Kruis :


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

___
Python tracker 

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



[issue33809] Expose `capture_locals` parameter in `traceback` convenience functions

2018-06-21 Thread R. David Murray


R. David Murray  added the comment:

I think we should get one or more of the core devs who were involved in the 
changes that added that parameter to sign off on whether this is a good idea or 
not (I have no opinion at the moment).  You should be able to find them via git 
blame and looking at the issues related to the changesets you find.  Unless 
someone who remembers comes along and just adds them to nosy :)

--
nosy: +r.david.murray
type:  -> enhancement
versions:  -Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-21 Thread STINNER Victor

New submission from STINNER Victor :

It would help to document that calling Py_Initialize() twice in Python 3.7 now 
triggers a fatal error, whereas previous the second call did nothing. Document 
it at:
https://docs.python.org/dev/whatsnew/3.7.html#changes-in-the-c-api

... Or should it be considered as a regression?

--

My colleague Miro Hrončok reported a Python crash (SIGABRT) when running 
https://github.com/konlpy/konlpy test suite on Python 3.7:

"Fatal Python error: _Py_InitializeCore: main interpreter already initialized"

konlpy uses the JPype project, the bug is in JPype initialization function 
(it's a C extension):

* https://github.com/originell/jpype/issues/331
* https://github.com/originell/jpype/pull/332

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 320175
nosy: docs@python, eric.snow, ncoghlan, ned.deily, vstinner
priority: normal
severity: normal
status: open
title: Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)
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



[issue33903] Can't use lib2to3 with embeddable zip file

2018-06-21 Thread Steve Dower


Steve Dower  added the comment:

There's a command to generate that file though I forget what it is. The 
embeddable distro does not support installation, though it may work sometimes 
(it's still the same Python binaries).

Try going to nuget.org, search for Python and install one of those packages 
(there should be instructions on the site). Alternatively, I think the 
WinPython distro has a non-installed version that you may be able to use.

--

___
Python tracker 

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



[issue33927] Allow json.tool to have identical infile and outfile

2018-06-21 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi Michael, looking at the current code of json.tool, there is no reason for it 
not to be able to do this, I will a patch to do this tonight.

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue33931] Building 2.7 on Windows with PC\VS9.0 is broken

2018-06-21 Thread Anselm Kruis


New submission from Anselm Kruis :

Currently 2.7 fails to build on Win32 using PC\VS90\build.bat -e for two 
reasons:

1. Wrong openssl version: PC\VS9.0 is still at version 1.0.2k, whereas 
PCbuild/get_externals.bat downloads version 1.0.2o.

2. Building tcl fails with well known "nmakehlp" not found problem. It is 
caused by the following line in PC\VS90\build.bat: "nmake -f makefile.vc 
MACHINE=%machine% DEBUG=%debug_flag% INSTALLDIR="%tcltkdir%" clean all". 
Separate invocations of nmake for "clean" and "all" fix the problem.

I'll provide a pull request for both issues. I hope it is OK to make just a 
single PR, because the changes are trivial.


Relevant output from PC\VS90\build.bat:

Setting environment for using Microsoft Visual Studio 2008 x86 tools.

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

===
*** Compiler has 'Optimizations'
*** Compiler does not have 'Pentium 0x0f fix'
*** Linker has 'Win98 alignment problem'
*** Intermediate directory will be '.\Release_VC9\tcl_Dynamic'
*** Output directory will be '.\Release_VC9'
*** Suffix for binaries will be ''
*** Optional defines are '-DTCL_CFGVAL_ENCODING=\"cp1252\" -DSTDC_HEADERS 
-DNDEBUG -DTCL_CFG_OPTIMIZED'
*** Compiler version 9. Target machine is IX86
*** Host architecture is AMD64
*** Compiler options '-W3  -Ot -Oi -fp:strict -Gs -GS -GL  -RTC1 -W3'
*** Link options '-ltcg'
*** Dependency rules are not being used.

Cleaning .\Release_VC9\tcl_Dynamic\* ...
Cleaning ..\win\nmakehlp.obj ...
Cleaning ..\win\nmakehlp.exe ...
Cleaning ..\win\_junk.pch ...
Cleaning ..\win\vercl.x ...
Cleaning ..\win\vercl.i ...
Cleaning ..\win\versions.vc ...
cl -nologo -c -W3 -W3 -D _CRT_SECURE_NO_DEPRECATE -D 
_CRT_NONSTDC_NO_DEPRECATE -Fp.\Release_VC9\tcl_Dynamic\ -O2  -Ot -Oi -fp:strict 
-Gs -GS -GL -MD -I"
..\win" -I"..\generic" -I"..\libtommath" -DTCL_PIPE_DLL=\"tclpip85.dll\" 
-DTCL_TOMMATH -DMP_PREC=4 -Dinline=__inline -DTCL_CFGVAL_ENCODING=\"cp1252\" 
-DSTDC_HEA
DERS -DNDEBUG -DTCL_CFG_OPTIMIZED  -DTCL_USE_STATIC_PACKAGES=0  
-Fo.\Release_VC9\tcl_Dynamic\tclAppInit.obj ..\win\tclAppInit.c
tclAppInit.c
Der Befehl "nmakehlp" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
NMAKE : fatal error U1077: 'nmakehlp' : return code '0x1'
Stop.

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

===
*** Compiler has 'Optimizations'
*** Compiler does not have 'Pentium 0x0f fix'
*** Linker has 'Win98 alignment problem'
*** Intermediate directory will be '.\Release_VC9\tcl_Dynamic'
*** Output directory will be '.\Release_VC9'
*** Suffix for binaries will be ''
*** Optional defines are '-DTCL_CFGVAL_ENCODING=\"cp1252\" -DSTDC_HEADERS 
-DNDEBUG -DTCL_CFG_OPTIMIZED'
*** Compiler version 9. Target machine is IX86
*** Host architecture is AMD64
*** Compiler options '-W3  -Ot -Oi -fp:strict -Gs -GS -GL  -RTC1 -W3'
*** Link options '-ltcg'
*** Dependency rules are not being used.

Installing to 'D:\kruis_F\fg2\stackless\python\PC\VS9.0\..\..\externals\tcltk'
Installing tcl85.dll
Datei tcl85.dll nicht gefunden
NMAKE : fatal error U1077: 'xcopy' : return code '0x4'
Stop.

--
assignee: christian.heimes
components: SSL, Tkinter
messages: 320172
nosy: anselm.kruis, christian.heimes, steve.dower, zach.ware
priority: normal
severity: normal
status: open
title: Building 2.7 on Windows with PC\VS9.0 is broken
type: compile error
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



[issue33462] reversible dict

2018-06-21 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi, is everything good with attached PR or should I refactor it further?

--

___
Python tracker 

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



[issue33928] _Py_DecodeUTF8Ex() creates surrogate pairs on Windows

2018-06-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I don't see anything wrong.

--

___
Python tracker 

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



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

2018-06-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 3ad8decd76c736f393755537aeb19b5612c21761 by Pablo Galindo in 
branch 'master':
bpo-33716, test_concurrent_futures: increase timeout (GH-7828)
https://github.com/python/cpython/commit/3ad8decd76c736f393755537aeb19b5612c21761


--
nosy: +pablogsal

___
Python tracker 

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



[issue1617161] Instance methods compare equal when their self's are equal

2018-06-21 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

I just posted to python-dev about this issue:

https://mail.python.org/pipermail/python-dev/2018-June/153959.html

However, I think that comparing using "==" is the right thing to do. So I think 
that

>>> [].append == [].append
False

should really return True.

--
nosy: +jdemeyer

___
Python tracker 

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



[issue33930] Segfault with deep recursion into object().__dir__

2018-06-21 Thread Alistair Buxton


New submission from Alistair Buxton :

The following small snippet of code will crash 3.6.5 with a segfault.

The crash occurs at cleanup, so it won't happen in the interactive interpreter 
(until you exit).


# --- code ---

o = object()
for x in range(100):
o = o.__dir__
print(x, id(o.__dir__))

# --- end code ---

--
components: Interpreter Core
messages: 320167
nosy: a-j-buxton
priority: normal
severity: normal
status: open
title: Segfault with deep recursion into object().__dir__
type: crash
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



[issue33925] builtin_function_or_method compares __self__ by identity instead of equality

2018-06-21 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> This is a duplicate of issue1617161.

Well, it's really the opposite. That issue seems to be arguing that __self__ 
should be compared using "is" while I think it should be compared using "==".

--

___
Python tracker 

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



[issue33921] Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs

2018-06-21 Thread John Hagen


John Hagen  added the comment:

@ammar2

I see that now. Yeah it's further down in the docs and doesn't actually call 
out '' like is done for AF_CAN:

A tuple (interface, ) is used for the AF_CAN address family, where interface is 
a string representing a network interface name like 'can0'. The network 
interface name '' can be used to receive packets from all network interfaces of 
this family.

Ideally I think putting something in this section would be helpful:

A pair (host, port) is used for the AF_INET address family, where host is a 
string representing either a hostname in Internet domain notation like 
'daring.cwi.nl' or an IPv4 address like '100.50.200.5', and port is an integer.

--

___
Python tracker 

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



[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-06-21 Thread STINNER Victor


Change by STINNER Victor :


--
title: Regression: test_script_helper fails -> test_script_helper fails on 
Windows when run from the source code directory

___
Python tracker 

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



[issue32942] Regression: test_script_helper fails

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

I confirm that I reproduce the issue on Windows when running "python -m test 
test_script_helper -v" from the source code directory, on 3.6, 3.7 and master 
branches.

Using Python 3.6 installed on the system (using python.org installer), the same 
command pass.

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



[issue33928] _Py_DecodeUTF8Ex() creates surrogate pairs on Windows

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

> Could you show an example please?

I saw an issue when reading the code, I didn't try to trigger the issue using 
real code yet.

--

___
Python tracker 

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



[issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

I just created bpo-33929: "test_multiprocessing_spawn: 
WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows". See 
also my PR 7827.

--

___
Python tracker 

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



[issue33914] test_gdb fails for Python 2.7.15

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

Vibhuti: Hi! Would you mind to describe your environment? What is your 
operating system (name, version)? Are you running test_gdb as root or as your 
normal user? How did you install Python?

Note: I recently backported python-gdb.py a few enhancements from master to 
2.7: commit e36f94f204f3257a206a7766464a94230337fd18.

--
nosy: +vstinner

___
Python tracker 

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



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-21 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_multiprocessing_spawn leaks 5 handles -> 
test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() 
leaks 5 handles on Windows

___
Python tracker 

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



[issue33929] test_multiprocessing_spawn leaks 5 handles

2018-06-21 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +davin, pitrou

___
Python tracker 

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



[issue32555] Encoding issues with the locale encoding

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

freebsd$ LC_ALL=fr_FR.ISO8859-1 ./python -c 'import locale, os; 
locale.setlocale(locale.LC_ALL, ""); print(ascii(os.strerror(2)))'
'Fichier ou r\xe9pertoire inexistant'

I ran manually this test on FreeBSD: it pass on Python 3.6, 3.7 and master. I 
close the issue.


> Another issue: _Py_DecodeUTF8Ex() creates surrogate pairs with 16-bit wchar_t 
> (on Windows), whereas input bytes should be escaped. I'm quite sure that it's 
> a bug.

I created bpo-33928 for that one.

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



[issue33929] test_multiprocessing_spawn leaks 5 handles

2018-06-21 Thread STINNER Victor


New submission from STINNER Victor :

The following test leaks 5 open handles when checking for leaks using my PR 
7827:

test.test_multiprocessing_spawn.WithProcessesTestProcess.test_many_processes

Command to reproduce the leak (using my PR 7827):

python -m test -R 3:3 test_multiprocessing_spawn -m 
test.test_multiprocessing_spawn.WithProcessesTestProcess.test_many_processes

--
components: Library (Lib)
messages: 320160
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_multiprocessing_spawn leaks 5 handles
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



[issue33928] _Py_DecodeUTF8Ex() creates surrogate pairs on Windows

2018-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

Extract of _Py_DecodeUTF8Ex() code, there is an explicit "write a surrogate 
pair" comment:

#if SIZEOF_WCHAR_T == 4
ch = ucs4lib_utf8_decode(, e, (Py_UCS4 *)unicode, );
#else
ch = ucs2lib_utf8_decode(, e, (Py_UCS2 *)unicode, );
#endif
if (ch > 0xFF) {
#if SIZEOF_WCHAR_T == 4
Py_UNREACHABLE();
#else
assert(ch > 0x && ch <= MAX_UNICODE);
/* write a surrogate pair */
unicode[outpos++] = (wchar_t)Py_UNICODE_HIGH_SURROGATE(ch);
unicode[outpos++] = (wchar_t)Py_UNICODE_LOW_SURROGATE(ch);
#endif
}

--

___
Python tracker 

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



[issue33921] Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs

2018-06-21 Thread Ammar Askar


Ammar Askar  added the comment:

It's kinda mentioned:

"For IPv4 addresses, two special forms are accepted instead of a host address: 
the empty string represents INADDR_ANY"

Though it could be more explicit on what means since binding to all interfaces 
is a common use case.

--
nosy: +ammar2

___
Python tracker 

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



[issue33928] _Py_DecodeUTF8Ex() creates surrogate pairs on Windows

2018-06-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Could you show an example please?

--

___
Python tracker 

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



  1   2   >