[issue35126] Mistake in FAQ about converting number to string.

2019-02-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This is a good first issue. Python 3 docs uses `{:.3f}".format(1.0/3.0)` that was changed as part of 04d8a245f162b33e6c861ba0869918d9262be63e. Python 2 docs could be changed too to use floats that makes the example correct. -- nosy: +Mariat

[issue34817] Ellipsis docs has extra dot in the markdown that makes it look like .... (four dots)

2019-02-17 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-17 Thread Davin Potts
Davin Potts added the comment: > I think we need the "create with exclusive behavior" option, even > though we don't know how to implement it on Windows right now. A fix to avoid the potential race condition on Windows is now part of GH-11816. > To support 1 & 2, we could just have 'create'.

[issue35904] Add statistics.fmean(seq)

2019-02-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Yes please! I'm happy with the name fmean Okay, the PR is ready. -- ___ Python tracker ___

[issue36012] Investigate slow writes to class variables

2019-02-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Wow, I didn't expect to get an immediate win this of this magnitude :-) -- ___ Python tracker ___

[issue36012] Investigate slow writes to class variables

2019-02-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This are the timings that I am measuring with PR 11907: Variable and attribute read access: 5.7 ns read_local 5.9 ns read_nonlocal 16.2 ns read_global 24.5 ns read_builtin 20.9 ns read_classvar_from_class 20.0

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-17 Thread Raymond Hettinger
Change by Raymond Hettinger : Added file: https://bugs.python.org/file48148/gauss_demo.py ___ Python tracker ___ ___ Python-bugs-list mailin

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-17 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +mark.dickinson, tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue36019] test_urllib fail in s390x buildbots

2019-02-17 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : test_urllib fail in s390x buildbots. It does not seem like a temporary failure as they keep failing consistently. Some failed builds: https://buildbot.python.org/all/#builders/126/builds/1010 https://buildbot.python.org/all/#builders/122/builds/1026

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-17 Thread Raymond Hettinger
New submission from Raymond Hettinger : Attached is a class that I've found useful for doing practical statistics work with normal distributions. It provides a nice, high-level API that makes short-work of everyday statistical problems. -- Examples # Simple scaling and translat

[issue35992] Metaclasses interfere with __class_getitem__

2019-02-17 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue35992] Metaclasses interfere with __class_getitem__

2019-02-17 Thread miss-islington
miss-islington added the comment: New changeset a7f929db605326da452fbdeebfe341afa9316d25 by Miss Islington (bot) in branch '3.7': bpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857) https://github.com/python/cpython/commit/a7f929db605326da452fbdeebfe341afa9316d25 --

[issue35992] Metaclasses interfere with __class_getitem__

2019-02-17 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset ac28147e78c45a6217d348ce90ca5281d91f676f by Ivan Levkivskyi in branch 'master': bpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857) https://github.com/python/cpython/commit/ac28147e78c45a6217d348ce90ca5281d91f676f ---

[issue35992] Metaclasses interfere with __class_getitem__

2019-02-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +11936 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-17 Thread Neil Schemenauer
Neil Schemenauer added the comment: Some thoughts on this API. I think we need the "create with exclusive behavior" option, even though we don't know how to implement it on Windows right now. To me, there are two cases when calling SharedMemory: 1) You want to create a new shared memory ob

[issue36017] test_grp

2019-02-17 Thread Mathijs Brands
New submission from Mathijs Brands : # Choose a non-existent gid. fakegid = 4127 while fakegid in bygids: fakegid = (fakegid * 3) % 0x1 self.assertRaises(KeyError, grp.getgrgid, fakegid) When a Linux system is configured to use LDAP for user and group in

[issue36017] test_grp

2019-02-17 Thread Mathijs Brands
Change by Mathijs Brands : -- components: Tests nosy: mjbrands priority: normal severity: normal status: open title: test_grp type: behavior versions: Python 3.7 ___ Python tracker ___

[issue36016] Allow gc.getobjects to return the objects tracked by a specific generation

2019-02-17 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue36016] Allow gc.getobjects to return the objects tracked by a specific generation

2019-02-17 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +nascheme ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue36016] Allow gc.getobjects to return the objects tracked by a specific generation

2019-02-17 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : gc.get_objects() return all the objects tracked by the garbage collector. This is useful, but right now there is no way of knowing in which generation each object is currently on. This information can be beneficial to understand better the state of

[issue36016] Allow gc.getobjects to return the objects tracked by a specific generation

