[issue28183] Clean up and speed up dict iteration

2016-09-18 Thread Xiang Zhang
Xiang Zhang added the comment: Serhiy: Patch LGTM except two trivial comments on Rietveld. Raymond: With such implementation keys, values and hashes are all organized together and there seems no _resize operation can only adjust hashes without breaking the entire layout. --

[issue28194] Clean up some checks in dict implementation

2016-09-18 Thread Xiang Zhang
New submission from Xiang Zhang: The proposed patch cleans up some unnecessary parts in dict implementation especially NULL checks in lookup functions. There are four states a DictKeyEntry can be. Only in unused(empty) and dummy states me_key can be NULL. So NULL checks in used and pending

Re: how to automate java application in window using python

2016-09-18 Thread Lawrence D’Oliveiro
On Sunday, September 18, 2016 at 9:25:53 PM UTC+12, Paul Rubin wrote: > > Lawrence D’Oliveiro writes: > >>> The term "automation" is frequently used in the Windows world to mean >>> programming something that you would otherwise do manually through a GUI... >> >> Which is not something that GUIs

[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

2016-09-18 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___

[issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0

2016-09-18 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___

[issue28075] os.stat fails when access is denied

2016-09-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 20c4ad866620 by Berker Peksag in branch '3.5': Issue #28075: Fix test_access_denied in Python 3.5 https://hg.python.org/cpython/rev/20c4ad866620 -- ___ Python tracker

Re: How to convert 'ö' to 'oe' or 'o' (or other similar things) in a string?

2016-09-18 Thread Martin Schöön
Den 2016-09-17 skrev Marko Rauhamaa : > Martin Schöön : >> Related anecdote from Phoenix AZ. By now you have noticed my family >> name: Schöön. On airline tickets and boarding passes in the U.S. it >> gets spelled Schoeoen. > > Do Swedes do that German

[issue28196] ssl.match_hostname() should check for SRV-ID and URI-ID

2016-09-18 Thread Christian Heimes
New submission from Christian Heimes: The ssl.match_hostname() function does not conform to RFC 6125 because it can fall back to Subject CN when a cert has no dNSName SAN (subject alternative name) but a SRVName otherName SAN or URI SAN. --- https://tools.ietf.org/search/rfc6125#section-6.4.4

[issue28196] ssl.match_hostname() should check for SRV-ID and URI-ID

2016-09-18 Thread Christian Heimes
Changes by Christian Heimes : -- dependencies: +Support RFC4985 SRVName in SAN name ___ Python tracker ___

Re: Functions Of Functions Returning Functions

2016-09-18 Thread Steve D'Aprano
On Sun, 18 Sep 2016 08:28 pm, Lawrence D’Oliveiro wrote: > This shows the power of functions as first-class objects. The concept > is older than object orientation, and is often left out of > object-oriented languages. I think Python benefits from the fact that > it had functions before it had

[issue26661] python fails to locate system libffi

2016-09-18 Thread Christian Heimes
Christian Heimes added the comment: This affects Python 3.7 because our own copy of libffi was removed from 'default'. -- assignee: -> christian.heimes nosy: +christian.heimes priority: normal -> high versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7

[issue28185] Tabs in C source code

2016-09-18 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___

Re: how to automate java application in window using python

2016-09-18 Thread Steve D'Aprano
On Sun, 18 Sep 2016 08:42 pm, Paul Rubin wrote: > Lawrence D’Oliveiro writes: >>> lot of ways: OLE and COM objects back in the day, .NET currently, >> None of the different ways of which are either a) compatible or b) >> widely supported. Particularly not in Java, as the

[issue26610] test_venv.test_with_pip() fails when ctypes is missing

2016-09-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 82bd70f83796 by Berker Peksag in branch '3.5': Issue #26610: Skip test_with_pip if _ctypes is not available in OpenIndiana https://hg.python.org/cpython/rev/82bd70f83796 -- ___ Python tracker

[issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build

2016-09-18 Thread Vinay Sajip
Vinay Sajip added the comment: Updated patch to cover tests, and changed the implementation slightly. Tests pass on Linux and Windows (I'm not able to build on OS X). The patch is against the default branch but the diff should apply equally well to 3.6. -- Added file:

Re: How to convert 'ö' to 'oe' or 'o' (or other similar things) in a string?

2016-09-18 Thread Terry Reedy
On 9/18/2016 2:45 AM, Steven D'Aprano wrote: It doesn't matter whether you call them "accent" like most people do, or "diacritics" as linguists do. I am a native born American and I have never before heard or seen non-accent diacritic marks called 'accents'. Accents indicate stress. Other

[issue28151] testPythonOrg() of test_robotparser fails on validating python.org HTTPS certificate

2016-09-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 83bca958adc9 by Berker Peksag in branch '3.6': Issue #28151: Use pythontest.net in test_robotparser https://hg.python.org/cpython/rev/83bca958adc9 New changeset 4bfd91a45c81 by Berker Peksag in branch 'default': Issue #28151: Merge from 3.6

Re: how to automate java application in window using python

2016-09-18 Thread Paul Rubin
Lawrence D’Oliveiro writes: >> The term "automation" is frequently used in the Windows world to mean >> programming something that you would otherwise do manually through a GUI... > Which is not something that GUIs are designed for. Therefore it is at > best an unreliable

[issue28184] Trailing whitespace in C source code

2016-09-18 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___

Re: How to convert 'ö' to 'oe' or 'o' (or other similar things) in a string?

2016-09-18 Thread Christian Gollwitzer
Am 17.09.16 um 23:19 schrieb Thomas 'PointedEars' Lahn: Peng Yu wrote: Hi, I want to convert strings in which the characters with accents should be converted to the ones without accents. Why? […] ./main.py Förstemann AFAIK, “ä”, “ö”, and “ü” are not accented characters in any natural

Re: Is there something similar to `set -v` of bash in python

2016-09-18 Thread Ned Batchelder
On Saturday, September 17, 2016 at 11:09:04 PM UTC-4, Peng Yu wrote: > The manual says the following. > > "The trace function is invoked (with event set to 'call') whenever a > new local scope is entered; it should return a reference to a local > trace function to be used that scope, or None if

[issue26661] python fails to locate system libffi

2016-09-18 Thread Christian Heimes
Christian Heimes added the comment: Thanks Robert, I have been running into the same issue for a while. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue26661] python fails to locate system libffi

2016-09-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset c4cec8f7c727 by Christian Heimes in branch '3.5': Issue #26661: setup.py now detects system libffi with multiarch wrapper. https://hg.python.org/cpython/rev/c4cec8f7c727 New changeset 18825546acbc by Christian Heimes in branch '3.6': Issue #26661:

[issue10109] itertools.product with infinite iterator cause MemoryError.

2016-09-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Recipes for handling an infinite first iterator for product, or an infinite iterator for combinations (they could be similar), that use and build on the current functions, without the output order constraint, might be candidates for the recipe section. I

Re: how to automate java application in window using python

2016-09-18 Thread Matt Wheeler
On Thu, 15 Sep 2016, 08:12 meInvent bbird, wrote: > how to automate java application in window using python > > 1. scroll up or down of scroll bar > 2. click button > 3. type text in textbox > I would recommend having a look at pywinauto

Re: how to automate java application in window using python

2016-09-18 Thread Paul Rubin
Lawrence D’Oliveiro writes: >> lot of ways: OLE and COM objects back in the day, .NET currently, > None of the different ways of which are either a) compatible or b) > widely supported. Particularly not in Java, as the OP was asking. I'm quite sure there are Java bindings

Re: how to automate java application in window using python

