Re: Problem finding my folder via terminal

2018-06-08 Thread Tamara Berger
Hi Cameron,

Re inline style: When I hit reply, this is the window I get. I don't
get my previous email with the carets appended to the beginning of the
line.

Before I look at the rest of your email, I'd like for you to explain
how there is a mymodule folder nested within another mymodule folder.
I don't see this second folder in Finder, and I definitely didn't
create it.

Thanks,

Tamara
On Sat, Jun 9, 2018 at 1:15 AM Cameron Simpson  wrote:
>
> On 08Jun2018 22:55, Tamara Berger  wrote:
> >I have to answer you via email because I haven't gotten the hang of
> >the inline style yet.
>
> I'm using email :-) We use the inline style for that, too. Just walk down the
> quoted previous message and insert your responses below the relevant parts 
> with
> blank lines separating the quoted material from your text. Anyway...
>
> >Here is the result of your suggestion:
> >
> >Last login: Fri Jun  8 22:43:58 on ttys001
> >192:~ TamaraB$ cd Desktop/mymodules/
> >192:mymodules TamaraB$ ls -laR /Users/TamaraB/Desktop/mymodules
> >total 16
> >drwxr-xr-x   4 TamaraB  staff   136 Jun  7 01:32 .
> >drwx--+ 37 TamaraB  staff  1258 Jun  8 22:30 ..
> >-rw-r--r--@  1 TamaraB  staff  6148 Jun  7 10:54 .DS_Store
> >drwxr-xr-x   5 TamaraB  staff   170 Jun  7 01:32 mymodules
>
> Ok, so here we see that there _is_ a "mymodules" folder inside your
> "/Users/TamaraB/Desktop/mymodules" folder.
>
> >/Users/TamaraB/Desktop/mymodules/mymodules:
> >total 16
> >drwxr-xr-x  5 TamaraB  staff  170 Jun  7 01:32 .
> >drwxr-xr-x  4 TamaraB  staff  136 Jun  7 01:32 ..
> >-rw-r--r--@ 1 TamaraB  staff0 Jun  5 09:47 README.py
> >-rw-r--r--@ 1 TamaraB  staff  253 Jun  7 10:55 setup.py
> >-rw-r--r--@ 1 TamaraB  staff  166 Jun  5 10:01 vsearch.py
> >192:mymodules TamaraB$
>
> And inside that second "mymodules" folder is your vsearch module and its
> accompanying files. This kind of mistake is easy to make (the doubled
> directory).
>
> You can do 2 things at this point.
>
> 1: Just:
>
>cd /Users/TamaraB/Desktop/mymodules/mymodules
>
> and run the setup.py from in there.
>
> Or:
>
> 2: Repair the mistake:
>
>cd /Users/TamaraB/Desktop/mymodules
>mv mymodules/* .
>rmdir mymodules
>
> which will move all the files from the lower directory up to where they should
> be. Then run the setup.py.
>
> BTW, the README is normally a text file named README.txt or maybe a markdown
> file named README.md.
>
> >(When I copied the coding into the email, I got a line of space
> >between each line of coding, and had to delete the extra lines one by
> >one? Any way to do this job nonmanually or to transfer the coding into
> >an email without the extra lines of space?)
>
> That is odd. My guess would be that your cut/paste is sending the end of line
> as a CR (carriage return) and a NL (newline), and both of those are being
> "typed" at the paste end, resulting in double spaced text. Annoying.
>
> Are you using mail.google.com to read your GMail? I just tried cut/paste some
> text from both iTerm and Terminal on my Mac into a scratch message there and
> didn't get doubled lines. Can you describe _exactly_ what you did to copy the
> text into your email? Presumably you're doing something different from what 
> I'm
> doing: select text in the terminal, type Cmd-C to copy it, click in my new
> message window and type Cmd-V to paste the copied text.
>
> Cheers,
> Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problem finding my folder via terminal

2018-06-08 Thread Cameron Simpson

On 08Jun2018 22:55, Tamara Berger  wrote:

I have to answer you via email because I haven't gotten the hang of
the inline style yet.


I'm using email :-) We use the inline style for that, too. Just walk down the 
quoted previous message and insert your responses below the relevant parts with 
blank lines separating the quoted material from your text. Anyway...



Here is the result of your suggestion:

Last login: Fri Jun  8 22:43:58 on ttys001
192:~ TamaraB$ cd Desktop/mymodules/
192:mymodules TamaraB$ ls -laR /Users/TamaraB/Desktop/mymodules
total 16
drwxr-xr-x   4 TamaraB  staff   136 Jun  7 01:32 .
drwx--+ 37 TamaraB  staff  1258 Jun  8 22:30 ..
-rw-r--r--@  1 TamaraB  staff  6148 Jun  7 10:54 .DS_Store
drwxr-xr-x   5 TamaraB  staff   170 Jun  7 01:32 mymodules


Ok, so here we see that there _is_ a "mymodules" folder inside your 
"/Users/TamaraB/Desktop/mymodules" folder.



/Users/TamaraB/Desktop/mymodules/mymodules:
total 16
drwxr-xr-x  5 TamaraB  staff  170 Jun  7 01:32 .
drwxr-xr-x  4 TamaraB  staff  136 Jun  7 01:32 ..
-rw-r--r--@ 1 TamaraB  staff0 Jun  5 09:47 README.py
-rw-r--r--@ 1 TamaraB  staff  253 Jun  7 10:55 setup.py
-rw-r--r--@ 1 TamaraB  staff  166 Jun  5 10:01 vsearch.py
192:mymodules TamaraB$


And inside that second "mymodules" folder is your vsearch module and its 
accompanying files. This kind of mistake is easy to make (the doubled 
directory).


You can do 2 things at this point.

1: Just:

  cd /Users/TamaraB/Desktop/mymodules/mymodules

and run the setup.py from in there.

Or:

2: Repair the mistake:

  cd /Users/TamaraB/Desktop/mymodules
  mv mymodules/* .
  rmdir mymodules

which will move all the files from the lower directory up to where they should 
be. Then run the setup.py.


BTW, the README is normally a text file named README.txt or maybe a markdown 
file named README.md.



(When I copied the coding into the email, I got a line of space
between each line of coding, and had to delete the extra lines one by
one? Any way to do this job nonmanually or to transfer the coding into
an email without the extra lines of space?)


That is odd. My guess would be that your cut/paste is sending the end of line 
as a CR (carriage return) and a NL (newline), and both of those are being 
"typed" at the paste end, resulting in double spaced text. Annoying.


Are you using mail.google.com to read your GMail? I just tried cut/paste some 
text from both iTerm and Terminal on my Mac into a scratch message there and 
didn't get doubled lines. Can you describe _exactly_ what you did to copy the 
text into your email? Presumably you're doing something different from what I'm 
doing: select text in the terminal, type Cmd-C to copy it, click in my new 
message window and type Cmd-V to paste the copied text.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Gregory Ewing

Chris Angelico wrote:

Open source would not exist without copyright,because it is
copyright law that gives license terms their meaning.


That statement doesn't make any sense. If there were no
copyright laws, there would be no need for licences to
distribute software.

You seem to be saying that nobody would ever release the
source of their software unless they could impose some
kind of restrictions on what people could do with it.

But I don't think that's true at all. Open sharing of
software was the *default* before people got the idea
of applying copyright laws to it. If there were no
copyright laws, people who wanted to share their source
would still do so, and people who wanted to keep it a
trade secret would still do so. The only difference is
there would be less lawyers making money out of it.


Even if your license terms amount
to "do what you like with this but be sure to credit me as the
author", that's only enforceable because of copyright law.


If attribution is all that really matters, it could
be addressed by quite a different kind of law. Or
tackle it socially rather than legally. Get it out
there first with your name all over it, so that anyone
who tries to "steal" it later will receive the
appropriate level of public shaming.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Gregory Ewing

MRAB wrote:

So those with the most money can buy the most protection?


That's the way it works with patents...

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


[issue33331] Clean modules in the reversed order

2018-06-08 Thread Nick Coghlan


Nick Coghlan  added the comment:

It also occurred to me to ask whether or not moving modules to the end of 
sys.modules each time they're successfully imported would help solve the 
problem (albeit at the expense of making import cache hits more expensive).

I don't think it does, though, since in my example above, the 
least-recently-imported ordering would end up looking like:

__main__, A, D, X, Y, B, Z, C

Since D was only imported by C, and hence never gets moved to the end later, 
even when C gets moved by the import from Z.

Instead, if we truly wanted to solve the problem comprehensively, we'd need to:

1. Use a context variable to track a stack of "currently running imports"
2. Track (as a process global) a directed (potentially cyclic!) graph of which 
modules imported other modules (i.e. the import of the target module started 
while the importing module was the currently active import on the stack). Lazy 
imports would typically show up as being initiated by __main__.
3. During shutdown, linearise the shutdown order for any modules which weren't 
already cleaned up by the cyclic GC.

Taking better advantage of the existing cyclic GC seems like it should be 
simpler, though, and would hopefully be enough to handle all but the most 
complex edge cases.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33331] Clean modules in the reversed order

2018-06-08 Thread Nick Coghlan


Nick Coghlan  added the comment:

I think the key concern here is that we *don't* consistently add modules to 
sys.modules in the order their bodies are executed: we add them in a kind of 
sawtooth order based on the imports from __main__, and the order of import 
statements in the imported modules.

For example, given the following import chains:

__main__ imports A then X
A imports B which imports C which imports D
X imports Y which imports B
X then imports Z which imports C

Then the order in which modules get added to sys.modules will be:

__main__, A, B, C, D, X, Y, Z

and they'll get cleaned up from left to right

(We're making the assumption here that, for whatever reason, GC hasn't cleaned 
up A, X, and their dependencies after sys.modules got cleared)

This means that in the status quo, unloading X, Y, and Z can have problems, 
since B, C, and D will already be gone.

Reversing the order doesn't fix that, and if anything will make things worse, 
as it means that in the "A -> B -> C -> D" dependency chain, A now gets cleared 
*last*, instead of getting cleared first as it does today.

So instead of just reversing the order, I wondering if what we may want to 
consider doing is to:

1. Make sure that we're dropping all the interpreter's internal references to 
__main__ before clearing sys.modules
2. When running through the module weakref list, force another cyclic GC run 
after each not-yet-cleared module gets cleaned up

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33812] Different behavior between datetime.py and its C accelerator

2018-06-08 Thread Tim Peters


Tim Peters  added the comment:

I copy/pasted the definitions of "aware" and "naive" from the docs.  Your TZ's 
.utcoffset() returns None, so, yes, any datetime using an instance of that for 
its tzinfo is naive.

In

print(datetime(2000,1,1).astimezone(timezone.utc))

the docs for astimezone say, in part,

"""
If self is naive (self.tzinfo is None), it is presumed to represent time in the 
system timezone.
"""

So it converted your naive time (viewed as being in your system - EDT - time 
zone) to UTC.

That appears to be using a different definition of "naive" (looking only at 
whether self.tzinfo is None).

The original datetime.py certainly didn't do that ...

"""
def astimezone(self, tz):
if not isinstance(tz, tzinfo):
raise TypeError("tz argument must be an instance of tzinfo")
mytz = self.tzinfo
if mytz is None:
raise ValueError("astimezone() requires an aware datetime")

if tz is mytz:
return self

# Convert self to UTC, and attach the new time zone object.
myoffset = self.utcoffset()
if myoffset is None:
raise ValueError("astimezone() requires an aware datetime")
"""

So it originally used the definition I quoted first.  The "sometimes pretend 
it's local time anyway" twist appeared to get added here:

https://github.com/python/cpython/commit/fdc860f3106b59ec908e0b605e51a1607ea2ff4b

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26698] Tk DPI awareness

2018-06-08 Thread Eric Fahlgren


Eric Fahlgren  added the comment:

I used the default Application setting.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Gregory Ewing

Gene Heskett wrote:
The courts weren't amused. I don't know as any of us ever cut those 
patent troll turkey's a check,


Patent troll turkeys: Don't cut them checks, cut their necks!

(Insert suitable stock photo of a turkey about to have its
head removed.)

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


[issue26698] Tk DPI awareness

2018-06-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Do any of the Windows experts know what "Override high DPI scaling behavior" on 
properties does?  Does it call SetProcessDpiAwareness?  It seems so. The answer 
would have implications for #33656 (which is about fixing this issue in IDLE, 
as Westly originally requested here).

This setting is on the popup when one clicks [Change high DPI settings] on the 
Compatibility tab.  Eric, there is a dropdown with 3 possible overrides.  
Application (default), System, System [Enhanced].  Which one did you use?

In my experiments, 'Application has the same effect as 
SetProcessDpiAwareness(1), while 'System' is the same as 
SetProcessDpiAwareness(0).  I expected this from what I posted on #33656.

Since the properties settings may or not be correct for all graphics packages, 
but will likely be correct for all tk and tkinter apps, I think tkinter should 
perhaps be modified.  The question is whether SetProcessDpiAwareness(1) is 
correct (for tk and tkinter) for all monitors.  I suspect so but don't know for 
sure.

--
components: +Windows
nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33812] Different behavior between datetime.py and its C accelerator

2018-06-08 Thread Alexander Belopolsky


Change by Alexander Belopolsky :


--
assignee:  -> belopolsky
components: +Extension Modules, Library (Lib)
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33812] Different behavior between datetime.py and its C accelerator

2018-06-08 Thread Alexander Belopolsky


Alexander Belopolsky  added the comment:

So you are suggesting that my datetime(2000,1,1,tzinfo=TZ()) should behave as a 
naive instance, right?  Well, this would be a third behavior different from 
both current C and Python implementations:

>>> print(datetime(2000,1,1).astimezone(timezone.utc))
2000-01-01 05:00:00+00:00

(I am in US/Eastern timezone.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Problem finding my folder via terminal

2018-06-08 Thread Tamara Berger
Hi Cameron,

I have to answer you via email because I haven't gotten the hang of
the inline style yet. Here is the result of your suggestion:

Last login: Fri Jun  8 22:43:58 on ttys001
192:~ TamaraB$ cd Desktop/mymodules/
192:mymodules TamaraB$ ls -laR /Users/TamaraB/Desktop/mymodules
total 16
drwxr-xr-x   4 TamaraB  staff   136 Jun  7 01:32 .
drwx--+ 37 TamaraB  staff  1258 Jun  8 22:30 ..
-rw-r--r--@  1 TamaraB  staff  6148 Jun  7 10:54 .DS_Store
drwxr-xr-x   5 TamaraB  staff   170 Jun  7 01:32 mymodules

/Users/TamaraB/Desktop/mymodules/mymodules:
total 16
drwxr-xr-x  5 TamaraB  staff  170 Jun  7 01:32 .
drwxr-xr-x  4 TamaraB  staff  136 Jun  7 01:32 ..
-rw-r--r--@ 1 TamaraB  staff0 Jun  5 09:47 README.py
-rw-r--r--@ 1 TamaraB  staff  253 Jun  7 10:55 setup.py
-rw-r--r--@ 1 TamaraB  staff  166 Jun  5 10:01 vsearch.py
192:mymodules TamaraB$

(When I copied the coding into the email, I got a line of space
between each line of coding, and had to delete the extra lines one by
one? Any way to do this job nonmanually or to transfer the coding into
an email without the extra lines of space?)

Thanks for all your help.

Tamara




On Fri, Jun 8, 2018 at 6:03 PM Cameron Simpson  wrote:
>
> On 08Jun2018 10:23, Tamara Berger  wrote:
> >On Fri, Jun 8, 2018 at 5:35 AM Cameron Simpson  wrote:
> >> On 08Jun2018 01:52, Tamara Berger  wrote:
> >> >192:~ TamaraB$ cd Desktop/mymodules
> >> >192:mymodules TamaraB$ pwd
> >> >/Users/TamaraB/Desktop/mymodules
> >> >192:mymodules TamaraB$ ls
> >> >mymodules
> >>
> >> It looks like you have a "mymodules" folder _inside_ your 
> >> "Desktop/mymodules"
> >> folder. Form the /Users/TamaraB/Desktop/mymodules folder, type these 
> >> commands.
> >>
> >>   ls -la
> >>   ls -la mymodules
> >
> >Nope. No duplicate folder.
>
> Your Terminal transcript above says otherwise, because (a) you're standing in
> "/Users/TamaraB/Desktop/mymodules" and (b) the "ls" command shows:
>
>   mymodules
>
> Therefore, _inside_ the "/Users/TamaraB/Desktop/mymodules" folder there is
> something called "mymodules", unless the transcript above is not complete.
>
> Please pos the result of:
>
>   ls -laR /Users/TamaraB/Desktop/mymodules
>
> Cheers,
> Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Sorting NaNs

2018-06-08 Thread Gregory Ewing

Peter Pearson wrote:

What applications would have to worry about colliding floats?  I
don't know.  I'm coming from cryptology, where worrying about such
things becomes a reflex.


If collisions are something to be feared, then you're into
hash territory, where you're probably going to want *much*
more than even 52 bits.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


[issue33656] IDLE: Turn on DPI awareness on Windows

2018-06-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Elisha wrote and I quoted: '[the call] sets DPI awareness'.  After reading 
https://msdn.microsoft.com/en-us/library/windows/desktop/dn280512(v=vs.85).aspx 
PROCESS_DPI_AWARENESS, what the call sets is the system's idea of what DPI 
awareness the app/process has. As I understand,
0 means 'App assumes DPI = 96, so if it is not, system must adjust.'
1 means 'App reads DPI at startup (somehow) and adjust to that value, but does 
not adapt to monitor change, so system must.'
2 means 'App reads DPI at startup and again after monitor change (somehow), so 
system should leave it alone.'
The correct value to pass is the one that best describes what the app does.  I 
believe that 0 is wrong and 1 more likely than 2.

My own experience and Elisha's report that IDLE looks better (at any resolution 
setting) matches others.  For instance,
https://stackoverflow.com/questions/41315873/attempting-to-resolve-blurred-tkinter-text-scaling-on-windows-10-high-dpi-disp
Three people describe fuzzy tk text as a well-known problem, fixed by 
SetProcessDpiAwareness(1).

https://wiki.tcl.tk/8484 tk has a scaling function that gets and sets a scaling 
factor, dpi/72 = pixels per printer point.  "The initial value for the scaling 
factor is set when the application starts, based on properties of the installed 
monitor."  This also suggests to me also that default 0 for awareness is wrong 
value.  Users (apps) can changes this, but I see no suggestion that monitor 
changes are tracked.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31215] Add version changed notes for OpenSSL 1.1.0 compatibility

2018-06-08 Thread Nick Coghlan


Nick Coghlan  added the comment:

Merged for 2.7 in 
https://github.com/python/cpython/commit/458ed1b237150f5c59b6ab3e1a5241a672ac8cbd

Thank you for the PRs, Mayank!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25058] Right square bracket argparse metavar

2018-06-08 Thread miss-islington


miss-islington  added the comment:


New changeset 4e6bd247aa955056626bf0cf8dc1c65a587b871f by Miss Islington (bot) 
in branch '2.7':
bpo-11874: fix assertion failure in argparse metavar handling (GH-1826)
https://github.com/python/cpython/commit/4e6bd247aa955056626bf0cf8dc1c65a587b871f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread miss-islington


miss-islington  added the comment:


New changeset 4e6bd247aa955056626bf0cf8dc1c65a587b871f by Miss Islington (bot) 
in branch '2.7':
bpo-11874: fix assertion failure in argparse metavar handling (GH-1826)
https://github.com/python/cpython/commit/4e6bd247aa955056626bf0cf8dc1c65a587b871f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread Nick Coghlan


Nick Coghlan  added the comment:

Thanks for the PR, and your patience!

The change has now been merged for all active 3.x versions.

It turns out the 2.7 argparse code is still close enough to the 3.x code for 
the automated backport to work, so the CI for that is currently running.

--
assignee:  -> ncoghlan
resolution:  -> fixed
stage: patch review -> backport needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26698] Tk DPI awareness

2018-06-08 Thread Eric Fahlgren


Eric Fahlgren  added the comment:

Still blurry with 3.6.5 on Win 10 with a 2560x1600 monitor at 125% scaling (I 
compared it to 2.7.15, they looked identical).  If I go to the Windows 
properties for pythonw.exe and turn on "Override high DPI scaling behavior" 
it's nice and sharp.

--
nosy: +eric.fahlgren

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14046] argparse: assertion failure if optional argument has square/round brackets in metavar

2018-06-08 Thread miss-islington


miss-islington  added the comment:


New changeset 4e6bd247aa955056626bf0cf8dc1c65a587b871f by Miss Islington (bot) 
in branch '2.7':
bpo-11874: fix assertion failure in argparse metavar handling (GH-1826)
https://github.com/python/cpython/commit/4e6bd247aa955056626bf0cf8dc1c65a587b871f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25058] Right square bracket argparse metavar

2018-06-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7188

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24089] argparse crashes with AssertionError

2018-06-08 Thread miss-islington


miss-islington  added the comment:


New changeset 4e6bd247aa955056626bf0cf8dc1c65a587b871f by Miss Islington (bot) 
in branch '2.7':
bpo-11874: fix assertion failure in argparse metavar handling (GH-1826)
https://github.com/python/cpython/commit/4e6bd247aa955056626bf0cf8dc1c65a587b871f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14046] argparse: assertion failure if optional argument has square/round brackets in metavar

2018-06-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7187

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24089] argparse crashes with AssertionError

2018-06-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7186

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7185

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Chris Angelico
On Sat, Jun 9, 2018 at 10:53 AM, Steven D'Aprano
 wrote:
> On Sat, 09 Jun 2018 03:54:25 +1000, Chris Angelico wrote:
>> (Whether linking to a third-party Youtube video is itself a violation of
>> the original author's copyright is even more complicated. IANAL and I am
>> not going to even think about how messy that situation could get.)
>
> Describing a link to a Youtube video as copyright infringement is an
> incredibly egregious example of copyright creep. Such a link in no way
> copies the copyrighted work, nor does it distribute the work.
>
> (The video itself may or may not infringe, but that's another question.)
>
> It might be argued that it *facilitates copyright infringement*, in the
> same way telling people that they can buy a crowbar from Bunnings
> facilitates breaking and entering. But it does not and should not be
> considered copyright infringement under any circumstances.

It was the "facilitates" part that I was referring to. If the video in
question infringes, and I share a link to it, am I guilty of sharing
something around? What if the original owner uploaded it as an
unlisted video, and I share that link around? What if the uploader
(who is not the owner) legitimately stayed within "fair use", but I
piece together the entire original from a bunch of links, creating a
playlist with all of the content, and share that?

I'm sure there are legal answers to all of those questions, but it's
definitely hairy territory.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2018-06-08 Thread Steven D'Aprano
On Sat, 09 Jun 2018 08:26:10 +1000, Cameron Simpson wrote:

> It is possible that Python 2 is just glossing over the problem; Python 3
> has a more rigorous view of character data.

I would say that is more than just possible, it is almost certain.



-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Steven D'Aprano
On Sat, 09 Jun 2018 03:54:25 +1000, Chris Angelico wrote:

> Right. Imagine if I write a poem, just like you say, and then I have the
> words posted on a gigantic billboard. In small print in the bottom
> corner of the billboard, I say "Copyright 2018 Chris Angelico. Taking
> photographs of this billboard is forbidden.". Do I still own copyright
> in the poem? Definitely. Can I stop people from (or sue people for)
> taking photos of the billboard? Probably not, although that's one for
> the lawyers to argue.

If it were you? Probably not.

If it were a building owned by a major company with deep pockets and 
powerful friends, or one with a "special relationship" to the government, 
especially if they can make a buck from it? Then yes, taking photos of 
publicly visible buildings and even natural features can be copyright 
infringement.

https://www.diyphotography.net/10-famous-landmarks-youre-allowed-
photograph-commercial-use/

[,...]
> (Whether linking to a third-party Youtube video is itself a violation of
> the original author's copyright is even more complicated. IANAL and I am
> not going to even think about how messy that situation could get.)

Describing a link to a Youtube video as copyright infringement is an 
incredibly egregious example of copyright creep. Such a link in no way 
copies the copyrighted work, nor does it distribute the work.

(The video itself may or may not infringe, but that's another question.)

It might be argued that it *facilitates copyright infringement*, in the 
same way telling people that they can buy a crowbar from Bunnings 
facilitates breaking and entering. But it does not and should not be 
considered copyright infringement under any circumstances.

The fact that people even fear that it might is a good example of how the 
necessary and useful monopoly of copyright has grown to be a monster.


[...]
> Why should I have to pay money for the right to own my own creations?

Because such a right is no right at all, but a privilege granted to you 
by the government for specific purposes. Copyright is not a natural right.

Because such a privilege infringes on other people's natural rights to 
copy what they see and hear. If somebody tells you a story, it is the 
most natural thing in the world to repeat it if you liked it.

> And who would you pay that to anyway? The one world government?

No, your national government of course, which would then have treaties 
with other trading blocks or countries that effectively say "you respect 
and enforce our copyrights and we'll respect and enforce yours".

But how quickly we forget the past. In my lifetime, copyright was not 
automatic. You had to officially register a work, or else it was in the 
public domain. If it wasn't worth it to you to fill out a registration 
form and post it, why should you be given a monopoly on the work?

For decades the US government charged a fee to register copyright, and 
the vast bulk of copyrighted works were not renewed after the first 13 
year term expired. Which is perfectly normal: the vast bulk of copyright 
works have no real value to the creator and no reasonable prospect of 
earning them income after a decade or two. And yet we impoverish our 
cultural commons by keeping works locked up under monopolistic laws for a 
lifetime past the death the author.

I think that the monopolization of so-called "intellectual property" 
rights has grown to a harmful extent. Economists who study this have 
found that copyright hurts the economy more than it helps (it discourages 
creators more than encourages) but if we could roll it back somewhat, I 
think it would be a good and useful tool:

- automatic, free copyright for an initial term of, let's say, 20 years;

- followed by one more free term of ten years requiring registration;

- followed by additional ten-year copyright terms, paid for at (say)
  $100 a term;

- up to a maximum length of sixty years, or the author's life plus
  30 years, whichever comes first;

- and a real commitment to recognising the public domain and free
  culture it as an asset to be protected and encouraged, not just
  a commons to be looted, monetized and locked up.



-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x

2018-06-08 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +7184

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33812] Different behavior between datetime.py and its C accelerator

2018-06-08 Thread Tim Peters


Tim Peters  added the comment:

The message isn't confusing - the definition of "aware" is confusing ;-)

"""
A datetime object d is aware if d.tzinfo is not None and d.tzinfo.utcoffset(d) 
does not return None. If d.tzinfo is None, or if d.tzinfo is not None but 
d.tzinfo.utcoffset(d) returns None, d is naive.
"""

--
nosy: +tim.peters

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Chris Angelico
On Sat, Jun 9, 2018 at 8:19 AM, Marko Rauhamaa  wrote:
> Chris Angelico :
>
>> On Sat, Jun 9, 2018 at 6:59 AM, MRAB  wrote:
>>> So those with the most money can buy the most protection?
>>
>> Yes, or more specifically, those who believe they can make the most
>> money from that protection. Ownership becomes pay-to-win, literally.
>
> In the words of Scrooge McDuck:
>
>https://i.stack.imgur.com/rMeiB.png>
>
>
> But guys, surely you are familiar with the exponential function:
>
>  * Everybody can afford a year for $1.

$1 per what, though? According to GitHub, I have 157 repositories. Is
that 157 separate things that cost $1 for a single year of protection?
Or do I pay per file of source code?

>  * Every worthwhile creation is worth $1,000 for ten years.

Not true by a long shot, and if you don't believe me, you can pay me
$1000 right now for ten years' use of any of my free software.

>  * And if Disney can pay the fee for Mickey Mouse for fifty years, the
>United States Government can quit all taxation, pay off the national
>debt and buy every American a luxury yacht and a private island in
>the Caribbean.

And if you think that Disney would actually let it compound according
to your theoretical definition, you're a dupe AND a fool. They'd
figure out some way to reset the counter every five years.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Django-hotsauce 0.9.4.1 is out

2018-06-08 Thread Etienne Robillard

Hi everyone,

Django-hotsauce 0.9.4.1 (open source edition) is out!

What's new

- Maintenance bugfixes for ZODBController class (cPython, PyPy)

- Minor bugfixes and updates

Download

- https://pypi.org/pypi/Django-hotsauce/

- 
https://www.isotopesoftware.ca/pub/django-hotsauce/django-hotsauce-0.9.4.1.tar.gz


Have fun!

Etienne



--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
https://mail.python.org/mailman/listinfo/python-list


Re: Sorting NaNs

2018-06-08 Thread Steven D'Aprano
On Fri, 08 Jun 2018 17:45:58 +, Peter Pearson wrote:

> What bothered me was my feeling that a "reasonable observer"
> would expect the random-float population to be much larger than 2**32,
> and the probably-collision-free sample size to be accordingly much
> larger than 2**16, which is, after all, small enough to appear in many
> applications.

People's intuition about probability is crap. Hence the Birthday Paradox 
I already linked to, and the Monty Hall Problem, which you can google 
for, and the Prosecutor's Fallacy:

http://www.conceptstew.co.uk/pages/prosecutors_fallacy.html

which sometimes (often?) leads to real miscarriages of justice:

https://en.wikipedia.org/wiki/Sally_Clark




-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33812] Different behavior between datetime.py and its C accelerator

2018-06-08 Thread Alexander Belopolsky


New submission from Alexander Belopolsky :

Consider the following code:

$ cat bug.py
import sys
if len(sys.argv) > 1:
sys.modules['_datetime'] = None
from datetime import tzinfo, datetime, timezone

class TZ(tzinfo):
def utcoffset(self, t):
pass

print(datetime(2000,1,1,tzinfo=TZ()).astimezone(timezone.utc))

When running with no arguments (with C acceleration), I get

$ ./python.exe bug.py
2000-01-01 00:00:00+00:00

but the pure python code produces an error

$ ./python.exe bug.py pure
Traceback (most recent call last):
  File "bug.py", line 10, in 
print(datetime(2000,1,1,tzinfo=TZ()).astimezone(timezone.utc))
  File ".../Lib/datetime.py", line 1783, in astimezone
raise ValueError("astimezone() requires an aware datetime")
ValueError: astimezone() requires an aware datetime

Note that some kind of error is expected because TZ.utcoffset() returns None 
instead of a timedelta, but the error message produced by pure python code is 
confusing.

--
title: Different behavior betwee -> Different behavior between datetime.py and 
its C accelerator

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33812] Different behavior betwee

2018-06-08 Thread Alexander Belopolsky


Change by Alexander Belopolsky :


--
nosy: belopolsky
priority: normal
severity: normal
status: open
title: Different behavior betwee

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33811] asyncio accepting connection limit

2018-06-08 Thread Yury Selivanov


Yury Selivanov  added the comment:

In principle this sounds good, but I'm not sure how the API and implementation 
would look like. Maybe you can share a bit more details?

--
components: +asyncio
nosy: +asvetlov, yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26698] Tk DPI awareness

2018-06-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Westly, #31500 changed font scaling for IDLE on high DPI screens.  It also 
removed some hard-coding of frame sizes in terms of pixels.  Does anything look 
better for you with current IDLE (3.6.5, 3.7.0)?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Gene Heskett
On Friday 08 June 2018 16:01:06 Larry Martell wrote:

> On Fri, Jun 8, 2018 at 3:16 PM, Marko Rauhamaa  
wrote:
> > At the moment nobody pays
> > the government to enforce copyrights.
>
> No, everyone pays for what the government does, poorly.

There, I fixed it for you Larry. :)

-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33810] Remove unused code in datetime module

2018-06-08 Thread Alexander Belopolsky


Change by Alexander Belopolsky :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25283] Make tm_gmtoff and tm_zone available on all platforms

2018-06-08 Thread Alexander Belopolsky


Alexander Belopolsky  added the comment:


New changeset bcb032e4acdebc043a7659a06e6037fe71020860 by Alexander Belopolsky 
in branch 'master':
bpo-33810 Remove unused code from datetime.py. (GH-7549)
https://github.com/python/cpython/commit/bcb032e4acdebc043a7659a06e6037fe71020860


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33810] Remove unused code in datetime module

2018-06-08 Thread Alexander Belopolsky


Alexander Belopolsky  added the comment:


New changeset bcb032e4acdebc043a7659a06e6037fe71020860 by Alexander Belopolsky 
in branch 'master':
bpo-33810 Remove unused code from datetime.py. (GH-7549)
https://github.com/python/cpython/commit/bcb032e4acdebc043a7659a06e6037fe71020860


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: How to install matplotlib in Debian 9

2018-06-08 Thread Jim Lee


On 06/08/2018 11:54 AM, Markos wrote:

Hi,

I'm starting my studies with Python 3 on Debian 9 that I just installed.

I have to install the matplotlib module, but I am in doubt what is the 
difference of the commands:


pip3 install matplotlib

or

apt-get install python3-matplotlib

Is there any difference in the packages which are installed?

Thanks,

Markos

It's generally preferable to use your distribution's package manager 
(apt-get) to install packages, as you will then receive updates as they 
become available.  However, Debian is notorious for having 
stale/outdated packages in its repository.  If you need the latest 
version of matplotlib, use pip (you'll have to update it manually).  If 
you want old but stable, use apt-get.


-Jim


--
https://mail.python.org/mailman/listinfo/python-list


[issue33811] asyncio accepting connection limit

2018-06-08 Thread Lisa Guo


New submission from Lisa Guo :

https://bugs.python.org/issue27906 describes a situation where accept rate of 
connection is too slow for use cases where spikes of incoming connection 
warrants fast accept. The fix for that was to accept socket connection in a 
tight loop until it reaches "backlog" connections.

This doesn't work very well in a web server scenario where we have many 
processes listening on the same socket. Each process should not accept up to 
"backlog" connections, for better load balancing among processes. It would be 
ideal if this is a separate argument for the server configuration so that the 
application can decide up to how many connections it is willing to accept in 
the loop, independent of the backlog parameter for listen() system call.

Let me know if this makes sense.

Lisa

--
messages: 319116
nosy: lguo
priority: normal
severity: normal
status: open
title: asyncio accepting connection limit
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30805] asyncio: race condition with debug and subprocess

2018-06-08 Thread Yury Selivanov


Change by Yury Selivanov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25283] Make tm_gmtoff and tm_zone available on all platforms

2018-06-08 Thread Alexander Belopolsky


Change by Alexander Belopolsky :


--
pull_requests: +7183

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30805] asyncio: race condition with debug and subprocess

2018-06-08 Thread miss-islington


miss-islington  added the comment:


New changeset 234b53f8b5d0615051025be26cf8adecbc346c57 by Miss Islington (bot) 
in branch '3.6':
bpo-30805: Avoid race condition with debug logging (GH-7545)
https://github.com/python/cpython/commit/234b53f8b5d0615051025be26cf8adecbc346c57


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33810] Remove unused code in datetime module

2018-06-08 Thread Alexander Belopolsky


Change by Alexander Belopolsky :


--
keywords: +patch
pull_requests: +7182
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30805] asyncio: race condition with debug and subprocess

2018-06-08 Thread miss-islington


miss-islington  added the comment:


New changeset 21f4c780a1de99bdb37abf57445f0c942449b45b by Miss Islington (bot) 
in branch '3.7':
bpo-30805: Avoid race condition with debug logging (GH-7545)
https://github.com/python/cpython/commit/21f4c780a1de99bdb37abf57445f0c942449b45b


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Marko Rauhamaa
Chris Angelico :

> On Sat, Jun 9, 2018 at 6:59 AM, MRAB  wrote:
>> So those with the most money can buy the most protection?
>
> Yes, or more specifically, those who believe they can make the most
> money from that protection. Ownership becomes pay-to-win, literally.

In the words of Scrooge McDuck:

   https://i.stack.imgur.com/rMeiB.png>


But guys, surely you are familiar with the exponential function:

 * Everybody can afford a year for $1.

 * Every worthwhile creation is worth $1,000 for ten years.

 * And if Disney can pay the fee for Mickey Mouse for fifty years, the
   United States Government can quit all taxation, pay off the national
   debt and buy every American a luxury yacht and a private island in
   the Caribbean.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2018-06-08 Thread Cameron Simpson

On 05Jun2018 06:42, bellcanada...@gmail.com  wrote:

On Sunday, 3 June 2018 20:11:43 UTC-4, Steven D'Aprano  wrote:

Don't retype a summary of what you think the error is. "character
undefieed" is not a thing, and there is no such thing as "byte 1x09".

You need to COPY AND PASTE the EXACT error that you get. Not just the
last line, the error message, but the FULL TRACEBACK starting from the
line "Traceback" and going to the end.

[...]


here is the exact error full message
in the attachment...UPDATE..i am manually modifying this reply..i tried to 
answer by my gmail but i get errors and i couldnt find this webpage till today 
and it doesnt accept attachments..so many you can for future provide an email 
if thats ok...anyway i will write the error manually here:


Many of us read this group/list via the mailing list python-list@python.org.  
I've CCed it here. Just avoid Google Groups, they're an awful interface to both 
usenet and mailing lists.


File 
"C:\Users\Robert\AppData\Local\Programs\Python\Python36\lib\encodings\cp1252.py", 
line 23, in decode

return codecs.charmap_decode(input,self.errors,decoding_table[0]
UnicodeDecodeError: 'charmap'codec can't decode byte 0x9d in position 7414: character 
maps to 


As Steven has remarked, this is not the complete traceback he requested, just 
the end. We need to know the entire execution stack.


for the record i did not puprosely set the code or decode o encode to cp-1252; 
this is a 3rd party script i have from the internet thats all


Can you say where it came from and how you fetched it? That may affect how the 
file got into this situation and how it might be repaired.


It might also let us fetch the file ourselves to look at it.


this a  set of files that runs find in python 2.7
i am trying to run it in python 3 becuz i was told in 2020 python 2 will no 
longer be supported
not sure if that really matters for my script


It may not matter, but as a general rule you should try to use Python 3 for new 
stuff. Python 2 is effectively end of life.


it runs completey fine in python 2, so for me the issue is with python 3 and 
its changes relative to python 2


It is possible that Python 2 is just glossing over the problem; Python 3 has a 
more rigorous view of character data.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


[issue30805] asyncio: race condition with debug and subprocess

2018-06-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7181

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30805] asyncio: race condition with debug and subprocess

2018-06-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7180

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30805] asyncio: race condition with debug and subprocess

2018-06-08 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 12f482e0ae33021c04264294f33fa6baa9617cec by Yury Selivanov in 
branch 'master':
bpo-30805: Avoid race condition with debug logging (GH-7545)
https://github.com/python/cpython/commit/12f482e0ae33021c04264294f33fa6baa9617cec


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Distribution file error

2018-06-08 Thread Cameron Simpson

On 08Jun2018 07:52, Tamara Berger  wrote:
I’m trying to create a distribution file for my module, but got an error 
message. The module, including the setup and read me files, are contained 
within the folder “mymodules.” I typed this command (per instructions from my 
workbook) from within mymodules folder:


192:~ TamaraB$ cd Desktop/mymodules/
192:mymodules TamaraB$ python3 setup.py sdist
/Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python:
 can't open file 'setup.py': [Errno 2] No such file or directory.

Why is this not working?

(I’m working in the OS Sierra terminal.)


The immediate reason that comes to mind is that there's isn't a "setup.py" file 
in that folder. What _is_ in that folder?


We're already discussing this in another thread; it's better to keep all this 
stuff together.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


Re: Problem finding my folder via terminal

2018-06-08 Thread Cameron Simpson

On 08Jun2018 10:23, Tamara Berger  wrote:

On Fri, Jun 8, 2018 at 5:35 AM Cameron Simpson  wrote:

On 08Jun2018 01:52, Tamara Berger  wrote:
>192:~ TamaraB$ cd Desktop/mymodules
>192:mymodules TamaraB$ pwd
>/Users/TamaraB/Desktop/mymodules
>192:mymodules TamaraB$ ls
>mymodules

It looks like you have a "mymodules" folder _inside_ your "Desktop/mymodules"
folder. Form the /Users/TamaraB/Desktop/mymodules folder, type these commands.

  ls -la
  ls -la mymodules


Nope. No duplicate folder.


Your Terminal transcript above says otherwise, because (a) you're standing in 
"/Users/TamaraB/Desktop/mymodules" and (b) the "ls" command shows:


 mymodules

Therefore, _inside_ the "/Users/TamaraB/Desktop/mymodules" folder there is 
something called "mymodules", unless the transcript above is not complete.


Please pos the result of:

 ls -laR /Users/TamaraB/Desktop/mymodules

Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


[issue33801] Remove non-ordered dict comment from plistlib

2018-06-08 Thread Ned Deily


Ned Deily  added the comment:


New changeset 416fbe41b783d5686b9cb7ff7f8af94b41dc16b8 by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-33801: Remove non-ordered dict comment from plistlib doc (GH-7495) (GH-7546)
https://github.com/python/cpython/commit/416fbe41b783d5686b9cb7ff7f8af94b41dc16b8


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33810] Remove unused code in datetime module

2018-06-08 Thread Alexander Belopolsky


Change by Alexander Belopolsky :


--
components:  -Extension Modules

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33642] IDLE: Display up to maxlines non-blank lines for Code Context

2018-06-08 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33801] Remove non-ordered dict comment from plistlib

2018-06-08 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the PR!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type: enhancement -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33810] Remove unused code in datetime module

2018-06-08 Thread Alexander Belopolsky


New submission from Alexander Belopolsky :

Since implementation of issue 25283, the objects returned by time.localtime 
always have tm_zone and tm_gmtoff attributes, but the datetime module still has 
code that anticipates these attributes to be missing. [1]

[1]: 
https://github.com/python/cpython/blob/1cbdb2208aa309cf288ee0b53f0ecd85279bb934/Lib/datetime.py#L1763

--
assignee: belopolsky
components: Extension Modules, Library (Lib)
messages: 319110
nosy: belopolsky
priority: normal
severity: normal
stage: needs patch
status: open
title: Remove unused code in datetime module
type: resource usage
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33801] Remove non-ordered dict comment from plistlib

2018-06-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7179

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33801] Remove non-ordered dict comment from plistlib

2018-06-08 Thread Ned Deily

Ned Deily  added the comment:


New changeset 1cbdb2208aa309cf288ee0b53f0ecd85279bb934 by Ned Deily (Andrés 
Delfino) in branch 'master':
bpo-33801: Remove non-ordered dict comment from plistlib doc (GH-7495)
https://github.com/python/cpython/commit/1cbdb2208aa309cf288ee0b53f0ecd85279bb934


--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30805] asyncio: race condition with debug and subprocess

2018-06-08 Thread Yury Selivanov


Change by Yury Selivanov :


--
keywords: +patch
pull_requests: +7178
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32718] Install PowerShell activation scripts for venv for all platforms

2018-06-08 Thread Brett Cannon


Brett Cannon  added the comment:

Looks like there is some PowerShell Core compatibility issues to work through 
first. Primarily the prompt seems the venv prompt additions show up twice but 
then disappear if you arrow up. There is also an issue of path separators 
needing to be updated appropriately according to the OS.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



RE: logging with multiprocessing

2018-06-08 Thread Schachner, Joseph
Multiprocessing, not multithreading.  Different processes.   This is pretty 
easy to do.

I have done this from a Python script to run an analysis program on many sets 
of data, at once.  To do it: 1) if there is going to be an output file, each 
output file must have a distinct name.   2) To use logging, log to file, and 
each log file will have to have  a distinct name.   This is not hard to do.  I 
assume input data is different for each run, so we don't have to do anything 
about that.  Then there won't be any conflict.  Input files are distinct output 
files are distinct, and log files are distinct.  

When I did this, we had the pleasure of running on a 20 core dual Xeon based 
system,  I don't remember if ran 20 processes at a time or slightly less.  
Anyway, we really did achieve nearly linear speed up. Windows did assign these 
processes to separate cores.

--- Joe S. 

-Original Message-
From: jenil.desa...@gmail.com  
Sent: Thursday, June 7, 2018 2:46 PM
To: python-list@python.org
Subject: logging with multiprocessing

Hello,

I am new to logging module. I want to use logging module with multiprocessing. 
can anyone help me understand how can I do it?. Any help would be appreciated.

Thank you.


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Chris Angelico
On Sat, Jun 9, 2018 at 6:59 AM, MRAB  wrote:
> On 2018-06-08 19:11, Marko Rauhamaa wrote:
>>
>> Chris Angelico :
>>
>>> On Sat, Jun 9, 2018 at 3:34 AM, Marko Rauhamaa  wrote:

 PS IMO copyright laws should be abolished altogether. At the very
 least one should pay for copyright protection. One €1 for the first
 year, €2 for the second, €4 for the third and so on exponentially.
>>>
>>>
>>> Why should I have to pay money for the right to own my own creations?
>>
>>
>> You shouldn't have to. IMO the government shouldn't interfere with other
>> people distributing your creations without your permission.
>>
>> I offered a compromise: the government steps in to defend your monopoly
>> to your creation and you will pay for the protection -- exponentially.
>>
>>> At what point does a creation have to be paid for - do I pay only if I
>>> think that I can make money off it? If I fail to pay, what happens -
>>
>>
>> No money, no protection.
>>
> So those with the most money can buy the most protection?

Yes, or more specifically, those who believe they can make the most
money from that protection. Ownership becomes pay-to-win, literally.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread MRAB

On 2018-06-08 19:11, Marko Rauhamaa wrote:

Chris Angelico :


On Sat, Jun 9, 2018 at 3:34 AM, Marko Rauhamaa  wrote:

PS IMO copyright laws should be abolished altogether. At the very
least one should pay for copyright protection. One €1 for the first
year, €2 for the second, €4 for the third and so on exponentially.


Why should I have to pay money for the right to own my own creations?


You shouldn't have to. IMO the government shouldn't interfere with other
people distributing your creations without your permission.

I offered a compromise: the government steps in to defend your monopoly
to your creation and you will pay for the protection -- exponentially.


At what point does a creation have to be paid for - do I pay only if I
think that I can make money off it? If I fail to pay, what happens -


No money, no protection.


So those with the most money can buy the most protection?

[snip]
--
https://mail.python.org/mailman/listinfo/python-list


[issue33799] Remove non-ordered dicts comments from FAQ

2018-06-08 Thread Andrés Delfino

Change by Andrés Delfino :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24622] tokenize.py: missing EXACT_TOKEN_TYPES

2018-06-08 Thread Stefan Krah


Stefan Krah  added the comment:

I agree, it would be strange to backport now.

--
stage: backport needed -> 
versions: +Python 3.7 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24622] tokenize.py: missing EXACT_TOKEN_TYPES

2018-06-08 Thread Ned Deily


Ned Deily  added the comment:

> What do others think?

+1 for adding a mention in the 3.7 What's New doc (anyone willing to produce a 
PR for (master Doc/whatsnew/3.7.rst ?)

-1 for backporting to 3.6.  Since 3.6 has been out there so long and is nearing 
the end of its maintenance life, it seems to me to not be a good idea to make a 
change like this that is more likely to break existing code than to fix 
something that a small number of 3.6 users may have been waiting for.

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30805] asyncio: race condition with debug and subprocess

2018-06-08 Thread Ned Deily


Ned Deily  added the comment:

@yselivanov, @asvetlov: ping on the languishing PR

--
nosy: +asvetlov, ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33770] base64 throws 'incorrect padding' exception when the issue is NOT with the padding

2018-06-08 Thread Tal Einat


Tal Einat  added the comment:

PR is ready with an improved exception message and raising binascii.Incomplete 
rather than binascii.Error. A final review would be welcome!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24622] tokenize.py: missing EXACT_TOKEN_TYPES

2018-06-08 Thread Stefan Krah


Stefan Krah  added the comment:

Yikes, I wasn't aware that we are that late in the 3.6 release cycle.

Perhaps it would be unusual to change it now, even though it is a bug fix.

What do others think?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Larry Martell
On Fri, Jun 8, 2018 at 3:16 PM, Marko Rauhamaa  wrote:
> At the moment nobody pays
> the government to enforce copyrights.

No, everyone pays for what the government does.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33770] base64 throws 'incorrect padding' exception when the issue is NOT with the padding

2018-06-08 Thread Tal Einat


Tal Einat  added the comment:

Code using only a2b_base64() would likely not be expecting this exception.

We have at least one such example in the stdlib: decode_b() in 
Lib/email/_encoded_words.py (which needs to be fixed regardless; see #27397).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33770] base64 throws 'incorrect padding' exception when the issue is NOT with the padding

2018-06-08 Thread R. David Murray


R. David Murray  added the comment:

I think that would move it even more into the realm of a bugfix, then, since 
code that cared about specific binascii exceptions could be looking for that 
one already.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Marko Rauhamaa
Gene Heskett :

> On Friday 08 June 2018 13:34:44 Marko Rauhamaa wrote:
>> PS IMO copyright laws should be abolished altogether. At the very
>> least one should pay for copyright protection. One €1 for the first
>> year, €2 for the second, €4 for the third and so on exponentially.
>
> I rather like that idea. Unforch, who would be in charge of keeping the 
> books uptodate? The USTPO? Of course that would expand another guvmnt 
> agencies payroll x10, and its a waste of taxpayer dollars since Albert 
> retired anyway.

That exponential system would pay for itself. At the moment nobody pays
the government to enforce copyrights.

> But then Disney started buying senators and congressmen, and we now
> have this asinine lifetime +70 years just to keep Mickey Mouse and
> Company's (oh, and don't forget a widow named Cher) income rolling in.

In my scheme, €15/$15 would buy you four years of exclusive rights to
your creation. If it turns profitable, an extra $1,008 would give you
six more years (10 years total -- not too bad). And if you hit a
jackpot, $1,000,000 for twenty years of exclusive rights shouldn't be
too much to ask.

And speaking of Disney, for a mere $1,000,000,000 it could get a
whopping 30 years of exclusive rights to Mickey Mouse!


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33082] multiprocessing docs bury very important 'callback=' args

2018-06-08 Thread Ned Deily


Ned Deily  added the comment:

These doc changes have been languishing.  We have a difference of opinion about 
adding a callback example.  I don't have a strong feeling one way or the other. 
 Davin or anyone else, what say you?

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



How to install matplotlib in Debian 9

2018-06-08 Thread Markos

Hi,

I'm starting my studies with Python 3 on Debian 9 that I just installed.

I have to install the matplotlib module, but I am in doubt what is the 
difference of the commands:


pip3 install matplotlib

or

apt-get install python3-matplotlib

Is there any difference in the packages which are installed?

Thanks,

Markos

--
https://mail.python.org/mailman/listinfo/python-list


[issue33375] warnings: get filename from frame.f_code.co_filename

2018-06-08 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 11a896652ee98aa44e59ed25237f9efb56635dcf by Brett Cannon (Thomas 
Kluyver) in branch 'master':
bpo-33375: Get filename for warnings from frame.f_code.co_filename (GH-6622)
https://github.com/python/cpython/commit/11a896652ee98aa44e59ed25237f9efb56635dcf


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33800] Fix default argument for parameter dict_type of ConfigParser/RawConfigParser

2018-06-08 Thread Ned Deily

Ned Deily  added the comment:

Thanks, Andrés!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33800] Fix default argument for parameter dict_type of ConfigParser/RawConfigParser

2018-06-08 Thread Ned Deily


Ned Deily  added the comment:


New changeset dc20d9d1026282a2879992f4cef517a270c8a467 by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-33800: Fix default argument for parameter dict_type of 
ConfigParser/RawConfigParser (GH-7494) (GH-7542)
https://github.com/python/cpython/commit/dc20d9d1026282a2879992f4cef517a270c8a467


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33800] Fix default argument for parameter dict_type of ConfigParser/RawConfigParser

2018-06-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7177

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33800] Fix default argument for parameter dict_type of ConfigParser/RawConfigParser

2018-06-08 Thread Ned Deily

Ned Deily  added the comment:


New changeset 3b0b90c8c3b8161f0ae9005b83b9b6449d4a8476 by Ned Deily (Andrés 
Delfino) in branch 'master':
bpo-33800: Fix default argument for parameter dict_type of 
ConfigParser/RawConfigParser (GH-7494)
https://github.com/python/cpython/commit/3b0b90c8c3b8161f0ae9005b83b9b6449d4a8476


--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33771] Module: timeit. According to documentation default_repeat should have the value 3. Has 5.

2018-06-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This is a duplicate in that the 3 => 5 change was incorporated into PR 7419 for 
#28240.

--
nosy: +terry.reedy
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Enhance the timeit module: display average +- std dev instead 
of minimum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33770] base64 throws 'incorrect padding' exception when the issue is NOT with the padding

2018-06-08 Thread Tal Einat


Tal Einat  added the comment:

It is more a correction than a clarification.

After looking through the module some more, I'm considering using 
binascii.Incomplete for this case, since it seems appropriate enough that it's 
worth using it rather than adding another, separate exception.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33770] base64 throws 'incorrect padding' exception when the issue is NOT with the padding

2018-06-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Is the new message a clarification, in which case we would typically not 
backport, or a correction, which we usually would?

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33799] Remove non-ordered dicts comments from FAQ

2018-06-08 Thread Ned Deily


Ned Deily  added the comment:


New changeset 5c7f22c2a339f23f8a236540d0ebed955637095b by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-33799: Remove non-ordered dicts comments from FAQ (GH-7520)
https://github.com/python/cpython/commit/5c7f22c2a339f23f8a236540d0ebed955637095b


--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33766] Grammar Incongruence

2018-06-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

A few years ago, there was a particular case in which compile failed without a 
trailing newline.  We fixed it so that it would work anyway.
Unless we are willing for a conforming Python interpreter to fail
>>> exec('print("hello")')
hello

The Reference Manual should be clear that EOF and EOS (end-of-string) is 
treated as NEWLINE.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Gene Heskett
On Friday 08 June 2018 13:34:44 Marko Rauhamaa wrote:

> Gene Heskett :
> > On Friday 08 June 2018 08:18:19 Chris Angelico wrote:
> >> Are news servers guaranteed to carry the X-Copyright header in all
> >> transmissions? If not, the copyright notice isn't part of the
> >> message, and is most likely unenforceable.
> >
> > As the courts have so found when this has come up over the last 30
> > years. Basically, its just some newly minted lawyer trying to earn
> > his place at the feeding trough.
>
> Copyrights exist whether they are declared or not.
>
> If I publish a poem or, say, a Python application on Usenet, you will
> need my permission to distribute it. Of course, its dissemination via
> Usenet and remailers is ultimately *me* distributing my work.
>
> In one Usenet discussion I published my translation of a Finnish
> Christmas carol. The author of the original lyrics had died more than
> 70 years before so that was ok. However, the melody was still under
> copyright so I didn't have a right to *explain* in any direct manner
> how the melody went.
>
> Luckily, someone had posted the song on Youtube so I could provide a
> link (although even that could be considered criminal in some
> jurisdictions).
>
>
> Marko
>
> PS IMO copyright laws should be abolished altogether. At the very
> least one should pay for copyright protection. One €1 for the first
> year, €2 for the second, €4 for the third and so on exponentially.

I rather like that idea. Unforch, who would be in charge of keeping the 
books uptodate? The USTPO? Of course that would expand another guvmnt 
agencies payroll x10, and its a waste of taxpayer dollars since Albert 
retired anyway.

Here in the hew hess aye, we originally had a copyright term of 7 years, 
renewable just once for another 7. I will date myself by saying I can 
actually remember those days.  But then Disney started buying senators 
and congressmen, and we now have this asinine lifetime +70 years just to 
keep Mickey Mouse and Company's (oh, and don't forget a widow named 
Cher) income rolling in.

Thats the sort of stuff usually found, warm and squishy, on the ground 
behind the male of the bovine specie.

-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31215] Add version changed notes for OpenSSL 1.1.0 compatibility

2018-06-08 Thread Mayank Singhal


Change by Mayank Singhal <17mayanksing...@gmail.com>:


--
pull_requests: +7176

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28557] error message for bad raw readinto

2018-06-08 Thread R. David Murray


Change by R. David Murray :


--
nosy: +benjamin.peterson, stutzbach

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Marko Rauhamaa
Chris Angelico :

> On Sat, Jun 9, 2018 at 3:34 AM, Marko Rauhamaa  wrote:
>> PS IMO copyright laws should be abolished altogether. At the very
>> least one should pay for copyright protection. One €1 for the first
>> year, €2 for the second, €4 for the third and so on exponentially.
>
> Why should I have to pay money for the right to own my own creations?

You shouldn't have to. IMO the government shouldn't interfere with other
people distributing your creations without your permission.

I offered a compromise: the government steps in to defend your monopoly
to your creation and you will pay for the protection -- exponentially.

> At what point does a creation have to be paid for - do I pay only if I
> think that I can make money off it? If I fail to pay, what happens -

No money, no protection.

> are people allowed to completely reuse and remix my work without even
> acknowledging me?

That would be ideal, absolutely!

> And who would you pay that to anyway? The one world government?

A good question! If I violate your foreign copyright in my country,
which country should enforce the collection of damages?

There's a precedent. If I send you a letter by mail, only my country's
postal service gets money but your country's postal service will deliver
it to you without compensation.

> the protections are important and extremely useful.

Disagree there.

> Open source would not exist without copyright, because it is copyright
> law that gives license terms their meaning.

Some people would lose, others would win. On the balance, society would
win out by dropping the concept of a copyright.

> If people had to pay exorbitant rates for the privilege of being
> properly credited for their work, theft would completely trump
> generosity.

That wouldn't be theft.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33762] temp file isn't IOBase

2018-06-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Martin, I added you because this Tempfile issue is related to #26175.

--
nosy: +martin.panter, terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26175] Fully implement IOBase abstract on SpooledTemporaryFile

2018-06-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Martin, the PR has one 'approved' review, not from you.  You appear to be 
requesting changes here, but it is not clear to me which are 'maybe' and which 
are 'must'.

It is not obvious to me whether this should be treated as enhancement or 
behavior issue, but backporting is moot until something is merged into master.

--
nosy: +terry.reedy
versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Chris Angelico
On Sat, Jun 9, 2018 at 3:34 AM, Marko Rauhamaa  wrote:
> Gene Heskett :
>> On Friday 08 June 2018 08:18:19 Chris Angelico wrote:
>>> Are news servers guaranteed to carry the X-Copyright header in all
>>> transmissions? If not, the copyright notice isn't part of the message,
>>> and is most likely unenforceable.
>>
>> As the courts have so found when this has come up over the last 30 years.
>> Basically, its just some newly minted lawyer trying to earn his place at
>> the feeding trough.
>
> Copyrights exist whether they are declared or not.

Yes, this is true. It's not copyright that is unenforceable, but the
copyright notice in his message. Nobody is denying that he owns his
own words; but by posting them on a public forum, he - like everyone
else here - is implicitly granting us the right to read them.

> If I publish a poem or, say, a Python application on Usenet, you will
> need my permission to distribute it. Of course, its dissemination via
> Usenet and remailers is ultimately *me* distributing my work.

Right. Imagine if I write a poem, just like you say, and then I have
the words posted on a gigantic billboard. In small print in the bottom
corner of the billboard, I say "Copyright 2018 Chris Angelico. Taking
photographs of this billboard is forbidden.". Do I still own copyright
in the poem? Definitely. Can I stop people from (or sue people for)
taking photos of the billboard? Probably not, although that's one for
the lawyers to argue.

> In one Usenet discussion I published my translation of a Finnish
> Christmas carol. The author of the original lyrics had died more than 70
> years before so that was ok. However, the melody was still under
> copyright so I didn't have a right to *explain* in any direct manner how
> the melody went.
>
> Luckily, someone had posted the song on Youtube so I could provide a
> link (although even that could be considered criminal in some
> jurisdictions).

That's the flip side of copyright: you're taking someone else's
copyrighted material and posting it in public. Since you are not the
author, you do not inherently have the right to do that. There are
various legal permissions (very old works, "fair use", etc), but
absent those, you would be violating copyright.

(Whether linking to a third-party Youtube video is itself a violation
of the original author's copyright is even more complicated. IANAL and
I am not going to even think about how messy that situation could
get.)

> PS IMO copyright laws should be abolished altogether. At the very least
> one should pay for copyright protection. One €1 for the first year, €2
> for the second, €4 for the third and so on exponentially.

Why should I have to pay money for the right to own my own creations?
At what point does a creation have to be paid for - do I pay only if I
think that I can make money off it? If I fail to pay, what happens -
are people allowed to completely reuse and remix my work without even
acknowledging me?

And who would you pay that to anyway? The one world government?

Copyright laws and international treaties are there to protect content
creators and encourage creation. They need to have set expiration time
(IMO 50 years is long enough - not "50 years since author's death" but
50 years since publication) after which the work becomes free to use,
but the protections are important and extremely useful. Open source
would not exist without copyright, because it is copyright law that
gives license terms their meaning. Even if your license terms amount
to "do what you like with this but be sure to credit me as the
author", that's only enforceable because of copyright law. If people
had to pay exorbitant rates for the privilege of being properly
credited for their work, theft would completely trump generosity.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33462] reversible dict

2018-06-08 Thread Michael Selik


Michael Selik  added the comment:

It looks like there's general agreement on python-dev that this is appropriate 
for v3.8 (not v3.7).

Guido van Rossum and Ramsey D'silva gave a +1. Raymond Hettinger noted some use 
cases. INADA Naoki raised a point about waiting for other implementations, 
which Guido agreed with, but after some research came around to OK'ing this for 
v3.8.

Responding to Serhiy Storchaka's worry about adding new code possibly upsetting 
the compiler optimizations: The implementation seems straightforward and 
unlikely to confuse the compiler. Is there evidence that similar code has 
previously made CPython slower? If the compiler's black magic is too difficult 
to understand, it may be equally plausible that this code causes an improvement 
to the optimization of unrelated code.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Stefan's headers [was:Names and identifiers]

2018-06-08 Thread Thomas Jollans
On 08/06/18 14:13, Ned Batchelder wrote:
> On 6/8/18 2:34 AM, Thomas Jollans wrote:
>> On 07/06/18 22:36, Peter Pearson wrote:
>>
>>> X-Copyright: (C) Copyright 2018 Stefan Ram. All rights reserved.
>>> Distribution through any means
>>>    other than regular usenet channels is forbidden. It is forbidden
>>> to publish this article in the
>>>    Web, to change URIs of this article into links,    and to
>>> transfer the body without this
>>>    notice, but quotations    of parts in other Usenet posts are
>>> allowed.
>> As discussed previously [1], this arguably means that it's best if you
>> don't even quote his messages if your posts are mirrored on the mailing
>> list (as most people's are).
>>
>> [1].
>> https://mail.python.org/pipermail/python-list/2017-November/728635.html
> 
> The restriction is absurd, and the idea that people will obey the
> restriction in the headers is absurd. If Stefan posts to a newsgroup in
> this day and age, he knows full well that his words will end up on http
> servers somewhere.  He needs to get over it, or stop posting to newsgroups.
> 
> --Ned.

Quite right. Of course it's probably unenforceable, but that's not
really the point.

I have nothing against Stefan. In fact, back when I could (illegally)
see his posts, I quite enjoyed them. However, if he writes in a public
forum like this, he should accept that he's writing in a public forum.
As long as he doesn't, it's only right that he should be banned (from
the list) and ignored (by the few remaining comp.lang.python users).

-- Thomas
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Sorting NaNs

2018-06-08 Thread Peter Pearson
On Fri, 8 Jun 2018 02:15:02 + (UTC), Steven D'Aprano wrote:
> On Thu, 07 Jun 2018 20:43:10 +, Peter Pearson wrote:
[snip]
>> 
>> But gosh, if there are only 2**32 different "random" floats, then you'd
>> have about a 50% chance of finding a collision among any set of 2**16
>> samples.  Is that really tolerable?
>
> Why wouldn't it be? It would be shocking if a sufficiently large sequence 
> of numbers contained no collisions at all: that would imply the values 
> were very much NON random.

[snip]

> . . . I understand that Python's Mersenne Twister implementation 
> is based on 64-bit ints.

OK, I'll relax, particularly since Michael Lamparski's experiment
strongly indicates that random floats are drawn from a population much
larger than 2**16.

You're completely correct, of course, in noting that an absence of
collisions would condemn the random-number generator just as badly
as an excess.  What bothered me was my feeling that a "reasonable
observer" would expect the random-float population to be much larger
than 2**32, and the probably-collision-free sample size to be accordingly
much larger than 2**16, which is, after all, small enough to appear
in many applications.

Exactly what the "reasonable observer" would expect that population to
be, I don't know.  To a mathematician, there's zero chance of collision
in any finite sample of real numbers, or even just rational numbers; but
I don't think anybody would expect that from a computer.  When I picture
the diligent software engineer asking himself, "Wait, how large can I
make this sample before I'll start seeing collisions," I imagine his
first guess is going to be the size of a float's mantissa.

What applications would have to worry about colliding floats?  I
don't know.  I'm coming from cryptology, where worrying about such
things becomes a reflex.

-- 
To email me, substitute nowhere->runbox, invalid->com.
-- 
https://mail.python.org/mailman/listinfo/python-list


  1   2   3   >