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

2018-08-13 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the suggestions! I've updated PR 8740. I will submit separate PRs to fix os.readlink() documentation in 3.6 and 3.7 branches. -- ___ Python tracker

[issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty

2018-08-13 Thread Dan Snider
New submission from Dan Snider : The ones I know of are list.__getitem__, dict __contains__ & __getitem__, and (frozen)set.__contains__ but from what I can tell so far it seems like dict.__getitem__ takes the worst hit. For dicts, I've spent a few hours trying to figure out what's getting

[issue34356] Add support for args and kwargs in logging.conf

2018-08-13 Thread Xavier Hardy
Change by Xavier Hardy : -- keywords: +patch pull_requests: +8234 stage: -> patch review ___ Python tracker ___ ___

[issue34397] remove redundant overflow checks in tuple and list implementations

2018-08-13 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- keywords: +patch pull_requests: +8233 stage: -> patch review ___ Python tracker ___ ___

[issue34395] memory leaks in error handling in csv and pickle modules

2018-08-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Hi and thank you for the report. Could you elaborate a bit more on how/where the leak happens? This will help when reviewing the Pull Request. Thanks! -- nosy: +pablogsal ___ Python tracker

[issue34397] remove redundant overflow checks in tuple and list implementations

2018-08-13 Thread Sergey Fedoseev
New submission from Sergey Fedoseev : Max size of list and tuples is limited by PY_SSIZE_T_MAX / sizeof(PyObject*), so the sum of any two list/tuples sizes always <= PY_SSIZE_T_MAX if sizeof(PyObject*) > 1, which seems true for all supported (existing?) platforms. It means that overflow

[issue33262] Deprecate shlex.split(None) to read from stdin.

2018-08-13 Thread Niklas Rosenstein
Niklas Rosenstein added the comment: I've just run into this as well -- I thought it was a bug until I found this issue. I also think that this is anything from sane. -- nosy: +n_rosenstein ___ Python tracker

[issue34394] Descriptors HowTo doesn't mention __set_name__

2018-08-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks. I'm already working on this. -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___

[issue34397] remove redundant overflow checks in tuple and list implementations

2018-08-13 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +mark.dickinson, serhiy.storchaka, tim.peters ___ Python tracker ___ ___ Python-bugs-list

[issue34117] Rename "generator expressions" to "generator comprehensions"

2018-08-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: Results from two Python courses: * In terms of teaching gexexps, there was no net gain or loss. When genexps are show side-by-side with list/dict/set comps the symmetric relationship was obvious regardless of terminology. * In terms of being able to

[issue34387] Deletion of attributes in dataclass is buggy

2018-08-13 Thread Brett Cannon
Brett Cannon added the comment: I agree with Eric that without concrete details I suspect everything is working as expected. E.g. ```python class Foo: attr = -13 ins = Foo() ins.attr = 42 print(ins.attr) del ins.attr print(ins.attr) ``` -- nosy: +brett.cannon title: Deletion of

[issue27186] add os.fspath()

2018-08-13 Thread Erik Janssens
Erik Janssens added the comment: thank you for the info ... I'll have a look at making the posix module easier to port ... -- ___ Python tracker ___

[issue34390] arparse.ArgumentParser misparses list arguments followed by undefined arguments

2018-08-13 Thread paul j3
paul j3 added the comment: Duplicate of https://bugs.python.org/issue22909 [argparse] Using parse_known_args, unknown arg with space in value is interpreted as first positional arg (closed as duplicate) https://bugs.python.org/issue22433 Argparse considers unknown optional arguments with

[issue34356] Add support for args and kwargs in logging.conf

2018-08-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Adding Vinay for his thoughts on this. Also Python 3.4 and 3.5 are in security fixes only mode and can be removed. Thanks -- nosy: +vinay.sajip, xtreak ___ Python tracker

[issue34270] Add names to asyncio tasks

2018-08-13 Thread Benjamin Peterson
Change by Benjamin Peterson : -- pull_requests: +8235 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34270] Add names to asyncio tasks

2018-08-13 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset aa4e4a40db531f7095513a4b0aa6510f18162a07 by Benjamin Peterson in branch 'master': Make regular expressions in test_tasks.py raw strings. (GH-8759) https://github.com/python/cpython/commit/aa4e4a40db531f7095513a4b0aa6510f18162a07 --

[issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty

2018-08-13 Thread Benjamin Peterson
Benjamin Peterson added the comment: Amusingly, this is because of an old hack to make directly calling somedict.__getitem__ fast: https://github.com/python/cpython/commit/8f5cdaa784f555149adf5e94fd2e989f99d6b1db Reverting the dictobject.c changes of the commit, i.e., the following patch,

[issue30400] Race condition in shutil.copyfile(): source file replaced file during copy

2018-08-13 Thread Preston Moore
Preston Moore added the comment: Hello everyone, I've just updated my pull request to include an additional test so everything should be in shape testing wise. Once I get confirmation that this strategy is acceptable and/or this PR is merged I will get to work addressing the other

[issue34357] situation where urllib3 works, but urllib does not work

2018-08-13 Thread Martin Panter
Change by Martin Panter : -- superseder: -> Cannot override 'connection: close' in urllib2 headers ___ Python tracker ___ ___

[issue30563] [Cygwin] multiprocessing module with pool object issue

2018-08-13 Thread Niels Kristian Jensen
Niels Kristian Jensen added the comment: I ran the same test on Windows 10, works fine, but Windows Server 2012 bails out with no message, no abnormal exit code. @Antoine Pitrou - if Cygwin and Python3 are non-compatible, I suggest that someone in the Python3 community writes a note about

[issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly

2018-08-13 Thread Joshua Kinard
Joshua Kinard added the comment: I was able to modify eryksun's patch for Python-2.7.15, at least the bulk of it. It looks like the '_PyOS_SigintEvent' function is new to the 3.x branch, and despite it being a fairly simple function, it's used in a few core Python modules. So I'm not sure

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

2018-08-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Currently the behavior doesn't match the documentation. Initially I thought that this can be solved by adding the support of path-like objects and backporting this up to 3.6. But os.readlink() on Windows doesn't not support also bytes paths, and never

[issue34392] Add sys.isinterned()

2018-08-13 Thread Christian Heimes
Christian Heimes added the comment: I'd prefer to have this as an internal API, either sys._isinterned() or as a helper method in testcapi. -- nosy: +christian.heimes ___ Python tracker

[issue34392] Add sys.isinterned()

2018-08-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +8231 stage: -> patch review ___ Python tracker ___ ___

[issue34393] json.dumps - allow compression

2018-08-13 Thread liad
New submission from liad : The list of arguments of json.dump() can be seen here: https://docs.python.org/2/library/json.html Notice that there is no way to make compression. For example pandas allows you to do: df.to_csv(path_or_buf=file_name, index=False, encoding='utf-8',

[issue34393] json.dumps - allow compression

2018-08-13 Thread rushter
rushter added the comment: You can use the gzip module. with gzip.GzipFile('products.json', 'w') as outfile: outfile.write(json.dumps(data, outfile, sort_keys=True)) -- nosy: +rushter ___ Python tracker

[issue34392] Add sys.isinterned()

2018-08-13 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : I need to test whether the string is interned for Python implementations of marshal.dumps(). It is easy to do in C, and I suggest to expose this functionality to Python. Currently you can test if the string is interned using the following function:

[issue34117] Rename "generator expressions" to "generator comprehensions"

2018-08-13 Thread Shiva Saxena
Shiva Saxena added the comment: I am interested to work on this issue. It would be my first contribution in cpython. Should I go ahead? -- nosy: +GeekyShacklebolt ___ Python tracker

[issue30563] [Cygwin] multiprocessing module with pool object issue

2018-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > In fact, the Python package should probably be removed from Cygwin? We don't maintain Cygwin nor Python on Cygwin here. You should contact those people. -- ___ Python tracker

[issue34391] test_ftplib is failing with TLS 1.3

2018-08-13 Thread Christian Heimes
New submission from Christian Heimes : Related to #32947 Four ftplib tests are failing with OpenSSL 1.1.1-pre8 and TLS 1.3 enabled. All failing tests use a separate data connection and transfer data on the server. For store operations, the client never calls recv(). This breaks bidirectional

[issue34386] Expose a dictionary of interned strings in sys module

2018-08-13 Thread Ronald Oussoren
Ronald Oussoren added the comment: IMHO we shouldn't expose the intern dictionary without there being a clear, and good enough, use case for doing so. Exposing the dictionary decreases implementation flexibility, and increases requirements on other implementations. One example of the

[issue34386] Expose a dictionary of interned strings in sys module

2018-08-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Ronald. Using a dict instance is an implementation detail. CPython could use a dict, a set, a hashtable implementation from Modules/hashtable.c, or the HAMT implementation from Python/hamt.c. Other Python implementations can have other

[issue1529353] Squeezer - squeeze large output in the interpreter

2018-08-13 Thread Tal Einat
Tal Einat added the comment: I'm back to working on this. I've made good progress: I'm nearly done with all of the changes suggested here and ready for another PR review. I'd like some opinions on a few things: 1. Should the tooltip-related configuration options be removed? There is one

[issue34357] situation where urllib3 works, but urllib does not work

2018-08-13 Thread Martin Panter
Martin Panter added the comment: I can’t get it to hang. Does your computer or Internet provider have a proxy or firewall that may be interfering? Perhaps it is worth comparing the HTTP header fields being sent and received. You can enable debug messages to see the request sent, and print

[issue34394] Descriptors HowTo doesn't mention __set_name__

2018-08-13 Thread Semyon
New submission from Semyon : There is a great HowTo document for descriptors https://github.com/python/cpython/blob/master/Doc/howto/descriptor.rst But it doesn't even mention the __set_name__ method which was added in py3. And it lists the descriptor protocol without that method as if it is

[issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits

2018-08-13 Thread Jim Jewett
Jim Jewett added the comment: My current UI shows this as relevant *only* to 3.4 and 3.5. If it really has been fixed in 3.6, and the fix can't be backported, I think the risk of breaking backup programs is enough to argue for doing nothing more than a doc change. Anyone still using 3.4

[issue34357] situation where urllib3 works, but urllib does not work

2018-08-13 Thread David
David added the comment: Hi Martin. It's definitely something with my internet connection. Yesterday I temporarily changed the way I connect to the internet to use the mobile connection from my cell phone instead of my WiFi connection, and things started working. I also debugged the

[issue34357] situation where urllib3 works, but urllib does not work

2018-08-13 Thread David
David added the comment: martin.parter, it worked! Thanks so much, I was going nuts I also read the issue you pointed to, very interesting. Even if all servers should just work here, it does not seem to be the case in real life (I guess it's something easy to misconfigure) so I agree

[issue15100] Race conditions in shutil.copy, shutil.copy2 and shutil.copyfile

2018-08-13 Thread Jim Jewett
Jim Jewett added the comment: (Note: I am talking only about the disclosure issue; file corruption would ideally be fixed as far back as possible, though I would be somewhat sympathetic to a "nah, that ain't security, too late" argument.) My current UI shows this as relevant to every

[issue16038] ftplib: unlimited readline() from connection

2018-08-13 Thread Jeff Dafoe
Jeff Dafoe added the comment: I have a question about this old patch, as it just came down in a CentOS 6 update. I think the patch is applied to the data channel in ASCII mode and not just the control channel. On the data channel in ASCII mode, there should be no assumption of maximum line

[issue34393] json.dumps - allow compression

2018-08-13 Thread liad
liad added the comment: The gzip module may work for saving file localy but for example: This upload json to Google Storage: import datalab.storage as storage storage.Bucket('mybucket').item(path).write_to(json.dumps(response), 'application/json') Your won't work here unless I save the

[issue19050] [Python 2, Windows] fflush called on pointer to potentially closed file

2018-08-13 Thread Steve Dower
Steve Dower added the comment: As this is a fail-fast and not an uncontrolled crash, I vote to close as wontfix. This only applies to security-fix versions, and it is not exploitable. -- ___ Python tracker

[issue19050] [Python 2, Windows] fflush called on pointer to potentially closed file

2018-08-13 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2018-08-13 Thread Steve Dower
Steve Dower added the comment: Serhiy is exactly right, but to emphasise, the best way to do paths now is to use argument clinic with its path_t type. On Windows, .narrow is a flag that indicates whether you should PyUnicode_FSEncode() any results before returning them, and .wide is always

[issue34395] memory leaks in error handling in csv and pickle modules

2018-08-13 Thread Sergey Fedoseev
New submission from Sergey Fedoseev : There are memory leaks in csv and pickle modules caused by incautious usage of PyMem_Resize(). See GitHub PR. -- components: Extension Modules messages: 323487 nosy: sir-sigurd priority: normal severity: normal status: open title: memory leaks in

[issue34395] memory leaks in error handling in csv and pickle modules

2018-08-13 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- keywords: +patch pull_requests: +8232 stage: -> patch review ___ Python tracker ___ ___

[issue34390] arparse.ArgumentParser misparses list arguments followed by undefined arguments

2018-08-13 Thread paul j3
paul j3 added the comment: Parsing is a two step process. First the strings are passed through def _parse_optional(self, arg_string): which classifies them as 'O', an optional flag, or 'A', an argument. - no prefix char => A - the string is in the dictionary of option_strings (e.g.