Re: Error 0x80070643

2020-04-29 Thread Bob Gailer
On Apr 29, 2020 5:17 PM, "Antonis13XD"  wrote:
>
> On Wed, Apr 29, 2020, 1:59 PM Antonis13XD
>
> > Hello python team!
> >
> >   My name is antonis and I am a new fella who wants to be a programmer
in
> > python language. However, my thirst for learning I faced with an issue.
> >   More specifically, when I try to install 3.8.2 version of python, it
> > shows me a message like this one in the first photo.

This list does not accept attachments. Please copy and paste the text you
want to share with us.

Remember to reply all so that everyone on the list gets to see your
response.

Also let us know where you got the installer from and exactly what you did
to try to install from it.

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


Re: Errors in python\3.8.3\Lib\nntplib.py

2020-04-29 Thread G Connor
On 4/29/2020 5:29 PM, Chris Angelico wrote:


> Try opening the file in binary mode instead.


Changed:  f = open(postfile,'r')to :  f = open(postfile,'rb')
and it worked.

Thanks man!





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


[RELEASE] Python 3.8.3rc1 is now ready for testing

2020-04-29 Thread Łukasz Langa
Python 3.8.3rc1 is the release candidate of the third maintenance release of 
Python 3.8. Go get it here:

https://www.python.org/downloads/release/python-383rc1/ 
 

Assuming no critical problems are found prior to 2020-05-11, the scheduled 
release date for 3.8.3, no code changes are planned between this release 
candidate and the final release.

That being said, please keep in mind that this is a pre-release and as such its 
main purpose is testing.

Maintenance releases for the 3.8 series will continue at regular bi-monthly 
intervals, with 3.8.4 planned for mid-July 2020.

What’s new?

The Python 3.8 series is the newest feature release of the Python language, and 
it contains many new features and optimizations. See the “What’s New in Python 
3.8  ” document for more 
information about features included in the 3.8 series.

Detailed information about all changes made in version 3.8.3 specifically can 
be found in its change log 
.

We hope you enjoy Python 3.8!

Thanks to all of the many volunteers who help make Python Development and these 
releases possible! Please consider supporting our efforts by volunteering 
yourself or through organization contributions to the Python Software 
Foundation.

Your friendly release team,
Ned Deily @nad 
Steve Dower @steve.dower 
Łukasz Langa @ambv 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [RELEASE] Python 3.9.0a6 is now available for testing

2020-04-29 Thread Paul Moore
m[-1]!= '\n'and'\n'or'  '

This is

'\n' if m[-1] != '\n' else ' '

... just written in a way that was common before the if-expression was
invented, using and and or. In itself, it's fine.

