[issue29533] urllib2 works slowly with proxy on windows

2017-04-17 Thread Marc Schlaich
Marc Schlaich added the comment: Julia, could you please add other major browsers/HTTP clients (Firefox, Chrome, curl, ...) to your comparison (compare_ie_urllib.txt). I would expect that Python/urllib is the only implementation doing DNS requests for proxy bypass handling. Please note that c

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-04-17 Thread larsonreever
larsonreever added the comment: Otherwise, py8601 (https://bitbucket.org/micktwomey/pyiso8601/) looks pretty popular and well maintained (various committers, started in 2012, last commit in 2016). I don't think that we should add the iso8601 module to the stdlib, but merge iso8601 "features"

[issue12414] getsizeof() on code objects is wrong

2017-04-17 Thread Dong-hee Na
Dong-hee Na added the comment: I am a newcomer who is interesting with contributing CPython project. This issue could be the first challenging issue for me. It looks like we need to multiply the number of co_extra and return the result. This approach is right and can I proceed this issue? -

[issue29428] Doctest documentation unclear about multi-line fixtures

2017-04-17 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: Bump. Could I get a few more eyes looking at the current state of https://github.com/python/cpython/pull/45/ ? * @bitdancer made some suggestions. I accepted some, and replied to others where I think we should keep looking for common ground. I'd like to see rep

[issue30031] Improve queens demo (use argparse and singular form)

2017-04-17 Thread Louie Lu
Louie Lu added the comment: Pavlo, you are right, making the argument have backward compatible is good. String quote I'll prefer `'` more than `"`. -- ___ Python tracker ___ ___

[issue30049] Don't cache tp_iternext

2017-04-17 Thread Josh Rosenberg
Josh Rosenberg added the comment: I'm having a hard time thinking of legitimate cases where replacing __next__ mid-iteration is a thing. Doing so retroactively on the class (so it changes all outstanding iterators, no matter what state they're in) seems dubious at best, and it wouldn't be thre

[issue30040] new empty dict can be more small

2017-04-17 Thread Josh Rosenberg
Josh Rosenberg added the comment: For the record, legitimate case when many empty dicts are created, and few are populated, is the collections-free approach to defaultdict(dict): mydict.setdefault(key1, {})[key2] = val For, say, 100 unique key1s, and 10,000 total key1/key2 pairs, you'd cre

[issue29950] Rename SlotWrapperType to WrapperDescriptorType

2017-04-17 Thread Dong-hee Na
Dong-hee Na added the comment: I am a newcomer who is interesting with contributing CPython project. This issue looks easy to solve. Can I proceed this issue? -- nosy: +corona10 ___ Python tracker _

[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows

2017-04-17 Thread Eryk Sun
Eryk Sun added the comment: Hiding the console is required often enough that a keyword-only parameter for this would be useful. Other platforms could simply ignore it, in contrast to writing platform-dependent code that passes startupinfo. Note that this option would also hide the window of GU

[issue30031] Improve queens demo (use argparse and singular form)

2017-04-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please focus on the task at hand and don't worry about PEP-8ing the existing code. -- nosy: +rhettinger ___ Python tracker ___ _

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Jon Dufresne
Jon Dufresne added the comment: Understood. Thanks for the response. I'll have to keep this in mind as I debug these warnings in the future. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is how Python works. This can't be changed without changing the compiler, the format of .pyc files (for saving warnings) and importing system. And this may slow down normal compilation due to generating warnings for saving them in .pyc files. I don't th

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread R. David Murray
R. David Murray added the comment: Right. Which is why you get an error if you try to use an empty directory as if it was a maildir :) create=True creates the *directory* and initializes it. That seems clear to me, and exactly what I would expect. "The mailbox" is the directory. If it alr

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread Sviatoslav Sydorenko
Sviatoslav Sydorenko added the comment: > create a Maildir folder in a temporary directory: > > with tempfile.TemporaryDirectory() as tmpdir: > with mailbox.Maildir(os.path.join(tmpdir, 'mail'), create=True) as > box: > ... Yeah, I came up with the same solution. It jus

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Jon Dufresne
Jon Dufresne added the comment: I see. I think if the goal is for developers to see and fix these DeprecationWarnings, it would help if the warnings were reproducible without taking steps different from normal Python development. TBH, this is the first time I've ever used the -B CLI argument.

[issue29514] Add a test case that prevents magic number changes in minor releases