2016-09-18 Thread Christian Gollwitzer
Am 18.09.16 um 12:26 schrieb Lawrence D’Oliveiro: On Sunday, September 18, 2016 at 10:13:41 PM UTC+12, Christian Gollwitzer wrote: Am 18.09.16 um 12:03 schrieb Lawrence D’Oliveiro: Like I said, trying to automate a GUI is a waste of time. GUIs are designed for humans, not computers, to use.

[issue28151] testPythonOrg() of test_robotparser fails on validating python.org HTTPS certificate

2016-09-18 Thread Berker Peksag
Berker Peksag added the comment: test_robotparser is now green. I've opened issue 28195 for test_huntrleaks_fd_leak. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27961] remove support for platforms without "long long"

2016-09-18 Thread Stefan Behnel
Stefan Behnel added the comment: Removing HAVE_LONG_LONG entirely causes breakage of third party code that uses this macro to enable PY_LONG_LONG support. Could you please always define it instead of removing it? -- nosy: +scoder ___ Python tracker

[issue28176] Fix callbacks race in asyncio.SelectorLoop.sock_connect

2016-09-18 Thread Berker Peksag
Berker Peksag added the comment: For some reason, some tests fail randomly on FreeBSD buildbots. See also issue27784. I'm planning to apply the attached patch. -- keywords: +patch nosy: +koobs Added file: http://bugs.python.org/file44736/issue28176_skip_tests.diff

Serialising an 8x8x8 array of pygame sounds

2016-09-18 Thread kerbingamer376
Is it possible to serialise an 8x8x8 array of pygame.mixer.Sound objects, so they stay at the same places in the array, but in a format that can be pickled, and then the opposite (read from that back to pygame.mixer.Sound objects)? Thanks (copied from stackoverflow question @

[issue28183] Clean up and speed up dict iteration

2016-09-18 Thread INADA Naoki
INADA Naoki added the comment: LGTM, thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28195] test_huntrleaks_fd_leak fails on Windows

2016-09-18 Thread Berker Peksag
Berker Peksag added the comment: It looks like http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/11581 is first time that the test was failed. Revisions (without documentation changes) in that build: * 378e000a68785fdb3d74b3a930bc4ac5f6a04ce5 *

Re: how to automate java application in window using python

2016-09-18 Thread Christian Gollwitzer
Am 18.09.16 um 12:03 schrieb Lawrence D’Oliveiro: Like I said, trying to automate a GUI is a waste of time. GUIs are designed for humans, not computers, to use. You don't always have a choice. Consider batch-processing a number of images (say, 30,000 movie frames) using a proprietary effect

Functions Of Functions Returning Functions

2016-09-18 Thread Lawrence D’Oliveiro
The less code you have to write, the better. Less code means less maintenance, and fewer opportunities for bugs. Here is an example of how I was able to knock a few hundred lines off the size of a Python module. When I was writing my Python wrapper for HarfBuzz ,

Re: how to automate java application in window using python

2016-09-18 Thread Lawrence D’Oliveiro
On Sunday, September 18, 2016 at 10:13:41 PM UTC+12, Christian Gollwitzer wrote: > > Am 18.09.16 um 12:03 schrieb Lawrence D’Oliveiro: > >> Like I said, trying to automate a GUI is a waste of time. GUIs are >> designed for humans, not computers, to use. > > You don't always have a choice.

[issue28115] Use argparse for the zipfile module

2016-09-18 Thread SilentGhost
SilentGhost added the comment: Given that at present zipfile CLI has no test or docs, and along with Guido's aversion for such tools in general, I'm not at all sure they should be added. In any case, here is the patch for the main part of conversion. -- keywords: +patch stage: needs

[issue28134] socket.socket(fileno=fd) does not work as documented

2016-09-18 Thread Christian Heimes
Christian Heimes added the comment: I'm well aware that it does not work in all cases. However it works good enough in most cases. Right now the fileno argument must be considered broken because it leads to wrong results. It is a problem and possible security issue for a couple of use cases,

[issue28195] test_huntrleaks_fd_leak fails on Windows

