Skip to content

Commit

Permalink
Fixes a bug related to PEP 487 (__set_name__), reported at https://st…
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreQuentel committed Dec 14, 2019
1 parent c51751f commit c2181c8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions www/src/brython.js
Expand Up @@ -99,8 +99,8 @@ new Function("$locals_script",js)({})}})(__BRYTHON__)
__BRYTHON__.implementation=[3,8,5,'dev',0]
__BRYTHON__.__MAGIC__="3.8.5"
__BRYTHON__.version_info=[3,8,0,'final',0]
__BRYTHON__.compiled_date="2019-12-12 21:52:41.285101"
__BRYTHON__.timestamp=1576183961285
__BRYTHON__.compiled_date="2019-12-14 18:51:17.367765"
__BRYTHON__.timestamp=1576345877367
__BRYTHON__.builtin_module_names=["_aio","_ajax","_base64","_binascii","_jsre","_locale","_multiprocessing","_posixsubprocess","_profile","_sre_utils","_string","_strptime","_svg","_warnings","_webcomponent","_webworker","_zlib_utils","array","builtins","dis","hashlib","long_int","marshal","math","math1","math_kozh","modulefinder","posix","random","unicodedata"]
;

Expand Down Expand Up @@ -5642,7 +5642,7 @@ if(v===undefined){continue}
class_dict[key]=v
if(v.__class__){
var is_descriptor=
$B.$getattr(v.__class__,"__set__",_b_.None)!==_b_.None
$B.$getattr(v.__class__,"__get__",_b_.None)!==_b_.None
if(is_descriptor){var set_name=$B.$getattr(v.__class__,"__set_name__",_b_.None)
if(set_name !==_b_.None){set_name(v,v.__class__,key)}}}
if(typeof v=="function"){v.$infos.$class=class_dict
Expand Down
8 changes: 4 additions & 4 deletions www/src/brython_dist.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion www/src/brython_stdlib.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion www/src/py_type.js
Expand Up @@ -555,7 +555,7 @@ type.__new__ = function(meta, name, bases, cl_dict){
if(v.__class__){
// cf PEP 487 and issue #1178
var is_descriptor =
$B.$getattr(v.__class__, "__set__", _b_.None) !== _b_.None
$B.$getattr(v.__class__, "__get__", _b_.None) !== _b_.None

if(is_descriptor){
var set_name = $B.$getattr(v.__class__, "__set_name__", _b_.None)
Expand Down
4 changes: 2 additions & 2 deletions www/src/version_info.js
@@ -1,8 +1,8 @@
__BRYTHON__.implementation = [3, 8, 5, 'dev', 0]
__BRYTHON__.__MAGIC__ = "3.8.5"
__BRYTHON__.version_info = [3, 8, 0, 'final', 0]
__BRYTHON__.compiled_date = "2019-12-12 21:52:41.285101"
__BRYTHON__.timestamp = 1576183961285
__BRYTHON__.compiled_date = "2019-12-14 18:51:17.367765"
__BRYTHON__.timestamp = 1576345877367
__BRYTHON__.builtin_module_names = ["_aio",
"_ajax",
"_base64",
Expand Down

0 comments on commit c2181c8

Please sign in to comment.