[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 01885f78b299 by Martin Panter in branch '2.7': Issue #26439: Document that RTLD_NOW is always added https://hg.python.org/cpython/rev/01885f78b299 New changeset 0db4403e62c4 by Martin Panter in branch '3.5': Issue #26439: Document that RTLD_NOW is

[issue28207] Use pkg-config to find dependencies

2016-09-26 Thread Kubilay Kocak
Kubilay Kocak added the comment: This (adding support for pkg-config) should be done in tandem with adding --with-foo-{include,library} arguments for each *external* dependency, which can be used for: libffi, readline, libintl, openssl, sqlite, db*, among others. Values obtained from

Re: Nested for loops and print statements

2016-09-26 Thread Gregory Ewing
Cai Gengyang wrote: I'll still be asking for help here. Please help out a newbie. We're trying to help, but we need to know more about the environment you're using to enter your code. What operating system are you using? How are you running the interactive interpreter? Are you using IDLE, or

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch LGTM except tests. But we should at least document the behavior of itermonthdates(), monthdatescalendar() and yeardatescalendar() at corner cases. -- ___ Python tracker

[issue28207] Use pkg-config to find dependencies

2016-09-26 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Yes pkg-config is not ubiquitous. My idea is using it as a fallback, so that non-standard paths can be picked up easily. > Note the bootstrap issue with that idea though; you'll need to make sure > _posixsubprocess is built before importing subprocess.

[issue18844] allow weights in random.choice

2016-09-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: ### # Flipping a biased coin from collections import Counter from random import choices print(Counter(choices(range(2), [0.9, 0.1], k=1000)))

[issue18844] allow weights in random.choice

2016-09-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Equidistributed examples: choices(c.execute('SELECT name FROM Employees').fetchall(), k=20) choices(['hearts', 'diamonds', 'spades', 'clubs'], k=5) choices(list(product(card_facevalues, suits)), k=5) Weighted selection examples:

[issue18844] allow weights in random.choice

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 39a4be5e003d by Raymond Hettinger in branch '3.6': Issue #18844: Make the number of selections a keyword-only argument for random.choices(). https://hg.python.org/cpython/rev/39a4be5e003d -- ___ Python

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Xiang Zhang
Xiang Zhang added the comment: Patch LGTM. > I would rather not mess up with itermonthdates(), particularly in a bugfix > release. We can postpone the discussion of a better way to handle date > over/underflow in itermonthdates() until 3.7. Before finally find a better way, can we at least

event loop vs threads

2016-09-26 Thread srinivas devaki
how does Python switch execution and maintain context i.e function stack etc,.. for co-routines and why is it less costly than switching threads which almost do the same, and both are handled by Python Interpreter itself(event loop for co-routines and GIL scheduling for threading), so where does

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2016-09-26 Thread Bert JW Regeer
Bert JW Regeer added the comment: Updated versions this applies to. -- versions: +Python 3.3, Python 3.4, Python 3.6, Python 3.7 ___ Python tracker ___

Re: How to make a foreign function run as fast as possible in Windows?

2016-09-26 Thread eryk sun
On Tue, Sep 27, 2016 at 1:48 AM, wrote: > This function is in a DLL. It's small but may run for days before complete. I > want it > takes 100% core usage. Threading seems not a good idea for it shares the core > with others. Will the multiprocessing module do it? The

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2016-09-26 Thread Bert JW Regeer
Changes by Bert JW Regeer : -- nosy: +berker.peksag ___ Python tracker ___ ___

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2016-09-26 Thread Bert JW Regeer
Bert JW Regeer added the comment: On line #890 in self.make_file() the check for _binary_file should be changed to also check for self.length >= 0. https://github.com/python/cpython/blob/3.4/Lib/cgi.py#L890 becomes: if self._binary_file or self.length >= 0: _binary_file is only ever set if

[issue27308] Inconsistency in cgi.FieldStorage() causes unicode/byte TypeError.

2016-09-26 Thread Bert JW Regeer
Bert JW Regeer added the comment: This is not a duplicate of https://bugs.python.org/issue24764 -- nosy: +X-Istence ___ Python tracker ___

[issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist

2016-09-26 Thread Martin Panter
Martin Panter added the comment: The purpose of the test seems to be to check that finding and loading works for widely-available libraries. However I suspect find_library("c") can fail on other platforms as well. Presumably that is why there is the special case for Cygwin at the top of the

How to make a foreign function run as fast as possible in Windows?

2016-09-26 Thread jfong
This function is in a DLL. It's small but may run for days before complete. I want it takes 100% core usage. Threading seems not a good idea for it shares the core with others. Will the multiprocessing module do it? Any suggestion? Thanks ahead. --Jach --

Re: xlsxwriter considering worksheet.write as tuple ???

2016-09-26 Thread Mohan Mohta
On Monday, September 26, 2016 at 8:30:34 PM UTC-5, Nathan Ernst wrote: > There's a bug at line 362: > > sup_sheet.write=(s_count,"VM", cell_format); > ---^ > > Like I suggested, you've an errant assignment to sup_sheet.write. > > Also, a couple of notes on style: the terminating

Re: xlsxwriter considering worksheet.write as tuple ???

2016-09-26 Thread Nathan Ernst
There's a bug at line 362: sup_sheet.write=(s_count,"VM", cell_format); ---^ Like I suggested, you've an errant assignment to sup_sheet.write. Also, a couple of notes on style: the terminating semicolons in your code is unnecessary. It's only needed for multiple statements on a

[issue28282] find_library("c") defers to find_msvcrt()

2016-09-26 Thread Martin Panter
New submission from Martin Panter: Issue 1793 added ctypes.util.find_msvcrt(), and special cases that map find_library("c") and "m" to the new function. However this contradicts the documentation : ‘On Windows, . . . a

Re: xlsxwriter considering worksheet.write as tuple ???

2016-09-26 Thread Mohan Mohta
On Monday, September 26, 2016 at 8:08:13 PM UTC-5, MRAB wrote: > On 2016-09-27 01:34, Mohan Mohta wrote: > > On Monday, September 26, 2016 at 6:56:20 PM UTC-5, Nathan Ernst wrote: > >> On Mon, Sep 26, 2016 at 6:00 PM, MRAB wrote: > >> > >> > On 2016-09-26 23:03, M2

Re: xlsxwriter considering worksheet.write as tuple ???

2016-09-26 Thread MRAB
On 2016-09-27 01:34, Mohan Mohta wrote: On Monday, September 26, 2016 at 6:56:20 PM UTC-5, Nathan Ernst wrote: On Mon, Sep 26, 2016 at 6:00 PM, MRAB wrote: > On 2016-09-26 23:03, M2 wrote: > >> Hello >> The program is designed to collect different statistics from

Re: xlsxwriter considering worksheet.write as tuple ???

2016-09-26 Thread Mohan Mohta
On Monday, September 26, 2016 at 6:56:20 PM UTC-5, Nathan Ernst wrote: > On Mon, Sep 26, 2016 at 6:00 PM, MRAB wrote: > > > On 2016-09-26 23:03, M2 wrote: > > > >> Hello > >> The program is designed to collect different statistics from servers > >> across the network

Re: Nested for loops and print statements

2016-09-26 Thread breamoreboy
On Monday, September 26, 2016 at 9:57:52 PM UTC+1, Cai Gengyang wrote: > Ok it works now: > > >>>for row in range(10): > for column in range(10): >print("*",end="") > > > > >

[issue27873] multiprocessing.pool.Pool.map should take more than one iterable

2016-09-26 Thread naught101
naught101 added the comment: It would be helpful if the docs at https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.map and in `help(Pool.map)` mentioned starmap in a "see also" section at the bottom. -- nosy: +naught101

[issue28147] Unbounded memory growth resizing split-table dicts

2016-09-26 Thread INADA Naoki
Changes by INADA Naoki : -- versions: +Python 3.5 ___ Python tracker ___ ___

Re: xlsxwriter considering worksheet.write as tuple ???

2016-09-26 Thread Nathan Ernst
On Mon, Sep 26, 2016 at 6:00 PM, MRAB wrote: > On 2016-09-26 23:03, M2 wrote: > >> Hello >> The program is designed to collect different statistics from servers >> across the network and populate in excel sheet. >> Library : xlsxwriter.0.9.3 >> >> Below is the Snip of

[issue26650] calendar: OverflowErrors for year == 1 and firstweekday > 0

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: My patch for issue 28253 fixes this problem for itermonthdays2() and itermonthdays() methods. As discussed there, fixing itermonthdates() would require changing a documented public interface. -- assignee: -> belopolsky nosy: +belopolsky

Re: Socket programming

2016-09-26 Thread haaruunibrow
use > client: > server_address='192.168.2.2' server: > server_name='127.0.0.1' -- https://mail.python.org/mailman/listinfo/python-list

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue28253-4.diff is issue28253-3.diff with tests. -- Added file: http://bugs.python.org/file44837/issue28253-4.diff ___ Python tracker

Re: xlsxwriter considering worksheet.write as tuple ???

2016-09-26 Thread MRAB
On 2016-09-26 23:03, M2 wrote: Hello The program is designed to collect different statistics from servers across the network and populate in excel sheet. Library : xlsxwriter.0.9.3 Below is the Snip of code being used #! /usr/bin/python import xlsxwriter import os; import subprocess; import

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue28253-3.diff uses itertools.repeat(). -- Added file: http://bugs.python.org/file44836/issue28253-3.diff ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue28253-2.diff is a small performance improvement over issue28253.diff -- Added file: http://bugs.python.org/file44835/issue28253-2.diff ___ Python tracker

Re: Nested for loops and print statements

2016-09-26 Thread Cai Gengyang
Sure, I just sent in a subscription request to it ... but I'll still be asking for help here. Please help out a newbie. When I master this language I can help other new users too (This is good for the world and for everyone involved). Ideally, Information and education should be free and not

[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-26 Thread STINNER Victor
STINNER Victor added the comment: I dislike this change. Python is not responsible to check parameters of OS syscalls, this function should be a thin wrapper to the OS function. Linux may add new flags in the future. Le lundi 26 septembre 2016, Roundup Robot a écrit :

xlsxwriter considering worksheet.write as tuple ???

2016-09-26 Thread M2
Hello The program is designed to collect different statistics from servers across the network and populate in excel sheet. Library : xlsxwriter.0.9.3 Below is the Snip of code being used #! /usr/bin/python import xlsxwriter import os; import subprocess; import sys; import os.path;

[issue28281] Remove year limits from calendar

2016-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +doerwalter ___ Python tracker ___ ___

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2016-09-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- versions: +Python 3.7 -Python 3.5 ___ Python tracker ___

[issue27897] Avoid possible crash in pysqlite_connection_create_collation

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Thank you for your patch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27897] Avoid possible crash in pysqlite_connection_create_collation

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1aae9b7ff321 by Serhiy Storchaka in branch '2.7': Issue #27897: Backported tests. https://hg.python.org/cpython/rev/1aae9b7ff321 -- ___ Python tracker

[issue27897] Avoid possible crash in pysqlite_connection_create_collation

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset c739660489c1 by Serhiy Storchaka in branch '3.5': Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation() https://hg.python.org/cpython/rev/c739660489c1 New changeset c2eb90422aec by Serhiy Storchaka in branch '3.6': Issue

Re: Nested for loops and print statements

2016-09-26 Thread Marko Rauhamaa
Cai Gengyang : > What is a tab and what is a space in python and what's the difference > ? > > Which piece of code is indented with tabs and which one is indented > with spaces ? Key questions that Python gurus are having a hard time answering! Equally confusing, you might

Re: Nested for loops and print statements

2016-09-26 Thread Cai Gengyang
Ok it works now: >>>for row in range(10): for column in range(10): print("*",end="") but how is it different from --- >>> for row in range(10): for column in

[issue28279] setuptools failing to read from setup.cfg only in Python 3.6

2016-09-26 Thread Roy Williams
Changes by Roy Williams : -- type: -> behavior ___ Python tracker ___ ___

[issue24098] Multiple use after frees in obj2ast_* methods

2016-09-26 Thread Berker Peksag
Berker Peksag added the comment: Please note that Python/Python-ast.c is automatically generated by Parser/asdl_c.py. -- nosy: +benjamin.peterson, berker.peksag ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > unless we remove all date limits that is much harder issue I don't think this is too hard. I think the original implementation did not have date limits. I've opened a separate issue for this. See #28281. --

[issue28281] Remove year limits from calendar

2016-09-26 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: The calendar module currently relies on datetime for some calculations and is therefore restricted to years 1 through . With exception to some public methods that are documented to return datetime.date instances, this dependence on the datetime

Re: Nested for loops and print statements

2016-09-26 Thread Terry Reedy
On 9/26/2016 12:54 PM, Cai Gengyang wrote: Which piece of code is indented with tabs and which one is indented with spaces ? I told you in my initial answer, where I said, referring to the two indented lines in one 'piece of code', "These indents are 4 spaces and 1 tabs." It is the

[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset ac24e5c2fd3e by Berker Peksag in branch 'default': Issue #20100: Simplify newPyEpoll_Object() https://hg.python.org/cpython/rev/ac24e5c2fd3e -- ___ Python tracker

[issue20100] epoll docs are not clear with regards to CLOEXEC.

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

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: > Jim ask for a backport. Sorry Jim, was replying from my email client, didn't see all messages. > This is arguably a security issue because it's a DoS vector. Yeah, I can see why. I can commit this to 3.4 in a week. Christian, feel free to commit this if

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching the proposed reimplementation of itermonthdays2() and itermonthdays(). It does not use itermonthdates() and is not that complicated. It passes test_calendar, but I did not test it further than that. I would rather not mess up with

[issue27897] Avoid possible crash in pysqlite_connection_create_collation

2016-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka stage: -> patch review versions: +Python 3.7 ___ Python tracker

[issue10673] multiprocess.Process join method - timeout indistinguishable from success

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 112060f8abe8 by Berker Peksag in branch '3.5': Issue #10673: Document that Process.exitcode can be used to determine timeout https://hg.python.org/cpython/rev/112060f8abe8 New changeset 0414ce8a3b5c by Berker Peksag in branch '3.6': Issue #10673:

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-09-26 Thread Jim Fulton
Jim Fulton added the comment: This is arguably a security issue because it's a DoS vector. I don't feel strongly about it though. -- ___ Python tracker

[issue10673] multiprocess.Process join method - timeout indistinguishable from success

2016-09-26 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Tom. -- components: -Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-09-26 Thread Christian Heimes
Christian Heimes added the comment: Jim ask for a backport. In case the problem is not a security issue that needs to be backported, feel free to close the ticket. -- ___ Python tracker

[issue27914] Incorrect comment in PyModule_ExcDef

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch! -- nosy: +serhiy.storchaka resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 -Python 3.5 ___ Python tracker

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: Isn't 3.4 in security fixes only mode? -- status: pending -> open ___ Python tracker ___

[issue27914] Incorrect comment in PyModule_ExcDef

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2cf16c627c17 by Serhiy Storchaka in branch '3.6': Issue #27914: Fixed a comment in PyModule_ExcDef. https://hg.python.org/cpython/rev/2cf16c627c17 New changeset a944b08d1ac7 by Serhiy Storchaka in branch 'default': Issue #27914: Fixed a comment in

[issue18893] invalid exception handling in Lib/ctypes/macholib/dyld.py

2016-09-26 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue18893] invalid exception handling in Lib/ctypes/macholib/dyld.py

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset e9f34d382eda by Berker Peksag in branch '3.5': Issue #18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py https://hg.python.org/cpython/rev/e9f34d382eda New changeset 708337cd8e6a by Berker Peksag in branch '3.6': Issue #18893:

[issue28144] Decrease empty_keys_struct's dk_refcnt

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5d80a8e16edd by Serhiy Storchaka in branch '3.6': issue #28144: Decrease empty_keys_struct's dk_refcnt https://hg.python.org/cpython/rev/5d80a8e16edd New changeset a579a0354d85 by Serhiy Storchaka in branch 'default': issue #28144: Decrease

[issue28144] Decrease empty_keys_struct's dk_refcnt

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch Xiang Zhang! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: Nested for loops and print statements

2016-09-26 Thread Larry Hudson via Python-list
On 09/26/2016 08:25 AM, Cai Gengyang wrote: I just wanted to note that sometimes the code works, sometimes it doesn't. (even though both are exactly the same code) ... Weird , dum dum dum It is NOT weird. Python is being consistent, YOU are not. These examples are NOT "exactly the same

[issue28144] Decrease empty_keys_struct's dk_refcnt

2016-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka components: +Interpreter Core nosy: +serhiy.storchaka stage: -> patch review type: -> enhancement versions: +Python 3.6, Python 3.7 ___ Python tracker

[issue28222] test_distutils fails

2016-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Distutils nosy: +dstufft, eric.araujo stage: -> needs patch ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, the current documentation is an impossibility (unless we remove all date limits that is much harder issue). Raisin OverflowError will make the implementation of itermonthdays2() and itermonthdays() more complex. Yielding dummy instances or None

[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-09-26 Thread Christian Heimes
Changes by Christian Heimes : -- assignee: christian.heimes -> versions: -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker ___

[issue28255] TextCalendar.prweek/month/year outputs an extra whitespace character

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually the behavior of the print statement in Python 2 is more complex. "print x," doesn't output a space after x, but sets the softspace attribute of the file to true (unless x is a string ending with non-space whitespace character like \n or \t). print

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-09-26 Thread Christian Heimes
Christian Heimes added the comment: Yuri, are you going to backport the fix to 3.4? -- assignee: -> yselivanov nosy: +christian.heimes status: open -> pending versions: -Python 3.5 ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > itermonthdates() is documented public method The current documentation is an impossibility: "The iterator will yield datetime.date values and will always iterate through complete weeks, so it will yield dates outside the specified month." The current

[issue28182] Expose OpenSSL verification results in SSLError

2016-09-26 Thread Christian Heimes
Christian Heimes added the comment: For hostname verification it might be a good idea to add a replacement for ssl.CertificateError. -- ___ Python tracker

[issue27141] Fix collections.UserList shallow copy

2016-09-26 Thread Bar Harel
Bar Harel added the comment: I personally prefer the __copy__ mechanism as I think a bugfix shouldn't be 10% backwards compatible, chances of issues are low, and it's cleaner, more efficient and how things should be. -- ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Note that the stop on date.max behavior was introduced in #15421. -- ___ Python tracker ___

[issue27141] Fix collections.UserList shallow copy

2016-09-26 Thread Bar Harel
Changes by Bar Harel : Added file: http://bugs.python.org/file44833/issue27141_patch_rev1_opt2.patch ___ Python tracker ___

[issue27141] Fix collections.UserList shallow copy

2016-09-26 Thread Bar Harel
Bar Harel added the comment: Alright. 2 patches are available. opt_1 makes the use of __copy__. Advantages: - Clean - Does not affect pickling at all - More memory efficient Disadvantages: - Might be missing something from the normal copy mechanism (e.g. UserList doesn't implement

[issue28194] Clean up some checks in dict implementation

2016-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28194] Clean up some checks in dict implementation

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1d41d741bb5b by Serhiy Storchaka in branch '3.6': Issue #28194: Clean up some checks in dict implementation. https://hg.python.org/cpython/rev/1d41d741bb5b New changeset b83a70afca39 by Serhiy Storchaka in branch 'default': Issue #28194: Clean up

[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2016-09-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() can return a list or tuple (because they use PySequence_Fast). But end users of this API often work only with lists and raise an exception if corresponding mapping methods return an instance of

[issue28278] Make `weakref.WeakKeyDictionary.__repr__` meaningful

2016-09-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: Well, I could see a "friendly" repr being avoided to: 1. Save work (iterating safely involves iteration guards and explicitly acquiring strong references to every key) 2. Avoid pretending the state is stable (the repr at time X could be different at time

[issue28211] Wrong return value type in the doc of PyMapping_Keys/Values/Items

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report and patch Xiang Zhang! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker

Re: Nested for loops and print statements

2016-09-26 Thread Jussi Piitulainen
Cai Gengyang writes: > What is a tab and what is a space in python and what's the difference > ? Try print('x\tx') in Python to see a tab character between the two x's. For me it looks the same as seven spaces, for you it will also look like some amount of whitespace but it might be a different

[issue28211] Wrong return value type in the doc of PyMapping_Keys/Values/Items

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 68fc808bed9f by Serhiy Storchaka in branch '3.5': Issues #25909, #28211: Restored correct documentation of PyMapping_Items, https://hg.python.org/cpython/rev/68fc808bed9f New changeset 21336392a680 by Serhiy Storchaka in branch '3.6': Issues

[issue25909] Incorrect documentation for PyMapping_Items and like

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 68fc808bed9f by Serhiy Storchaka in branch '3.5': Issues #25909, #28211: Restored correct documentation of PyMapping_Items, https://hg.python.org/cpython/rev/68fc808bed9f New changeset 21336392a680 by Serhiy Storchaka in branch '3.6': Issues

[issue28207] Use pkg-config to find dependencies

2016-09-26 Thread Ned Deily
Ned Deily added the comment: Any solution using pkg-config would need to take into account that pkg-config may not be available (by default) on platforms we support; for example, AFAIK, Apple does not ship pkg-config in the base OS or any of its developer tools. And the solution would need

[issue25909] Incorrect documentation for PyMapping_Items and like

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems I was wrong. PyDict_Keys/PyDict_Values/PyDict_Items return a list in Python 3. Thus comments in Include/abstract.h were correct. Xiang Zhang noticed this in issue28211. -- ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: itermonthdates() is documented public method. We should do something with it. Maybe emitting dummy data instances is the simplest way to solve this issue. -- ___ Python tracker

Re: Nested for loops and print statements

2016-09-26 Thread jmp
On 09/26/2016 06:54 PM, Cai Gengyang wrote: What is a tab and what is a space in python and what's the difference ? Which piece of code is indented with tabs and which one is indented with spaces ? Please do not top-post in this list. Put your text after the message you quote. Tabs and

Re: Nested for loops and print statements

2016-09-26 Thread Steve D'Aprano
On Tue, 27 Sep 2016 01:25 am, Cai Gengyang wrote: > I just wanted to note that sometimes the code works, sometimes it doesn't. > (even though both are exactly the same code) ... Weird , dum dum dum They are not the same code. One of them mixes tabs and spaces for the same indent level, the

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On the second thought, I don't see why itermonthdays2() and itermonthdays() need to use itermonthdates() at all. It looks like it is easy to implement those using monthrange() and some simple integer arithmetics. --

[issue28279] setuptools failing to read from setup.cfg only in Python 3.6

2016-09-26 Thread Roy Williams
New submission from Roy Williams: Howdy, I'm attempting to make a change to the mock package in Python (related to http://bugs.python.org/issue28260), and it appears their CI is broken in Python 3.6 only. The problem appears to originate from setuptools, but this only fails in Python 3.6

Re: Nested for loops and print statements

2016-09-26 Thread Cai Gengyang
What is a tab and what is a space in python and what's the difference ? Which piece of code is indented with tabs and which one is indented with spaces ? On Tuesday, September 27, 2016 at 12:40:16 AM UTC+8, MRAB wrote: > On 2016-09-26 16:25, Cai Gengyang wrote: > > I just wanted to note that

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would leave itermonthdates() alone and just fix itermonthdays2() (and itermonthdays() for consistency) as Xiang suggested. The fix can be implemented by breaking on date.month != month and adding something like for wd in range(date.weekday(), 7):

[issue23591] enum: Add Flags and IntFlags

2016-09-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: The "What’s New In Python 3.6" page should really get an update to mention Flag, IntFlag and auto as enhancements to the enum module. Right now, the ssl module update docs mentions (but does not properly link for some reason) IntFlag, but otherwise, there is

[issue28278] Make `weakref.WeakKeyDictionary.__repr__` meaningful

2016-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +fdrake, pitrou versions: +Python 3.7 -Python 3.6 ___ Python tracker ___

Re: Nested for loops and print statements

2016-09-26 Thread MRAB
On 2016-09-26 16:25, Cai Gengyang wrote: I just wanted to note that sometimes the code works, sometimes it doesn't. (even though both are exactly the same code) ... Weird , dum dum dum for row in range(10): for column in range(10): print("*",end="") SyntaxError:

[issue28278] Make `weakref.WeakKeyDictionary.__repr__` meaningful

2016-09-26 Thread Ram Rachum
New submission from Ram Rachum: Both `WeakKeyDictionary` and `WeakValueDictionary` have opaque `__repr__` methods: >>> x = weakref.WeakKeyDictionary({object: 2, type: 4,}) >>> x >>> dict(x) {: 4, : 2} This makes it annoying to view them at a glance. Is there a reason for it? (I don't know,

Re: Nested for loops and print statements

2016-09-26 Thread jmp
On 09/26/2016 05:25 PM, Cai Gengyang wrote: I just wanted to note that sometimes the code works, sometimes it doesn't. (even though both are exactly the same code) ... Weird , dum dum dum for row in range(10): for column in range(10): print("*",end="") SyntaxError:

[issue28190] Detect curses headers correctly for cross-compiling

2016-09-26 Thread Matthias Klose
Matthias Klose added the comment: looks good to me, thanks for working on this. -- ___ Python tracker ___ ___

  1   2   >