2016-09-18 Thread Berker Peksag
New submission from Berker Peksag: >From >http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/11654/steps/test/logs/stdio == FAIL: test_huntrleaks_fd_leak (test.test_regrtest.ArgsTestCase)

Re: Is there something similar to `set -v` of bash in python

2016-09-18 Thread Peng Yu
On Sunday, September 18, 2016, Ned Batchelder wrote: > On Saturday, September 17, 2016 at 11:09:04 PM UTC-4, Peng Yu wrote: > > The manual says the following. > > > > "The trace function is invoked (with event set to 'call') whenever a > > new local scope is entered; it

Re: Serialising an 8x8x8 array of pygame sounds

2016-09-18 Thread Steve D'Aprano
On Sun, 18 Sep 2016 11:20 pm, kerbingamer376 wrote: > Is it possible to serialise an 8x8x8 array of pygame.mixer.Sound objects, > so they stay at the same places in the array, but in a format that can be > pickled, and then the opposite (read from that back to pygame.mixer.Sound > objects)? Can

Re: how to automate java application in window using python

2016-09-18 Thread Chris Angelico
On Sun, Sep 18, 2016 at 8:03 PM, Lawrence D’Oliveiro wrote: > Like I said, trying to automate a GUI is a waste of time. GUIs are designed > for humans, not computers, to use. Okay, then. Come up with a way to end-to-end-test a GUI application without some form of GUI

[issue28183] Clean up and speed up dict iteration

2016-09-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Raymond: With such implementation keys, values and hashes are all > organized together and there seems no _resize operation can only > adjust hashes without breaking the entire layout. None of those needs to change during a resize. Only indices array

[issue25400] robotparser doesn't return crawl delay for default entry

2016-09-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset d5d910cfd288 by Berker Peksag in branch '3.6': Issue #25400: RobotFileParser now correctly returns default values for crawl_delay and request_rate https://hg.python.org/cpython/rev/d5d910cfd288 New changeset 911070065e38 by Berker Peksag in branch

Re: Serialising an 8x8x8 array of pygame sounds

2016-09-18 Thread kerbingamer376
On Sunday, September 18, 2016 at 2:59:10 PM UTC+1, Steve D'Aprano wrote: > On Sun, 18 Sep 2016 11:20 pm, kerbingamer376 wrote: > > > Is it possible to serialise an 8x8x8 array of pygame.mixer.Sound objects, > > so they stay at the same places in the array, but in a format that can be > > pickled,

[issue28194] Clean up some checks in dict implementation

2016-09-18 Thread Xiang Zhang
Xiang Zhang added the comment: Apply methane's comment, preserving the comment. -- Added file: http://bugs.python.org/file44738/dict_clean_up_v2.patch ___ Python tracker

[issue25400] robotparser doesn't return crawl delay for default entry

2016-09-18 Thread Berker Peksag
Berker Peksag added the comment: Here's an updated patch. -- versions: +Python 3.7 Added file: http://bugs.python.org/file44739/issue25400_v2.diff ___ Python tracker

[issue28183] Clean up and speed up dict iteration

2016-09-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka versions: -Python 3.6 ___ Python tracker ___

Re: How to convert 'ö' to 'oe' or 'o' (or other si =?utf-8?Q?milar_things)_in_a_string??=

2016-09-18 Thread Thorsten Kampe
* Terry Reedy (Sun, 18 Sep 2016 03:51:40 -0400) > > On 9/18/2016 2:45 AM, Steven D'Aprano wrote: > > > It doesn't matter whether you call them "accent" like most people do, or > > "diacritics" as linguists do. > > I am a native born American and I have never before heard or seen > non-accent

[issue28115] Use argparse for the zipfile module

2016-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: They should be added. Otherwise we can't know that the code works as expected. You can use test_calendar.py or test_tarfile.py as a guide. -- ___ Python tracker

[issue28194] Clean up some checks in dict implementation

2016-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM if address methane's comment. -- ___ Python tracker ___ ___