2017-04-17 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset d6d344d8330a5975fc102e8f275d47044294f1d1 by Łukasz Langa (Eric Appelt) in branch 'master': bpo-29514: Check magic number for bugfix release (#54) https://github.com/python/cpython/commit/d6d344d8330a5975fc102e8f275d47044294f1d1 -- ___

[issue30090] Failed to build these modules: _ctypes

2017-04-17 Thread Eric V. Smith
Changes by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-b

[issue30090] Failed to build these modules: _ctypes

2017-04-17 Thread Emmanuel Arias
Emmanuel Arias added the comment: The problem was solution making: apt-get install libffi-dev Thanks -- ___ Python tracker ___ _

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This warning is emitted by the compiler when it compiles string literals with invalid escape sequences. Once the source is compiled to the bytecode and saved to the .pyc file the compiler no longer involved. You can disable writing compiled bytecode by calli

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Jon Dufresne
New submission from Jon Dufresne: After upgrading to Python 3.6, I'm working towards cleaning up "DeprecationWarning: invalid escape sequence". I've noticed that the Deprecation warning only appears on the first run. It looks like once the code is compiled to `__pycache__`, the deprecation war

[issue30031] Improve queens demo (use argparse and singular form)

2017-04-17 Thread Pavlo Kapyshin
Pavlo Kapyshin added the comment: Louie Lu, thank you for the review. Different quotes were already used in file, so someone should decide which ones must be used: single or double. Regarding the -n option, I tried to be backwards compatible. Again, a decision is needed. The only place where I

[issue30090] Failed to build these modules: _ctypes

2017-04-17 Thread Louie Lu
Changes by Louie Lu : -- components: +Build -Interpreter Core type: compile error -> ___ Python tracker ___ ___ Python-bugs-list mail

[issue30090] Failed to build these modules: _ctypes

2017-04-17 Thread Louie Lu
Louie Lu added the comment: Are you using Ubuntu or other Linux distribution? This problem is because you didn't install the dependency package. You may first try to use the instruction at devguide: http://cpython-devguide.readthedocs.io/setup.html#build-dependencies Or, assume you have instal

[issue29041] Reference leaks on Windows

2017-04-17 Thread Zachary Ware
Zachary Ware added the comment: Here's an updated refleak run, on master as of last Thursday: test_atexit leaked [12, 12, 12] references, sum=36 test_atexit leaked [4, 6, 6] memory blocks, sum=16 test_capi leaked [6, 6, 6] references, sum=18 test_capi leaked [2, 4, 4] memory blocks, sum=10 test_

[issue30031] Improve queens demo (use argparse and singular form)

2017-04-17 Thread Louie Lu
Louie Lu added the comment: I make some review at GitHub. Do David and Terry suggest to also fix the problem about PEP8 coding style, since this demo have many places didn't fit PEP8. -- nosy: +louielu ___ Python tracker

[issue30090] Failed to build these modules: _ctypes

2017-04-17 Thread Emmanuel Arias
New submission from Emmanuel Arias: Hello everybody, I am working with the code. I clone the repo, and make a pull upstream of github's cpython repository (master branch), and when I make: ./configure --with-pydebug && make -j build correctly but finished with this message: Failed

[issue29738] Fix memory leak in SSLSocket.getpeercert()

2017-04-17 Thread Olivier Vielpeau
Olivier Vielpeau added the comment: Thnaks for the reviews and the merge! :) -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue30089] Automatic Unload of Dynamic Library Cause Segfault

2017-04-17 Thread Chinh Nguyen
New submission from Chinh Nguyen: I'm using ctypes to access the PAM library to change a user's password. That is, using the function pam_chauthtok. This is occurring inside a python celery worker in FreeBSD. This will work the first time, the second time generates a segfault and crashes the w

[issue30051] Document that the random module doesn't support fork

2017-04-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: > os.fork() documentation contains a warning that refers to ssl > documentation where the use of OpenSSL’s internal random number > generator in forked processes is documented more detailed. > I think the same should be added for the random module. +1 It is

[issue23174] shelve.open fails with error "anydbm.error: db type could not be determined"

2017-04-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Serhiy] > Current error message looks good to me and I don't see how > it can be enhanced. I concur with Serhiy and David. -- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed ___

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with David. Rather than using a temporary directory as a Maildir folder: with tempfile.TemporaryDirectory() as tmpdir: with mailbox.Maildir(tmpdir, create=True) as box: ... create a Maildir folder in a temporary directory:

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread R. David Murray
R. David Murray added the comment: Just create a subdirectory inside the tempdir to hold your Maildir folder. I think it is not worth complicating the API for this use case, since it does have a simple solution. -- versions: -Python 2.7, Python 3.5, Python 3.6 __

[issue30087] pdb issue with type conversion

2017-04-17 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue30061] Check if PyObject_Size() raised an error

2017-04-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1294 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30076] Opcode names BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK_WITH_CALL are too long

2017-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I like the names BUILD_VAR_POSITIONAL and BUILD_VAR_KEYWORD. The downside is that this breaks relations between them and very similar opcodes BUILD_TUPLE_UNPACK and BUILD_MAP_UNPACK. The only differences between BUILD_*_UNPACK and BUILD_*_UNPACK_WITH_CALL op

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread Louie Lu
Louie Lu added the comment: I think this patch make the behavior changed. Documentation wrote that: "If create is True, the mailbox is created if it does not exist.", the current version did that exactly, it won't create subdir (tmp, new, and cur) when dir exists. The situation face here is t

[issue30076] Opcode names BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK_WITH_CALL are too long

2017-04-17 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue30040] new empty dict can be more small

2017-04-17 Thread Louie Lu
Louie Lu added the comment: I'm testing[1] that if we make a fast path that detect if keys is `empty_keys_struct` inside `dictresize`. It can be faster than original patch, but still slower than default (unpatch) in most case. ➜ cpython git:(compact_empty_dict) ✗ ./python.default -m perf com

[issue30087] pdb issue with type conversion

2017-04-17 Thread Christoph Zimmermann
Christoph Zimmermann added the comment: Thanks for the hint! -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +email nosy: +barry, r.david.murray stage: -> patch review versions: -Python 3.3, Python 3.4 ___ Python tracker ___ ___

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread Sviatoslav Sydorenko
New submission from Sviatoslav Sydorenko: Hi, I've faced an issue w/ `mailbox.Maildir()`. The case is following: 1. I create a folder with `tempfile.TemporaryDirectory()`, so it's empty 2. I pass that folder path as an argument when instantiating `mailbox.Maildir()` 3. Then I receive an exceptio

[issue30051] Document that the random module doesn't support fork

2017-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: os.fork() documentation contains a warning that refers to ssl documentation where the use of OpenSSL’s internal random number generator in forked processes is documented more detailed. I think the same should be added for the random module. --