2019-02-17 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +11935 stage: -> patch review ___ Python tracker ___ ___ Pytho

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-02-17 Thread jt
jt added the comment: > alternatively, you could perform an unattended installation: I know, I already listed the downsides above. (Basically outside of a container it's a bad way to do things because it has too many side effects, and it likes to break when interrupted after which you will n

[issue35892] Fix awkwardness of statistics.mode() for multimodal datasets

2019-02-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: The attraction to having a first_tie=False flag is that it is backwards compatible with the current API. However on further reflection, people would almost never want the existing behavior of raising an exception rather than returning a useful result. So

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-17 Thread Riccardo Magliocchetti
Change by Riccardo Magliocchetti : -- keywords: +patch pull_requests: +11933 stage: -> patch review ___ Python tracker ___ ___ Pyth

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-17 Thread Riccardo Magliocchetti
New submission from Riccardo Magliocchetti : When debugging uwsgi logging issues with python3.7 i got this on python 3.7.2: Traceback (most recent call last): File "/usr/lib/python3.7/logging/__init__.py", line 269, in _after_at_fork_weak_calls _at_fork_weak_calls('release') File "/usr/

[issue17561] Add socket.bind_socket() convenience function

2019-02-17 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue36004] Add datetime.fromisocalendar

2019-02-17 Thread Paul Ganssle
Paul Ganssle added the comment: The attached PR is more or less fully ready, I think the correct answers to 1, 3 and 4 are that we should go with 3 separate arguments and we should not allow either time components or tz components, at least in this version. In the future, I don't think it wi

[issue20116] urlparse.parse_qs should take argument for query separator

2019-02-17 Thread nr
nr added the comment: W3C allows both constructs, ampersand and semicolon. https://www.w3.org/TR/html401/appendix/notes.html#h-B.2.2 Especially servlet containers and servers running CGI programs often use semicolons as a separator. I would say to parse either ampersands OR semicolons and ke

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-02-17 Thread Paul Moore
Paul Moore added the comment: On Sun, 17 Feb 2019 at 14:12, jt wrote: > subprocess.CalledProcessError: Command > '['C:\\myproject\\tools\\windows\\.python-win\\spen-venv\\Scripts\\pip', > 'install', '--upgrade', 'pip']' returned non-zero exit status 1. > C:\myproject> > > I would expect that

[issue35153] Allow to set headers in xmlrpc.client.ServerProxy

2019-02-17 Thread Cédric Krier
Cédric Krier added the comment: I have another use case to be able to set headers to xmlrpc: http://www.roundup-tracker.org/docs/xmlrpc.html#advanced-python-client-adding-anti-csrf-headers -- ___ Python tracker

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-02-17 Thread Christian Korneck
Christian Korneck added the comment: for Python 2.7 you can extract the MSI installer (much like a zip file): mkdir "c:\targetdir" msiexec /a "c:\python-2.7.8.amd64.msi" /quiet /norestart TARGETDIR=c:\targetdir msiexec is part of all Windows editions (except for nanoserver). Side note: extrac

[issue5038] urrlib2/httplib doesn't reset file position between requests

2019-02-17 Thread nr
nr added the comment: the pull request now passed the build checks, please review the code. -- ___ Python tracker ___ ___ Python-bug

[issue34148] Fatal read error on socket transport

2019-02-17 Thread yjq
yjq added the comment: Other people also found this in a year. And asvetlov already pull requests. But no one cares about this at all! https://community.home-assistant.io/t/announcement-appdaemon-3-0/47394/56 https://github.com/aio-libs/aiokafka/issues/344 https://github.com/conjure-up/conjur

[issue36012] Investigate slow writes to class variables

2019-02-17 Thread Stefan Behnel
Stefan Behnel added the comment: It turns out that "update_slot()" is always called, even when we are not updating a slot name (which is always a special dunder-name). The linear search for names in "update_slots()" is a huge waste of time here, and short-circuiting out of it when the name d

[issue36012] Investigate slow writes to class variables

2019-02-17 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +11932 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue35852] Fixed tests regenerating using CRLF when running it on Windows

2019-02-17 Thread Addons Zz
Change by Addons Zz : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-02-17 Thread jt
jt added the comment: Okay there is one issue that looks like it might be venv related, which is that upgrading pip itself doesn't seem to work for some reason (while installing other packages in the venv worked fine): Could not install packages due to an EnvironmentError: [WinError 5] Acces

[issue35884] Add variable access benchmark to Tools/Scripts

2019-02-17 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +11931 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue33944] Deprecate and remove pth files