The problem is that the space in "and '\n'" is omitted (presumably for
brevity for some reason?) leaving us with and'\n', which looks like a
string prefix (similar to r'\n' or f'\n') but with a prefix of "and"
which isn't a valid string prefix. The problem is that something isn't
disambiguating this the same way as the 3.8 parser did (I'd say it's
the "new parser" but Robin showed the same behaviour with "-X
oldparser" which makes me wonder...

Anyway, that's what I think is going on. I'll leave it to the parser
experts to understand what's happening and decide on a fix :-)

Paul

On Wed, 29 Apr 2020 at 20:54, Rhodri James  wrote:
>
> On 29/04/2020 20:23, Schachner, Joseph wrote:
> >>  norm=lambda m: m+(m and(m[-1]!= '\n'and'\n'or'  ')or'\n')
> > Parentheses   1  2  
> >   1 0
> > quotes 1  0 
> > 1   0   1 01  0
> >
> > OK I don't see any violation of quoting or parentheses matching.   Still 
> > trying to figure out what this lambda does.
>
> Presumably it's something to do with recognising string prefixes?
>
> --
> Rhodri James *-* Kynesim Ltd
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Errors in python\3.8.3\Lib\nntplib.py

2020-04-29 Thread Chris Angelico
On Thu, Apr 30, 2020 at 7:18 AM G Connor  wrote:
>
> module: python\3.8.2\Lib\nntplib.py
> lines 903-907
> ---
> for line in f:
> if not line.endswith(_CRLF):
> line = line.rstrip(b"\r\n") + _CRLF
> if line.startswith(b'.'):
> line = b'.' + line
> ---
>
> When I try to submit a Usenet post, I get this:
>
>
> Traceback (most recent call last):
>   File "D:\python\3xcode\Usenet\posting\NNTP_post.py", line 12, in 
> news.post(f)
>   File "D:\python\3.8.2\lib\nntplib.py", line 918, in post
> return self._post('POST', data)
>   File "D:\python\3.8.2\lib\nntplib.py", line 904, in _post
> if not line.endswith(_CRLF):
> TypeError: endswith first arg must be str or a tuple of str, not bytes

The module is expecting bytes everywhere. You've passed it a text
string but it's expecting you to pass bytes. Try opening the file in
binary mode instead.

> Also, line 906:
> if line.startswith(b'.'):
>  looks like it should be:
> if not line.startswith(b'.'):

No, that's correct. It's doubling the dots to ensure protocol compliance.

Neither of these is a bug in the module.

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


SSL Certificate Verify Failed (_ssl.c:600) using Windows Server 2019

2020-04-29 Thread separated via Python-list
hello python-list and the subsribers,

I just bought a rdp from someone and try to install python in order to running 
youtube-dl but when I just run a simple youtube-dl command like 'youtube-dl 
[youtube video url]' it got me this message :

ERROR: Unable to download webpage:  (caused by 
URLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify 
failed (_ssl.c:600)'),))

Im operating system is windows server 2019, I have tried running youtube-dl 
from windows server 2016 but it works fine without any settings necessary.

I hope I can get the answer here because my billing keeps running out of time.

best regards,
separated
-- 
https://mail.python.org/mailman/listinfo/python-list


Errors in python\3.8.3\Lib\nntplib.py

2020-04-29 Thread G Connor
module: python\3.8.2\Lib\nntplib.py
lines 903-907
---
for line in f:
if not line.endswith(_CRLF):
line = line.rstrip(b"\r\n") + _CRLF
if line.startswith(b'.'):
line = b'.' + line
---

When I try to submit a Usenet post, I get this:


Traceback (most recent call last):
  File "D:\python\3xcode\Usenet\posting\NNTP_post.py", line 12, in 
news.post(f)
  File "D:\python\3.8.2\lib\nntplib.py", line 918, in post
return self._post('POST', data)
  File "D:\python\3.8.2\lib\nntplib.py", line 904, in _post
if not line.endswith(_CRLF):
TypeError: endswith first arg must be str or a tuple of str, not bytes


Also, line 906:
if line.startswith(b'.'):
 looks like it should be:
if not line.startswith(b'.'):
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Error 0x80070643

2020-04-29 Thread Antonis13XD
On Wed, Apr 29, 2020, 1:59 PM Antonis13XD

> Hello python team!
>
>   My name is antonis and I am a new fella who wants to be a programmer in
> python language. However, my thirst for learning I faced with an issue.
>   More specifically, when I try to install 3.8.2 version of python, it
> shows me a message like this one in the first photo. I also open the log
> file and check for a helping hand about the issue, but again it showed me
> Fatal Error 0x80070643.
>   Last, I have to say thank you for your free idle and your courage to
> help us in any problem that we may face.
>
> A newcomer,
>   Antonis Nt
> *I work on Windows 7 home premium
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [RELEASE] Python 3.9.0a6 is now available for testing

2020-04-29 Thread Rhodri James

On 29/04/2020 20:23, Schachner, Joseph wrote:

 norm=lambda m: m+(m and(m[-1]!= '\n'and'\n'or'  ')or'\n')

Parentheses   1  2  
  1 0
quotes 1  0 1   
0   1 01  0

OK I don't see any violation of quoting or parentheses matching.   Still trying 
to figure out what this lambda does.


Presumably it's something to do with recognising string prefixes?

--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


RE: [RELEASE] Python 3.9.0a6 is now available for testing

2020-04-29 Thread Schachner, Joseph
> norm=lambda m: m+(m and(m[-1]!= '\n'and'\n'or'  ')or'\n')
Parentheses   1  2  
  1 0   
quotes 1  0 1   
0   1 01  0  

OK I don't see any violation of quoting or parentheses matching.   Still trying 
to figure out what this lambda does.

--- Joseph S.
 
-Original Message-
From: Robin Becker  
Sent: Wednesday, April 29, 2020 10:52 AM
To: Łukasz Langa ; python-list@python.org; 
python-annou...@python.org
Subject: Re: [RELEASE] Python 3.9.0a6 is now available for testing

On 28/04/2020 16:52, Łukasz Langa wrote:
> On behalf of the entire Python development community, and the currently 
> serving Python release team in particular, I’m pleased to announce the 
> release of Python 3.9.0a6. Get it here:
> 

thanks for the release; I tried to reply in the dev list, but failed miserably. 
Sorry for any noise.

I see this simple difference which broke some ancient code which works in 
Python 3.8.2



> $ python
> Python 3.8.2 (default, Apr  8 2020, 14:31:25) [GCC 9.3.0] on linux 
> Type "help", "copyright", "credits" or "license" for more information.
 norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')
 
> robin@minikat:~/devel/reportlab/REPOS/reportlab/tests
> $ python39
> Python 3.9.0a6 (default, Apr 29 2020, 07:46:29) [GCC 9.3.0] on linux 
> Type "help", "copyright", "credits" or "license" for more information.
 norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')
>   File "", line 1
> norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')
>  ^
> SyntaxError: invalid string prefix
 
> robin@minikat:~/devel/reportlab/REPOS/reportlab/tests
> $ python39 -X oldparser
> Python 3.9.0a6 (default, Apr 29 2020, 07:46:29) [GCC 9.3.0] on linux 
> Type "help", "copyright", "credits" or "license" for more information.
 norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')
>   File "", line 1
> norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')
>^
> SyntaxError: invalid string prefix
 


so presumably there has been some parser / language change which renders 
and'\n' illegal. Is this a real syntax error or an alpha issue? It looks like 
the tokenization has changed. Putting in the obvious spaces removes the syntax 
error.
--
Robin Becker

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


Re: Function to avoid a global variable

2020-04-29 Thread Tony Flury via Python-list


On 28/04/2020 06:49, jf...@ms4.hinet.net wrote:

bvdp於 2020年4月28日星期二 UTC+8上午9時46分35秒寫道:

Oh my, that is very cool! So, I can do this:

def foo(i):
 if not 'bar' in foo.__dict__:
 foo.bar = 5
 foo.bar += i

You can have function attribute created this way if you like:

 def foo(i):
 foo.bar += i
 foo.bar = 5

--Jach

And as you have shown - foo.bar is effectively a global variable - just 
one with a qualified name :-)



--

Tony Flury

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


Re: [RELEASE] Python 3.9.0a6 is now available for testing

2020-04-29 Thread Peter J. Holzer
On 2020-04-28 17:52:58 +0200, Łukasz Langa wrote:
> Many new features for Python 3.9 are still being planned and written. Among 
> the new major new features and changes so far:
[...]
> PEP 617 , New PEG parser for 
> CPython
[...]

On 2020-04-29 15:51:37 +0100, Robin Becker wrote:
> so presumably there has been some parser / language change which renders
> and'\n' illegal. Is this a real syntax error or an alpha issue? It looks
> like the tokenization has changed.

I'm not surprised that an entirely new parser behaves a bit differently in
edge cases.

The question is whether and'\n' is supposed to be legal.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Techniques to extend code without modifying it? (besides modules and decorators)

2020-04-29 Thread Christian Seberino
>
> a pattern like:
>   if : 
>   elif : 
>
>

Thanks.  I really like this simple yet powerful suggestion you made.  See
this...

import new_code
...
if foo:
new_code.do_new_stuff(..)

We can massively modify existing code by *ONLY* adding one import and a 2
line if snippet!!!

Very nice!

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


Re: Techniques to extend code without modifying it? (besides modules and decorators)

2020-04-29 Thread Christian Seberino
If you want to know, I'm trying to add metaprogramming (macros!) to a tiny Lisp 
interpreter I wrote.  I'm hesitant to mess with all that nice debugged code to 
add this new stuff.

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


Re: [RELEASE] Python 3.9.0a6 is now available for testing

2020-04-29 Thread Robin Becker

On 28/04/2020 16:52, Łukasz Langa wrote:

On behalf of the entire Python development community, and the currently serving 
Python release team in particular, I’m pleased to announce the release of 
Python 3.9.0a6. Get it here:



thanks for the release; I tried to reply in the dev list, but failed miserably. 
Sorry for any noise.

I see this simple difference which broke some ancient code which works in 
Python 3.8.2



$ python 
Python 3.8.2 (default, Apr  8 2020, 14:31:25) 
[GCC 9.3.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')


robin@minikat:~/devel/reportlab/REPOS/reportlab/tests
$ python39
Python 3.9.0a6 (default, Apr 29 2020, 07:46:29) 
[GCC 9.3.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')

  File "", line 1
norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')
 ^
SyntaxError: invalid string prefix



robin@minikat:~/devel/reportlab/REPOS/reportlab/tests
$ python39 -X oldparser
Python 3.9.0a6 (default, Apr 29 2020, 07:46:29) 
[GCC 9.3.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')

  File "", line 1
norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')
   ^
SyntaxError: invalid string prefix





so presumably there has been some parser / language change which renders and'\n' illegal. Is this a real syntax error or 
an alpha issue? It looks like the tokenization has changed. Putting in the obvious spaces removes the syntax error.

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


Techniques to extend code without modifying it? (besides modules and decorators)

2020-04-29 Thread Christian Seberino
I have some code I'd like to extend without modifying it.
I'm sure this is a common pattern.  I wondered what the
options were for "extending without modifying (much)".

I'm aware one can import a module and add functions to decorators.

Are there other ways?

Thanks!

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