Re: Serialising an 8x8x8 array of pygame sounds

2016-09-18 Thread Peter Otten
kerbingamer376 wrote: > On Sunday, September 18, 2016 at 2:59:10 PM UTC+1, Steve D'Aprano wrote: >> On Sun, 18 Sep 2016 11:20 pm, kerbingamer376 wrote: >> >> > Is it possible to serialise an 8x8x8 array of pygame.mixer.Sound >> > objects, so they stay at the same places in the array, but in a

[issue28182] Expose OpenSSL verification results in SSLError

2016-09-18 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Here's a quick try. I didn't add tests and update docs as it's my first serious patch to CPython and I'm not sure whether my approach is OK or not. -- keywords: +patch Added file: http://bugs.python.org/file44741/expose-x509-verify-result.patch

[issue28183] Clean up and speed up dict iteration

2016-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually most of optimization is not specific for new dict implementation. -- ___ Python tracker ___

[issue28182] Expose OpenSSL verification results in SSLError

2016-09-18 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: That looks much better. I should have create a subclass of SSLError. Here's a minor concern: fill_and_set_sslerror adds a new argument for verification errors. If someone else wants to support more errors, this function would have more arguments, which sounds

Re: Is there something similar to `set -v` of bash in python

2016-09-18 Thread Ned Batchelder
On Sunday, September 18, 2016 at 8:29:38 AM UTC-4, Peng Yu wrote: > On Sunday, September 18, 2016, Ned Batchelder wrote: > > > On Saturday, September 17, 2016 at 11:09:04 PM UTC-4, Peng Yu wrote: > > > The manual says the following. > > > > > > "The trace function is

[issue28147] Unbounded memory growth resizing split-table dicts

2016-09-18 Thread Xiang Zhang
Xiang Zhang added the comment: LGTM. But why this change? -#define ESTIMATE_SIZE(n) (((n)*3) >> 1) +#define ESTIMATE_SIZE(n) (((n)*3+1) >> 1) -- ___ Python tracker

Re: how to automate java application in window using python

2016-09-18 Thread Paul Rubin
Steve D'Aprano writes: >> Automation doesn't simulate button presses > Rather than saying that it *doesn't*, it might be better to say that it > doesn't *necessarily* simulate button presses. I'm no Windoze guru but I always understood Automation (sometimes written

[issue28147] Unbounded memory growth resizing split-table dicts

2016-09-18 Thread INADA Naoki
INADA Naoki added the comment: xiang: dictresize(d, n) may choose keysize==n (when n == 2**m) with this patch. If there are any integer a such as ESTIMATE_SIZE(a) == n and n == 2**m and USABLE_FRACTION(n) == a - 1, a items cannot be inserted into dict after dictresize(d, ESTIMATE_SIZE(a))

[issue28183] Clean up and speed up dict iteration

2016-09-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: We can still clean this up for Python 3.6. We're in feature freeze, not development freeze. The compact dict patch was very rough when it landed and is expected to continue to be polished so that the expected benefits are realized. -- versions:

[issue25400] robotparser doesn't return crawl delay for default entry

2016-09-18 Thread Berker Peksag
Changes by Berker Peksag : Added file: http://bugs.python.org/file44740/issue25400_v3.diff ___ Python tracker ___

[issue25400] robotparser doesn't return crawl delay for default entry

2016-09-18 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28115] Use argparse for the zipfile module

2016-09-18 Thread SilentGhost
SilentGhost added the comment: Neither of those fit under definition of "permissible" modules. So, I would then suggest to close this issue and any further issues against CLI of those modules. -- ___ Python tracker

[issue24363] httplib fails to handle semivalid HTTP headers

2016-09-18 Thread R. David Murray
R. David Murray added the comment: I will try to review this in the not too distant future. You can ping me if I don't get to it by next Saturday. I think I'll probably prefer to call the flag something like _greedy_header_parsing, to reflect a change from assuming we've got body on a