2019-02-17 Thread Cheryl Sabella
Cheryl Sabella added the comment: Hello all, There was a lot of traction on this discussion a month ago and I was wondering if any updates/expectations should be set? Specifically: 1. There is a PR for a doc change that Terry approved, but wanted another core dev to look at. If there is

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-02-17 Thread jt
jt added the comment: Ok, so I just tested this by 1. Installing Python 3.7.2 with the regular installer 2. Copying out "Lib\venv" and "Lib\ensurepip" into another folder 3. Uninstalling Python 3.7.2 (there is now no user-available install of Python on this system) 4. Installing Python via Nu

[issue34720] Fix test_importlib.test_bad_traverse for AIX

2019-02-17 Thread miss-islington
miss-islington added the comment: New changeset 1bf8845f74013c5f1cc5f49a11e52c652a1fb9dd by Miss Islington (bot) (Michael Felt) in branch 'master': bpo-34720: Fix test_importlib.test_bad_traverse for AIX (GH-9391) https://github.com/python/cpython/commit/1bf8845f74013c5f1cc5f49a11e52c652a1fb9

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

2019-02-17 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: @eryksun > 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. I agree. FWIW, I faced the same issue on pyftpdlib and ended

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

2019-02-17 Thread gary ruben
gary ruben added the comment: I wanted to add a datapoint to this. I also experience this problem in Windows but not with Google Drive File Stream. In my case it is also being triggered by Jupyter, which was where Deniz first noticed it, but I was saving the notebook to my Z: drive, which is

[issue35951] os.renames() creates directories if original name doesn't exist

2019-02-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are possible race conditions. Other process can create the same target directory (if it does not exist yet) by calling os.makedirs() for example. It will be impolite to remove the directory just after the second process checked that it exists (or eve

[issue20116] urlparse.parse_qs should take argument for query separator

2019-02-17 Thread Kobi Gana
Kobi Gana added the comment: Hi all, Please take the next case: The url - http://hostname.domain/mypage.asp?fields=id&query=%22((release%3D{id%3D1004});(sprint%3D{id%3D1040});(team%3D{id%3D1004});(severity%3D{id%3D%27list_node.severity.urgent%27});!phase%3D{id+IN+%27phase.defect.closed%27,%27

[issue5038] urrlib2/httplib doesn't reset file position between requests

2019-02-17 Thread nr
nr added the comment: I will fix the build errors first. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue35852] Fixed tests regenerating using CRLF when running it on Windows

2019-02-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 11697 keeps existing CRLFs in unmodified part, by writes bare LFs for auto-generated part. The result can contain mixed newlines. The current code looks correct to me. Just git should be configured to convert LF to platform specific newlines in source f

[issue35773] test_bdb fails on AIX bot (regression)

2019-02-17 Thread Michael Felt
Michael Felt added the comment: Some record keeping - to keep track of when this regression first appeared on the bot: buildername POWER6 AIX 3.x Builder buildnumber 718 Build codebaseBuild event pushChange github_distinct trueChange got_revisiona37f

[issue35892] Fix awkwardness of statistics.mode() for multimodal datasets

2019-02-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Did I miss something? Yes. It doesn't really matter which mode is returned as long as it is deterministically chosen. We're proposing to return the first mode rather than the smallest mode. Scipy returns the smallest mode because that is convenient

[issue35999] multpirocessing.Process alive after SIGTERM on parent

2019-02-17 Thread SilentGhost
Change by SilentGhost : -- nosy: +davin, pitrou type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue36001] LIBFFI_INCLUDEDIR is not detected when set into a profile nor in ./configure LIBFFI_INCLUDEDIR="path/to/libffi/include"

2019-02-17 Thread SilentGhost
Change by SilentGhost : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue36012] Investigate slow writes to class variables

2019-02-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: > can you include your python 2.7 runs? for me it looks similar It will give similar results unless you switch to old-style classes (edit out the inheritance from object). class A: pass A.x = 1 --- $ p

[issue35688] "pip install --user numpy" fails on Python from the Windows Store

2019-02-17 Thread mattip
mattip added the comment: I think the original problem we had with the AddDllDirectory approach was that once set, it seems to mitigate searching the os.environ['PATH'] for dll loading. Is that accurate? Would RemoveDllDirectory restore the ability to find DLLs along the system PATH? > This

[issue35951] os.renames() creates directories if original name doesn't exist

2019-02-17 Thread Chris Jerdonek
Chris Jerdonek added the comment: > And since it seems that it can not be solved completely, You may be right only to document, but you didn't note any problems with the possibility I suggested. A cleanup pruning step could be done on failure that is similar to the cleanup pruning step on su

[issue5038] urrlib2/httplib doesn't reset file position between requests

2019-02-17 Thread nr
nr added the comment: I added a new pull request. Martin, you are right I realized when looking through the code that just setting the file pointer to zero inside http lib might interfere with requests that don't have authentication enabled. The new pull requests does number 2.) of your sugg