Friday finking: TDD and EAFP

2019-10-31 Thread DL Neil via Python-list
Is the practice of TDD fundamentally, if not philosophically, somewhat contrary to Python's EAFP approach? TDD = Test-Driven Development EAFP = it's easier to ask forgiveness than permission * WebRefs as footnote The practice of TDD* is that one writes test routines to prove a unit of code,

Re: Trouble trying to get started with pygame

2019-10-31 Thread MRAB
On 2019-11-01 03:47, originallmo...@gmail.com wrote: It's been years since I've done anything with Python, and it wasn't a language I was terribly familiar with even then. I'm using Python 3.8 on my Windows 7 laptop. Python itself works so far as I can tell. I can get it to import pip without

Re: What's the difference between running a script under command box and interpreter?

2019-10-31 Thread jfong
Cameron Simpson於 2019年11月1日星期五 UTC+8下午12時13分45秒寫道: > On 31Oct2019 20:44, Jach Fong wrote: > >The script test.py is something like this: > >---test.py > >from pyeds import fsm > >... > >... > >class Rule_Parse: > >def __init__(self): > >... > >self.current_char = '' > >...

[issue37607] segfault running code in jupyter on macOS 10.14.5 - crashed on child side of fork pre-exec

2019-10-31 Thread Ned Deily
Ned Deily added the comment: Looking at the macOS crash report you supplied (thanks!), the crash is occurring below libcurl which is called by the third-party pycurl module, so not in Python Standard Library code. And the crash appears to another of macOS's attempts to catch doing unsafe

[issue38658] Python Program crashes when running in fore and back ground

2019-10-31 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. This appears to be another instance of a long-standing unresolved problem when using networks functions in a thread application on macOS that invoke Python's _scproxy helper module to obtain possible network proxy configuration info from

Re: What's the difference between running a script under command box and interpreter?

2019-10-31 Thread Cameron Simpson
On 31Oct2019 20:44, Jach Fong wrote: The script test.py is something like this: ---test.py from pyeds import fsm ... ... class Rule_Parse: def __init__(self): ... self.current_char = '' ... ... def main(input_str): for c in input_str: ... rule.current_char

Trouble trying to get started with pygame

2019-10-31 Thread originallmoney
It's been years since I've done anything with Python, and it wasn't a language I was terribly familiar with even then. I'm using Python 3.8 on my Windows 7 laptop. Python itself works so far as I can tell. I can get it to import pip without problems, but, when I try to get going with pygame, I

What's the difference between running a script under command box and interpreter?

2019-10-31 Thread jfong
The script test.py is something like this: ---test.py from pyeds import fsm ... ... class Rule_Parse: def __init__(self): ... self.current_char = '' ... ... def main(input_str): for c in input_str: ... rule.current_char = c ... if __name__ ==

[issue38642] python3.7.3 seems to cause add-apt-repository to rejct or not find gi library

2019-10-31 Thread Ned Deily
Change by Ned Deily : -- nosy: +doko -Marco Ippolito ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-31 Thread Ammar Askar
Ammar Askar added the comment: Closing, here's the bug in dateutil's repo: https://github.com/dateutil/dateutil/issues/197 -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker

[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-31 Thread Michael Zhang
Michael Zhang added the comment: Yeah, seconded with my own tracing as well. -- ___ Python tracker ___ ___ Python-bugs-list

[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-31 Thread Ammar Askar
Ammar Askar added the comment: Err...I mean I think this is a dateutil bug rather than in the Python stdlib. -- ___ Python tracker ___

[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-31 Thread Ammar Askar
Ammar Askar added the comment: It is windows specific, but I don't think this is a dateutil bug rather than the python stdlib: Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-31 Thread ThePokestarFan
ThePokestarFan added the comment: Can you run >>>import dateutil >>>print(repr(dateutil)) -- ___ Python tracker ___ ___

[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-31 Thread Michael Zhang
Michael Zhang added the comment: I think it might be something Windows specific; the original comment includes the version and code to reproduce. -- ___ Python tracker ___

[issue38656] mimetypes for python 3.7.5 fails to detect matroska video

2019-10-31 Thread Ammar Askar
Ammar Askar added the comment: This is what I get on master, will try 3.7.5+ as noted in the Github issue: Python 3.9.0a0 (heads/noopt-dirty:f3b170812d, Oct 1 2019, 20:15:53) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>

[issue38656] mimetypes for python 3.7.5 fails to detect matroska video

2019-10-31 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I couldn't find mkv in mimetypes with search. Can you please post the output of the mimetypes query in 3.7.4 and 3.7.5 for the regression? In the attached GitHub issue the user reports mkv returns None and mp4 is detected. --

[issue38656] mimetypes for python 3.7.5 fails to detect matroska video

2019-10-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38659] enum classes cause slow startup time

2019-10-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-31 Thread Dong-hee Na
Dong-hee Na added the comment: Python 3.9.0a0 (heads/master:112f2b805b, Nov 1 2019, 10:48:20) [GCC 7.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> utc_tzinfo = datetime.timezone.utc >>> print(datetime.datetime.fromtimestamp(0,

[issue36664] argparse: parser aliases in subparsers stores alias in dest variable

2019-10-31 Thread paul j3
paul j3 added the comment: Just clarify how the code currently works. `subparsers` is a positional Action of subclass _SubParsersAction. It has a nargs='+...', requiring at least one string, and taking all remaining strings. Its __call__ has the standard signature. So everything that's

[issue38654] `urllib.request.Request` uses mutable value as default value

2019-10-31 Thread Efanzh
Efanzh added the comment: I agree that this doesn’t fix any bug. But is is easy to make mistakes by using mutable default values (See https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments). Both PyCharm and pylint show warnings about mutable default arguments even there is

[issue38659] enum classes cause slow startup time

2019-10-31 Thread Gregory P. Smith
New submission from Gregory P. Smith : Creating an enum subclass (ie: defining an enum) is slow. This dramatically impacts startup time of Python programs that import a bunch of potentially needed constant definitions at startup before any proper code executes. How slow? So slow that a

[issue38622] _ctypes.dlsym (py_dl_sym) does not trigger audit hooks

2019-10-31 Thread tholl
tholl added the comment: I probably should have done this earlier, but here's a small test case that reproduces the issue. The assert fails in vanilla Python 3.8, but passes with the patch. -- type: -> behavior Added file: https://bugs.python.org/file48689/audit-test.py

[issue35182] Popen.communicate() breaks when child closes its side of pipe but not exits

2019-10-31 Thread Andriy Maletsky
Change by Andriy Maletsky : -- pull_requests: +16540 pull_request: https://github.com/python/cpython/pull/17023 ___ Python tracker ___

[issue38654] `urllib.request.Request` uses mutable value as default value

2019-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not needed. There is no bug. Nothing to change. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue38654] `urllib.request.Request` uses mutable value as default value

2019-10-31 Thread Efanzh
Efanzh added the comment: How about changing `if headers` to `if headers is not None`? -- ___ Python tracker ___ ___

Re: return a ctypes object to C

2019-10-31 Thread Eryk Sun
On 10/30/19, Arnaud Loonstra wrote: > > I have a binding to access and create the C methods and structures so in > Python I can call the Zmsg() constructor. I now need to return this. > > My python test method is simply: > > def actor_test( *args, **kwargs): > print("test") > msg =

[issue32309] Implement asyncio.run_in_executor shortcut

2019-10-31 Thread Kyle Stanley
Kyle Stanley added the comment: > end up adding two high-level functions Clarification: asyncio.run_in_executor() would be a function, but asyncio.ThreadPool would be a context manager class. -- ___ Python tracker

[issue32309] Implement asyncio.run_in_executor shortcut

2019-10-31 Thread Kyle Stanley
Kyle Stanley added the comment: > I don't like the low-level API of run_in_executor. "executor" being the > first argument, the inability to pass **kwargs, etc. > I mean it's great that we can use 'concurrent.futures' in asyncio, but having > native asyncio pools implementation would be

[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-31 Thread ThePokestarFan
ThePokestarFan added the comment: For me, it seems that dateutil is not a standard Python library module. When I run `import dateutil` it reports that there is no module called dateutil. ``` >>> import dateutil Traceback (most recent call last): File "", line 1, in ImportError: No module

[issue38652] Remove/update provisional note for asyncio.BufferedProtocol

2019-10-31 Thread Yury Selivanov
Yury Selivanov added the comment: Yeah, please do the change! Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38658] Python Program crashes when running in fore and back ground

2019-10-31 Thread ThePokestarFan
New submission from ThePokestarFan : I have a Python process that should not die that is multiprocessed. I have a queue process that feeds the queue every so often, but my program should use up queue items faster than the queue adds them. I have four worker threads that make requests to an

[issue38652] Remove/update provisional note for asyncio.BufferedProtocol

2019-10-31 Thread Kyle Stanley
Kyle Stanley added the comment: > I'm a newcomer, would it be ok for me to take on this propsal? It will need approval from Yury and/or Andrew before it can be merged, but I think this is relatively uncontroversial. You can definitely work on it though. --

Re: Artifact repository?

2019-10-31 Thread Eli the Bearded
In comp.lang.python, Paul Rubin wrote: > Dan Stromberg writes: >> By an Artifact Repository, I mean something that can version largish >> binaries that are mostly produced by a build process. > I'm not familiar with the term "artifact repository" and hadn't heard of > the ones you mentioned,

Re: Jupyter Notebook -> PDF with A4 pages?

2019-10-31 Thread Martin Schöön
Den 2019-10-16 skrev Piet van Oostrum : > Martin Schöön writes: > >> Den 2019-10-15 skrev Piet van Oostrum : >>> >> pip is version 8.1.1 which is what Ubuntu 16.04 comes >> with. I have learnt -- the hard way -- that pip should be >> used with the --user option. Does this mean I am stuck with

Restaurant Bill

2019-10-31 Thread ferzan saglam
The code below which I have written should print the result of 43.6 with the given values I have included at the end of this question, but for some odd reason I get the result of 41.8. print('Enter the total cost of the meal')

Re: Restaurant Bill

2019-10-31 Thread Chris Angelico
On Fri, Nov 1, 2019 at 7:51 AM ferzan saglam wrote: > > The code below which I have written should print the result of 43.6 with the > given values I have included at the end of this question, but for some odd > reason I get the result of 44.44. > You're posting multiple threads with the same

Restaurant Bill

2019-10-31 Thread ferzan saglam
The code below which I have written should print the result of 43.6 with the given values I have included at the end of this question, but for some odd reason I get the result of 41.8. print('Enter the total cost of the meal')

Restaurant Bill

2019-10-31 Thread ferzan saglam
The code below which I have written should print the result of 43.6 with the given values I have included at the end of this question, but for some odd reason I get the result of 44.44. print('Enter the total cost of the meal')

[issue38657] String format for hexadecimal notation breaks padding with alternative form

2019-10-31 Thread Pete Wicken
New submission from Pete Wicken : When formatting an integer as a hexadecimal value, the '#' alternate form modifier inserts a preceding '0x'. If this is used in combination with padding modifiers, the '0x' is counted as part of the overall width, which does not feel like the natural

[issue38610] use-after-free in list object function

2019-10-31 Thread Zackery Spytz
Zackery Spytz added the comment: I have created a patch to fix these crashes. Please consider taking a look. -- nosy: +ZackerySpytz versions: +Python 2.7, Python 3.7, Python 3.9 ___ Python tracker

[issue38610] use-after-free in list object function

2019-10-31 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +16539 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17022 ___ Python tracker ___

Re: Calculations and Variables

2019-10-31 Thread MRAB
On 2019-10-31 18:46, ferzan saglam wrote: The code below which I have written should print the result of 43.6 with the given values I have included at the end of this question, but for some odd reason I get the result of 44.44. bill = (input("Enter the total cost of the meal: \n"))

[issue38654] `urllib.request.Request` uses mutable value as default value

2019-10-31 Thread Steven D'Aprano
Steven D'Aprano added the comment: I agree with Serhiy that using mutable defaults is not automatically a bad idea. This is unnecessary code churn that fixes no bugs and adds no new functionality and doesn't make the code "better". The PR removes one harmless use of a mutable default but

[issue36084] Threading: add builtin TID attribute to Thread objects

2019-10-31 Thread Jake Tesler
Jake Tesler added the comment: I have encountered a minor bug with this new feature. The bug occurs when creating a new multiprocessing.Process object on Unix (or on any platform where the multiprocessing start_method is 'fork' or 'forkserver'). When creating a new process via fork, the

Re: Calculations and Variables

2019-10-31 Thread Gary Herron
On 10/31/19 11:46 AM, ferzan...@gmail.com wrote: The code below which I have written should print the result of 43.6 with the given values I have included at the end of this question, but for some odd reason I get the result of 44.44. bill = (input("Enter the total cost of the meal: \n"))

RE: Calculations and Variables

2019-10-31 Thread David Raymond
How are you getting any value at all? You are trying to do math on string values just like in your infinite loop question. This should raise TypeError: unsupported operand type(s) for /: 'str' and 'str' Also, tips are usually given as percentages. Here with a tip value of 9 you're saying that

[issue38656] mimetypes for python 3.7.5 fails to detect matroska video

2019-10-31 Thread toonn
New submission from toonn : A user reported an error to us which seems to derive from the ``mimetypes`` library failing to guess the mime type for ``.mkv`` matroska video files: https://github.com/ranger/ranger/issues/1744#issuecomment-548514373 This is a regression because the same query

Calculations and Variables

2019-10-31 Thread ferzan saglam
The code below which I have written should print the result of 43.6 with the given values I have included at the end of this question, but for some odd reason I get the result of 44.44. bill = (input("Enter the total cost of the meal: \n"))

Re: Artifact repository?

2019-10-31 Thread Marko Rauhamaa
Dan Stromberg : > Can anyone please recommend an opensource "Artifact Repository" suitable > for use with CPython, including dozens of wheels, tar.gz's and .py's? > > By an Artifact Repository, I mean something that can version largish > binaries that are mostly produced by a build process. > > It

[issue38649] tkinter messagebox is sloppy

2019-10-31 Thread Brett Cannon
Brett Cannon added the comment: Please note that calling something "sloppy" and that somehow its development was done in some "carelessness" fashion to the point of being "egregious" is not motivating to others to try and help. Trying to support all of this code for free in one's spare time

[issue38651] Add WolfSSL support

2019-10-31 Thread Brett Cannon
Brett Cannon added the comment: My guess is we won't want to take code specific to WolfSSL due to maintenance overhead of trying to support another SSL library. There has been talk about trying to move away from our OpenSSL dependency and switch to using the OS's native secure sockets

Artifact repository?

2019-10-31 Thread Dan Stromberg
Hi folks. Can anyone please recommend an opensource "Artifact Repository" suitable for use with CPython, including dozens of wheels, tar.gz's and .py's? By an Artifact Repository, I mean something that can version largish binaries that are mostly produced by a build process. It doesn't

[issue35182] Popen.communicate() breaks when child closes its side of pipe but not exits

2019-10-31 Thread Andriy Maletsky
Change by Andriy Maletsky : -- keywords: +patch pull_requests: +16538 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17020 ___ Python tracker

[issue35182] Popen.communicate() breaks when child closes its side of pipe but not exits

2019-10-31 Thread Andriy Maletsky
Andriy Maletsky added the comment: @josh.r but you’re correct regarding cached data that isn’t sent on subsequent communicate() calls. If the child consumes the input too slowly, and timeout occurs before sending all input, the remaining part will be lost. Maybe it is not a bug, but it’s

[issue37645] Replace PyEval_GetFuncName/PyEval_GetFuncDesc

2019-10-31 Thread Ronan Lamy
Change by Ronan Lamy : -- nosy: +Ronan.Lamy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36664] argparse: parser aliases in subparsers stores alias in dest variable

2019-10-31 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: I ran into the same problem. I know of the set_defaults() method, in fact, that is what I have always been using. But why was dest added if not to provide a better solution? I agree that changing it would _perhaps_ break some code, so I agree that this

[issue37903] IDLE Shell sidebar.

2019-10-31 Thread Stephen Paul Chappell
Stephen Paul Chappell added the comment: Maybe my impression has been false this whole time, but the Python interactive interpreter seems to be very similar to the IDLE shell window. My question is, "Why not make them even more so?" Having IDLE react to sys.ps1 and sys.ps2 opens up the

[issue37903] IDLE Shell sidebar.

2019-10-31 Thread Tal Einat
Tal Einat added the comment: Stehpen, I'm not sure what your use-case is... To me it seems that sys.ps1 (and ps2?) aren't quite relevant any more when using a sidebar, since there are no longer inline prompts. Raymond, with the current PR, this replaces the inline prompts. Making it

[issue38654] `urllib.request.Request` uses mutable value as default value

2019-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is nothing wrong with using {} as default value. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue37903] IDLE Shell sidebar.

2019-10-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Will the current interactive shell continue to be available? -- nosy: +rhettinger ___ Python tracker ___

Re: [Python-Dev] [WARNING] Some users who downloaded the Python 3.5.8 .xz tarball got the wrong version

2019-10-31 Thread Michael
On 31/10/2019 00:17, Larry Hastings wrote: > > > Due to awkward CDN caching, some users who downloaded the source code > tarballs of Python 3.5.8 got a preliminary version instead of the > final version.  As best as we can tell, this only affects the .xz > release; there are no known instances of

Re: [Python-Dev] [WARNING] Some users who downloaded the Python 3.5.8 .xz tarball got the wrong version

2019-10-31 Thread Michael
On 31/10/2019 00:17, Larry Hastings wrote: > > > Due to awkward CDN caching, some users who downloaded the source code > tarballs of Python 3.5.8 got a preliminary version instead of the > final version.  As best as we can tell, this only affects the .xz > release; there are no known instances of

Main threads waits indefinitely on futures if single future calls condition.wait()

2019-10-31 Thread i...@dantalion.nl
Hello, Recently I have been trying to use a reantrant read write lock in my project but discovered several problems when writing test cases. All the relevant material can be found on the following locations

Re: return a ctypes object to C

2019-10-31 Thread Arnaud Loonstra
On 31-10-2019 14:44, Thomas Jollans wrote: On 31/10/2019 14.13, Arnaud Loonstra wrote: On 30-10-2019 09:32, Arnaud Loonstra wrote: Hi all, I'm trying to wrap my head around the ctypes API. I have a C structure I wish to create in Python and then return from python to C. So a python method is

[issue6188] Error Evaluating float(x) ** float(y)

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21957] ASCII Formfeed (FF) & ASCII Vertical Tab (VT) Have Hexadecimal Representation

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24185] Add Function for Sending File to Trash (or Recycling Bin)

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18601] Example "command-line interface to difflib" has typographical error

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21537] functools.lru_cache does not cache exceptions

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18558] Iterable glossary entry needs clarification

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk"

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31476] Stdlib source files not installed

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7676] IDLE shell shouldn't use TABs

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35328] Set a environment variable for venv prompt

2019-10-31 Thread Vinay Sajip
Change by Vinay Sajip : -- versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11410] Use GCC visibility attrs in PyAPI_*

2019-10-31 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue16575] ctypes: unions as arguments

2019-10-31 Thread Vinay Sajip
Change by Vinay Sajip : -- assignee: docs@python -> vinay.sajip resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue16575] ctypes: unions as arguments

2019-10-31 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 0118d109d54bf75c99a8b0fa9aeae1a478ac4b7e by Vinay Sajip in branch '3.7': [3.7] bpo-16575: Add checks for unions passed by value to functions. (GH-16799) (GH-17017) https://github.com/python/cpython/commit/0118d109d54bf75c99a8b0fa9aeae1a478ac4b7e

[issue38655] ipaddress.ip_network('0.0.0.0/0').is_private == True

2019-10-31 Thread pascalhofmann
New submission from pascalhofmann : ipaddress.ip_network('0.0.0.0/0').is_private returns True, even though 0.0.0.0/0 clearly is no private network. -- components: Library (Lib) messages: 355753 nosy: pascalhofmann priority: normal severity: normal status: open title:

[issue37903] IDLE Shell sidebar.

2019-10-31 Thread Stephen Paul Chappell
Stephen Paul Chappell added the comment: The documentation for sys.ps1 and sys.ps2 states that they "are only defined if the interpreter is in interactive mode." Since the IDLE shell is meant to be interactive (and to reduce the differences between the shell and running Python directly),

Re: return a ctypes object to C

2019-10-31 Thread Thomas Jollans
On 31/10/2019 14.13, Arnaud Loonstra wrote: > On 30-10-2019 09:32, Arnaud Loonstra wrote: >> Hi all, >> >> I'm trying to wrap my head around the ctypes API. I have a C >> structure I wish to create in Python and then return from python to C. >> >> So a python method is called from C and needs to

[issue16575] ctypes: unions as arguments

2019-10-31 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 952899704800a5aa438e84d50f0b6fc498c72e89 by Vinay Sajip in branch '3.8': [3.8] bpo-16575: Add checks for unions passed by value to functions. (GH-16799) (GH-17016) https://github.com/python/cpython/commit/952899704800a5aa438e84d50f0b6fc498c72e89

[issue38654] `urllib.request.Request` uses mutable value as default value

2019-10-31 Thread Efanzh
New submission from Efanzh : The `headers` argument of the `__init__` method of `urllib.request.Request` class uses `{}` as default value, which is mutable. It is not a good idea. -- components: Library (Lib) messages: 355750 nosy: EFanZh priority: normal pull_requests: 16537

Re: return a ctypes object to C

2019-10-31 Thread Arnaud Loonstra
On 30-10-2019 09:32, Arnaud Loonstra wrote: Hi all, I'm trying to wrap my head around the ctypes API. I have a C structure I wish to create in Python and then return from python to C. So a python method is called from C and needs to return an object which we then process in C again. I

[issue16575] ctypes: unions as arguments

2019-10-31 Thread Vinay Sajip
Change by Vinay Sajip : -- pull_requests: +16536 pull_request: https://github.com/python/cpython/pull/17017 ___ Python tracker ___

[issue16575] ctypes: unions as arguments

2019-10-31 Thread Vinay Sajip
Change by Vinay Sajip : -- pull_requests: +16535 pull_request: https://github.com/python/cpython/pull/17016 ___ Python tracker ___

[issue9182] document “--” as a way to distinguish option w/ narg='+' from positional argument in argparse

2019-10-31 Thread Jackson Riley
Jackson Riley added the comment: Hi all, I'm a newcomer and wanted to try to make this change, is it still wanted/needed? -- nosy: +jacksonriley ___ Python tracker ___

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2019-10-31 Thread Jackson Riley
Jackson Riley added the comment: I'm a newcomer and thought about trying to follow up on this and potentially update existing patches, would this be a good idea? -- nosy: +jacksonriley ___ Python tracker

[issue37838] typing.get_type_hints not working with forward-declaration and decorated functions

2019-10-31 Thread Netzeband
Netzeband added the comment: Thanks a lot! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38652] Remove/update provisional note for asyncio.BufferedProtocol

2019-10-31 Thread Benjamin Edwards
Benjamin Edwards added the comment: Hey Kyle, I'm a newcomer, would it be ok for me to take on this propsal? Ben -- nosy: +benedwards14 ___ Python tracker ___

[issue38653] pkgutil.extend_path fails with zipped eggs if not at first place

2019-10-31 Thread Hartmut Goebel
New submission from Hartmut Goebel : I have a test site containing nested namespace packages in zipped and unzipped eggs_ - nspkg3_aaa.egg - unzipped egg, namespaces: nspkg3 - nspkg3_bbb.egg - zipped egg , namespaces: nspkg3, nspkg3.bbb - nspkg3_ccc.egg - unzipped egg, namespaces: nspkg3

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-10-31 Thread Vedran Čačić
Vedran Čačić added the comment: However, this is an instance of a general problem: whenever we want to strongly type (via dunders) protocols that specialcase builtin types, we will have to choose between three options: * special case them also in typing engine, complicating the typing engine

[issue38600] Change the mark up of NULL

2019-10-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38312] curses: add `set_tabsize` and `set_escdelay`

2019-10-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38312] curses: add `set_tabsize` and `set_escdelay`

2019-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b32cb97bce472dad337c6b2f071883f6234e21d8 by Serhiy Storchaka (Anthony Sottile) in branch 'master': bpo-38312: Add curses.{get,set}_escdelay and curses.{get,set}_tabsize. (GH-16938)

error with installing a package(matplotlib)

2019-10-31 Thread thodoris doultsinos
Hello, I have been encountering problems with installing packages on python. I am using windows 10, pycharm and pip install order in command prompt to install packages.At first I had an error with installing numpy (something with visual c++ so i downloaded them and it worked).Now i want to

Issue with running programs in Python and imports, probably directories messed up

2019-10-31 Thread Vladyslav Verteletskyi
Dear developers, I have stuck upon a problem with all of my attempts to import libraries to Python. PyCharm and Anaconda both fail, as well as terminal. Find the screenshots enclosed. I have tried reinstalling both several times, of no help. All of the libraries I tried to import are already

[issue38586] logging: handlers names are not set when using fileConfig

2019-10-31 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker ___

  1   2   >