[issue28182] Expose OpenSSL verification results in SSLError

2016-09-18 Thread Christian Heimes
Christian Heimes added the comment: Good work! I completely forgot that the SSL object holds the last verification error in its struct. This allows the ssl module to print some information when cert verification fails. It's still not perfect, because it is missing information about the the

[issue27806] 2.7 32-bit builds fail on macOS 10.12 Sierra due to dependency on deleted header file QuickTime/QuickTime.h

2016-09-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset a8771f230c06 by Ned Deily in branch '2.7': Issue #27806: add Aleks to Misc/ACKS. https://hg.python.org/cpython/rev/a8771f230c06 -- ___ Python tracker

Re: How to convert 'ö' to 'oe' or 'o' (or other similar things) in a string?

2016-09-18 Thread Steven D'Aprano
On Sunday 18 September 2016 15:59, Thorsten Kampe wrote: > * Martin Schöön (17 Sep 2016 20:20:12 GMT) >> >> Den 2016-09-17 skrev Kouli : >> > Hello, try the Unidecode module - https://pypi.python.org/pypi/Unidecode. >> > >> > Kouli >> > >> > On Sat, Sep 17, 2016 at 6:12 PM, Peng Yu

Re: How to convert 'ö' to 'oe' or 'o' (or other similar things) in a string?

2016-09-18 Thread Steven D'Aprano
On Sunday 18 September 2016 13:30, Peng Yu wrote: > On Sat, Sep 17, 2016 at 3:20 PM, Martin Schöön > wrote: >> Den 2016-09-17 skrev Kouli : >>> Hello, try the Unidecode module - https://pypi.python.org/pypi/Unidecode. > > I don't find a way to make it print

[issue28143] ASDL compatibility with Python 3 system interpreter

2016-09-18 Thread Malthe Borch
Malthe Borch added the comment: I forgot to add "from __future__ import print_function" to the beginning of "asdl.py" and "spark.py". It should then work on Python 2. That is, with the imported print-function, the incompatibilities that Martin pointed out are no longer there. As for Windows,

Re: How to convert 'ö' to 'oe' or 'o' (or other si =?utf-8?Q?milar_things)_in_a_string??=

2016-09-18 Thread Thorsten Kampe
* Martin Schöön (17 Sep 2016 20:20:12 GMT) > > Den 2016-09-17 skrev Kouli : > > Hello, try the Unidecode module - https://pypi.python.org/pypi/Unidecode. > > > > Kouli > > > > On Sat, Sep 17, 2016 at 6:12 PM, Peng Yu wrote: > >> Hi, I want to convert strings in

Re: how to automate java application in window using python

2016-09-18 Thread Steven D'Aprano
On Sunday 18 September 2016 14:53, Lawrence D’Oliveiro wrote: > On Sunday, September 18, 2016 at 4:11:49 PM UTC+12, Gregory Ewing wrote: >> The term "automation" is frequently used in the Windows world to mean >> programming something that you would otherwise do manually through a GUI... > >

Re: how to automate java application in window using python

2016-09-18 Thread Michael Torrie
On 09/18/2016 04:03 AM, Lawrence D’Oliveiro wrote: > Like I said, trying to automate a GUI is a waste of time. GUIs are > designed for humans, not computers, to use. Well then we have a huge problem. Especially for users who are visually-impaired. Fortunately almost all GUIs (Windows, Linux, and

[issue23591] enum: Add Flags and IntFlags

2016-09-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset b56290a80ff7 by Ethan Furman in branch '3.6': issue23591: fix flag decomposition and repr https://hg.python.org/cpython/rev/b56290a80ff7 New changeset 7372c042e9a1 by Ethan Furman in branch 'default': issue23591: fix flag decomposition and repr

Re: how to automate java application in window using python

2016-09-18 Thread Lawrence D’Oliveiro
On Monday, September 19, 2016 at 2:12:14 AM UTC+12, Chris Angelico wrote: > > On Sun, Sep 18, 2016 at 8:03 PM, Lawrence D’Oliveiro wrote: > >> Like I said, trying to automate a GUI is a waste of time. GUIs are designed >> for humans, not computers, to use. > > Okay, then. Come up with a way to

[issue28183] Clean up and speed up dict iteration

2016-09-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Here is a rough (very rough and not compileable) sketch of the direction that resizing should take: static void insert_indices_clean(PyDictObject *mp, Py_hash_t hash) { size_t i, perturb; PyDictKeysObject *k = mp->ma_keys; size_t mask =

[issue28193] Consider using lru_cache for the re.py caches

2016-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, raising an exception with a result as a payload is one option. Other option is to check a result. Something like: def _compile_is_valid(value): p, loc = value return loc is None or loc == _locale.setlocale(_locale.LC_CTYPE) def

[issue28198] heap-buffer-overflow in tok_nextc (Parser/tokenizer.c:954)

2016-09-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue28200] Windows: path_converter() leaks memory for Unicode filenames

2016-09-18 Thread STINNER Victor
New submission from STINNER Victor: Memory leak spotted by the issue #28195: path_converter() calls PyUnicode_AsWideCharString() which allocates a new buffer at each call, but this buffer is never released. On Python 3.5, PyUnicode_AsWideCharString() was used which handles internally the

[issue28200] Windows: path_converter() leaks memory for Unicode filenames

2016-09-18 Thread STINNER Victor
STINNER Victor added the comment: I didn't push the fix myself, because Steve Dower maybe made the change for a specific reason? -- ___ Python tracker

[issue28195] test_huntrleaks_fd_leak fails on Windows

2016-09-18 Thread STINNER Victor
STINNER Victor added the comment: Ah, I found a leak: see issue #28200. -- ___ Python tracker ___ ___

Re: how to automate java application in window using python

2016-09-18 Thread Ned Batchelder
On Sunday, September 18, 2016 at 6:45:32 PM UTC-4, Lawrence D’Oliveiro wrote: > A CLI gives the user power over the computer. While a GUI is a great way to > give the computer, and proprietary software companies, power over the user. This is completely beside the point of the original question.

Re: How to convert 'ö' to 'oe' or 'o' (or other similar things) in a string?

2016-09-18 Thread Marko Rauhamaa
Thorsten Kampe : > * Terry Reedy (Sun, 18 Sep 2016 03:51:40 -0400) >> On 9/18/2016 2:45 AM, Steven D'Aprano wrote: >> > It doesn't matter whether you call them "accent" like most people do, or >> > "diacritics" as linguists do. >> >> I am a native born American and I

[issue27961] remove support for platforms without "long long"

2016-09-18 Thread STINNER Victor
STINNER Victor added the comment: It seems fair to keep the define for backwrad compatibility. -- ___ Python tracker ___

[issue28183] Clean up and speed up dict iteration

2016-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Raymond, I think this is different issue. -- ___ Python tracker ___ ___

[issue28193] Consider using lru_cache for the re.py caches

2016-09-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think I'll just take the low hanging fruit in _compile_repl and call it a day. -- ___ Python tracker ___

[issue28197] range.index mismatch with documentation

2016-09-18 Thread Vedran Čačić
New submission from Vedran Čačić: Look at this: >>> from collections.abc import Sequence >>> help(Sequence.index) index(self, value, start=0, stop=None) S.index(value, [start, [stop]]) -> integer -- return first index of value. Raises ValueError if the value is not

[issue28193] Consider using lru_cache for the re.py caches

2016-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: lru_cache can be used for re._compile() if add the ability to bypass the cache and to validate cached value. -- ___ Python tracker

[issue28193] Consider using lru_cache for the re.py caches

2016-09-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Yes, I saw that. If a function could raise a NoCache exception, re._compile() could take advantage of it. But I don't feel good about going down that path (adding coupling between the caching decorator and the cached function). It would be better to

[issue28182] Expose OpenSSL verification results in SSLError

2016-09-18 Thread Christian Heimes
Christian Heimes added the comment: You don't have to be concerned about additional arguments. fill_and_set_sslerror() is an internal helper function. In fact it's a helper function for two other helper functions. Let's postpone the discussion until the argument sizes grows out of proportion.

Re: how to automate java application in window using python

2016-09-18 Thread Lawrence D’Oliveiro
On Sunday, September 18, 2016 at 11:02:57 PM UTC+12, Christian Gollwitzer wrote: > > Am 18.09.16 um 12:26 schrieb Lawrence D’Oliveiro: > >> Considering the power available in Free Software toolkits like >> ImageMagick, G’MIC and so on, not to mention libraries accessible >> from Python itself, let

Re: how to automate java application in window using python

2016-09-18 Thread Michael Torrie
On 09/18/2016 02:22 PM, Lawrence D’Oliveiro wrote: > I know one blind computer user who is quite capable with the command > line, and who has little fondness for GUI apps. You should see how > quickly he works... Good for him. This is very good that there are tools like that that he and many

[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2016-09-18 Thread Robert Jordens
Robert Jordens added the comment: It is still in cpython master e6e9ddd. import asyncio import socket sock = socket.socket(family=socket.AF_BLUETOOTH, type=socket.SOCK_STREAM, proto=socket.BTPROTO_RFCOMM) sock.setblocking(False) addr =

[issue28198] heap-buffer-overflow in tok_nextc (Parser/tokenizer.c:954)

2016-09-18 Thread geeknik
New submission from geeknik: As per the security team, I'm submitting this here as it doesn't appear exploitable. Fuzzing Python 2.7.12 with AFL, ASAN and libdislocator.so on Debian 8.5 x64. (This might also affect Python 3.5) The attached 1-byte testcase triggers a heap-buffer-overflow:

[issue28195] test_huntrleaks_fd_leak fails on Windows

2016-09-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 91285b24f1c2 by Victor Stinner in branch '3.6': Fix test_huntrleaks_fd_leak() of test_regrtest https://hg.python.org/cpython/rev/91285b24f1c2 -- nosy: +python-dev ___ Python tracker

[issue28199] Compact dict resizing is doing too much work

2016-09-18 Thread Raymond Hettinger
New submission from Raymond Hettinger: The dictresize() method unnecessarily copies the keys, values, and hashes as well as making insertions in the index table. Only the latter step is necessary or desirable. Here in the pure Python code for resizing taking from the original

Re: how to automate java application in window using python

2016-09-18 Thread Lawrence D’Oliveiro
On Monday, September 19, 2016 at 8:00:43 AM UTC+12, Michael Torrie wrote: > > On 09/18/2016 04:03 AM, Lawrence D’Oliveiro wrote: > >> Like I said, trying to automate a GUI is a waste of time. GUIs are >> designed for humans, not computers, to use. > > Well then we have a huge problem. Especially

[issue28151] testPythonOrg() of test_robotparser fails on validating python.org HTTPS certificate

2016-09-18 Thread STINNER Victor
STINNER Victor added the comment: Thank you Berker! I'm quite sure that the issue is very old, like 1 year old or more. And this fix is welcomed! -- ___ Python tracker

[issue28183] Clean up and speed up dict iteration

2016-09-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Moved dictresize() discussion to http://bugs.python.org/issue28199 -- ___ Python tracker ___

[issue28195] test_huntrleaks_fd_leak fails on Windows

2016-09-18 Thread STINNER Victor
STINNER Victor added the comment: I modified the test_regrtest unit test because the test is too fragile, it expects a line on a specific line number. But there is still a real memory leak detected by this unit test. -- ___ Python tracker

[issue28199] Compact dict resizing is doing too much work

2016-09-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Just before the re-insertion, we should also do a compaction-in-place for the keys/values/hashes array if it has a significant number of holes for previously deleted entries. -- ___ Python tracker

  1   2   >